Skip to main content

Errors

Partnr uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, the data was not found, etc.). Codes in the 5xx range indicate an error with Partnr's servers (these are rare).

Some 4xx errors that could be handled programmatically (e.g., a company is not found) include an error message that briefly explains the error reported.

All error responses return a JSON-encoded object with the following properties:

PropertyDescriptionType
errorObject containing data about the errorobject
error.codeHTTP response codeinteger
error.messageA human-friendly message describing the errorstring

This is an example of what you should expect:

Company not found error
{
"error": {
"code": 404,
"message": "Company not found."
}
}