API Response Codes

HTTP Code Description Occurs When:
200 OK Everything performs as expected.
201 Created A new entity has been created.
202 Accepted The call to the method was accepted and will be handled at the servers discretion.
204 No Content The call to the method was successful but there is not data that this method will return.
400 Bad Request A malformed request was sent through or when a validation rule failed. Validation messages will be returned in the response body.
401 Unauthorized The user is not correctly authenticated and the call requires authentication. The user does not have access rights for this method.
404 Not Found The requested entity was not found. Entities are bound to companies. Ensure the entity belongs to the company.
405 Method Not Allowed

HTTP Verb is not specified or incorrect verb is used.

Or The user does not have access to the specified method. This applies to invited users.

409 Conflict When attempting to delete an item that is currently in use.
415 Incorrect or Missing Content-Type header A valid Content-Type header such as application/json is required on all requests.
429 Request Limit Reached The limit of 100 requests per minute per company is exceeded or more there are more than 20 failed login attempts.

Request Limits

limit of 100 requests can be made per minute per company. If this request limit is exceeded, the API will return HTTP 429 (Request Limit Reached) with the message “Your IP address has exceeded the allowed number of transactions per minute and has been blocked for 24 hours”. Your IP address will be blocked for 24 hours. It is advisable to make no more than one request per second to avoid this.

limit of 20 failed login attempts can be made per hour through the API. If this request limit is exceeded, the API will return HTTP 429 (Request Limit Reached) with the message “Your Username has exceeded the allowed number of login attempts and has been blocked for 24 hours”. The Username will be blocked for 24 hours.

In order for you to know the reason of the 429 status code, a header is added to the response. The header key is “X-RequestLimit-ExceededReason” with a value of either
“LoginAttemptsExceeded” or “RateExceeded”.

If you encounter a request limit, do not continue to make requests. Contact us on api@accounting.sageone.com.au so that your IP address can be unblocked.

500 Internal Server Error A server side error occurred.
503 Service Unavailable The service is unavailable due to scheduled maintenance.