Standard error codes
Defra uses standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:
Code | Official description | Explanation in context of the API |
---|---|---|
200 |
OK | |
304 |
Not modified | In response to a conditional GET request, this response indicates that the underlying data has not changed since the previous request, and cached results may be re-used. |
400 |
Bad request | For example missing query parameter or malformed syntax |
401 |
Unauthorized | The client has not provided authentication or incorrect authentication |
404 |
Not found | The server has not found anything matching the request-URI |
405 |
Method not allowed | Request used an unsupported HTTP method. For example DELETE or PUT |
500 |
Internal server error | Generic internal server error |
503 |
Service unavailable | For example, due to overloading or maintenance |
For errors specific to the Export Health Certificates API, check the Endpoints section. See our reference guide for more on errors.