Sage 200 API HTTP Response Codes

Posted on June 20, 2023
What HTTP response codes does the Sage 200 API return?

With every request made to the API, a response code will be returned. The response code indicates if the API request is successful or not, and what may have caused the API request to fail.

Here are a few common response codes.

200 The request was successful.
201 The request successfully created the resource.
400 Bad Request.
This occurs if the data that you are sending over is malformed or contains invalid fields and values. The API will attempt to return meaningful error messages relating to the cause of the first error it encounters. It is common for this to occur if incorrect foreign IDs are supplied in the body of a request.

404 Not Found.
This normally occurs if the URL you supply is malformed. This means that API does not recognise the entity or entity id supplied within the URL. Check that the URL entity names are correct and that any IDs you supply refer to records that actually exist.

504 Gateway Timeout
The 504 (Gateway Timeout) status code indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. The error may be a temporary occurrence due to too much traffic toward the server or site. If you try and query the sites endpoint and it returns an empty array then it may mean that the on premises API setup has been lost and you may need to uninstall and re-install the Azure Proxy Tunnel.

Have Questions?

How can automation help?

Automation helps your business become more efficient and perform better with less resources. So you can reduce on costs and time spent on repetitive menial tasks. Think of automation as a “Robot” that works 24/7 to improve your business performance, without the overheads of employing extra staff.