API error codes and description
The Witly API uses status codes in the 200 range to indicate success, in the 400 range to indicate an error, and in the 500 range to indicate a server-side error. Most errors can be checked by the error response description.
Either when an error occurs or when a response is successful, the response header contains an HTTP code, and the response body usually contains:
- The HTTP response code
- The message accompanying the HTTP response code
- The error message (if the response returns information about an error)
HTTP response code | Description |
200 | Success code for GET, POST, PUT or DELETE request. |
400 | The request couldn’t be understood, usually because the JSON or XML body contains an error. - The body of the request is in a format that's not supported by the specified method.
- Content required
- Incorrect integer value for field
- Incorrect decimal value for field
- Incorrect date/time value for field
- Incorrect boolean value for field
- Unknown data type for field
- Invalid picklist/lookup value for field
- Mandatory field required to update resource
- No resource was matched with your criteria
|
401 | The API requires authentication. |
403 | The request has been refused. The reasons are: - The access token has expired or is invalid.
- Requires secure connection (https).
- Invalid username and password.
|
404 | The requested API does not exist. |
405 | The request method is not allowed on the requested API. |
500 | An error has occurred within Witly. |
501 | The HTTP request method is not supported by the server. |
503 | Exceeded the concurrent connection limit. |
Sample error message
The error response may return more than one error which includes error code and message.
{ Errors: [ { "Code": "FieldNotFound", "Message": "Field ‘Customer Name’ not found" }, { "Code": "FieldNotFound", "Message": "Field ‘Customer Type’ not found" }, { "Code": "FieldIsReadOnly", "Message": "Field ‘Subject’ is read only" } ] } |
Last modified on Jan 23, 2018