REST API –

Errors

HTTP Status Codes

Unsuccessful requests to our REST API will result in one of the following HTTP status codes:

Status Code Name Description
400 Bad Request The server was not able to process the request due to missing or invalid data.
401 Unauthorized Wrong or missing credentials.
403 Forbidden The request could not be processed due to missing permissions or because it would create an invalid state.
500 Internal Server Error An error occurred on the server while processing the request.

Response

Our service will respond to every request with JSON formatted data. If there is a problem with a request or if we encounter a problem, you will receive a response containing some information about what occurred. This will be helpful for resolution of any problems that occur.

Response Parameters

These parameters are wrapped in a ‘ResponseStatus’ object.

Parameter Type Description
ErrorCode string A single word descriptor of the type of error that was encountered (in capital letters) e.g. “FORBIDDEN”.
Message string A short friendly message describing the problem that was encountered.
Errors array An array of ‘Error’ objects containing additional information.

Depending on the error, more details may be available. In this case the ‘ResponseStatus’ object contains an array of ‘error’ objects in a property called ‘Errors’ with following structure:

Parameter Type Description
FieldName string The name of the invalid parameter.

Error Codes

Error Code Description
ADDRESS_CANNOT_BE_DELETED A request to delete an address could not be processed as there are existing numbers which are linked to this address.
NUMBER_BELONGS_TO_DIFFERENT_PROPERTY The number provided in the request belongs to a different property than the one provided in the request.
COUNTRY_UNAVAILABLE Attempted access to a country which is not available.
FORBIDDEN A request could not be processed due to missing permissions.
PARAMETER_REQUIRED A required parameter is missing. The name of the missing parameter is available in the error message and as ‘FieldName’ in the ‘Error’ object (see above).
PARAMETER_INVALID A supplied parameter is not within appropriate bounds. The name of the missing parameter is available in the error message and as ‘FieldName’ in the ‘Error’ object (see above).
PARAMETER_TOO_SHORT A provided parameter is too short. More details are available in the error message.
PARAMETER_TOO_LONG A provided parameter is too long. More details are available in the error message.
ONE_OF_SEVERAL_PARAMETERS_REQUIRED At least one parameter from several parameters must be provided. The name of the parameters are available in the error message and (concatenated) as ‘FieldName’ in the ‘Error’ object (see above).
ADDRESS_NOT_FOUND A matching address could not be found.
NUMBER_NOT_FOUND A matching phone number could not be found.
LOCATION_NOT_FOUND The combination of geographical filters that were provided cannot be resolved to a known location.
COUNTRY_NOT_FOUND A matching country could not be found.
PROPERTY_NOT_FOUND A matching property could not be found.
ACCOUNT_NOT_FOUND A matching account could not be found.
CALL_NOT_FOUND A matching call could not be found.
UNKNOWN_ROUTING_METHOD A provided routing method is not known.
UNKNOWN_RECORDING_OPTION A provided recording option is not known.
UNKNOWN_CAPABILITY A provided capability is not known.
UNKNOWN_DISPOSITION A provided disposition is not known.
UNKNOWN_NUMBERTYPE A provided number type is not known.
INVALID_PHONENUMBER_FORMAT A provided number is not in the expected format (E.164).
INVALID_COUNTRYCODE_FORMAT A provided country code is not in the expected format (ISO 3166-1).