API Responses

API Responses

When you communicate with the API you will receive a response code based on what you are doing. The best response is the 200 response which means everything was perfect, however other responses in the 2xx range are possible which are also success but to varying degrees and you need to check anything other than a 200 response and inform your user that there was a potential issue.

Summary

Code Group

Code Range Used

 

1xx - Informational

100-150

 

2xx - Success

200

Success

201-206

Success with notes / comments

207

Partial success

3xx redirection

Not used

 

4xx client errors

400-429

Review issues & resubmit after correction

5xx server errors

500

Wait & retry suggested after 5 minutes then 30 minute intervals.

Report persistent issues to Vision Support.

Generic / Common response codes

Each resource can return it’s own specific status codes, below are the generic codes shared among all.

Code

Description

Code

Description

101

Authentication failed, please check the token / secret used and that you have access to the requested service

110

Invalid parameters specified for the requested API

150

An error occurred in the requested service

200

OK - the request was handled successfully.

401

Unauthorised - the access token used has probably expired and needs to be refreshed using the refresh_token and the original request reattempted

403

Forbidden - could occur when an unauthorised user attempts to access an API they haven’t been authorised to do so.

404

Service not found

429

API access restricted
(Exceeded the rate limit / access not allowed)

500

/ 999 (legacy)

Internal server error but could also be caused by an invalid request (invalid encoding, data types etc)

GET Specific Responses

Code

Description

Code

Description

204

Request to GET was fine, however, no record found for the parameters provided 

POST Specific Responses

Code

Description

Code

Description

207

Multi-Status, response body contains more information

400

Request processing all record(s) failed, could indicate problems with the input parameters, response body contains more information

406

Input XML validation failed, response body will have reason for failure

Copyright Ontech Solutions 2017-2024. All rights reserved, no part may be replicated or distributed without the express permission of the owner.