Skip to main content

Developers - API

Error responses

Perfection's APIs return errors in an object based on the Problem Details RFC.
All API responses follow the same response object format, containing the following properties.

{
"message": "string",
"result": {
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}

In this object, type, title and detail properties will describe the error that occurred.
The status property will return an error code which can be used to look up further details of an error. Usually, the status code will be the same as the HTTP Response Code, following the respective meanings of each 4xx and 5xx response codes.
Additionally, the object can contain any number of additional properties to provide you with more information about the error that occurred.

Each API can return different error codes and types. Refer to the OpenAPI description for each API to see which error codes could be returned when an error occurs.
You can find the OpenAPI description of our APIs in the API References: