API Response Codes

Understanding the response codes for the MYOB Business API?

  Date Updated: Oct 2021

Below is a list of the more common response codes you will get from the API. A key thing to note: when the API returns an error, there is always a JSON object returned and within this is an error message that can help understand what has happened.

200

Success

This is the standard success response code when you request something from the API.

201

Created OK

This is the standard success response code when you request something from the API.

304

Not Modified

This is the standard response code returned if nothing has been modified upon checking a collection or individual resource for changes.

400

Bad Request

This is the standard success response code when the API hasn't recognised your request.

When seeing this error, check you are setting all the required headers correctly.

401

Unauthorised

This is the standard 'blocked' response code from the API service.

To resolve this we recommend you check your API KEY and API SECRET are correct along with the company file username/password.

403

Forbidden

This error code is most commonly seen when the API key being used is invalid or has been disabled. Please check the API Key you are using is correct and check with us to see if you're app has hit it's limits.

This is the standard success response code when a resource you have attempted to request is not allowed.

404

Resource not found

This is the standard success response code when an item you have requested can't be found. When seeing this error, check any ID that is carried in the api call you are making, to ensure it is valid.

If attempting to create new records using HTTP PUT method, this error is returned as PUT only supports update operations for existing records.

409

Conflict

Indicates the request could not be processed because an update operation requires a valid RowVersion from the current entity being modified.

410

Resource removed

This is the standard success response code when a resource you requested has been removed.

500

Internal Server Error

This is the standard success response code when the server (or desktop api service) is miss-behaving.

501

Not Implemented

This error code can occur if the server does not recognize the request method, or it is unable to fulfill the request due to the feature not currently being available in the api.

In addition to this, you may also receive the error if you're accessing a local desktop company file where the version of AccountRight required to service the request is not installed.