Error codes
Ordnance Survey uses standard HTTP response codes to provide key information on the outcome of API requests. These codes serve as a straightforward means of communication, indicating the success or failure of each API request between your application and our APIs.
When a request is successful, you'll encounter codes within the 2xx
range. If the information in the request is incorrect (for example, missing query parameters), you'll receive codes within the 4xx
range, and 5xx
codes indicate an error with the OS APIs.
The following table details the HTTP response codes and their meaning within the context of OS APIs:
Code | Official description | Explanation in context of the API |
---|---|---|
| OK | Request has been successful. |
| Not Modified | In response to a conditional |
| Bad request | For example, missing query parameter or malformed syntax. |
| Unauthorized | The client has not provided authentication or has provided incorrect authentication. |
| Forbidden | The client has authenticated its access but does not have sufficient rights to complete the request. |
| Not found | The server has not found anything matching the Request-URI. |
| Method not allowed | The request used an unsupported HTTP method, for example, |
| Too many requests | The number of requests per minute (rate-limit) has been exceeded. |
| Internal server error | A generic internal server error occurred. |
| Service unavailable | A temporary outage due to overloading or maintenance. |
Last updated