Errors
The Inventory API returns conventional HTTP response codes to indicate the success or failure of an API request. In general, 2xx codes indicate success, 4xx codes indicate an error failed given the information provided and 5xx codes indicate an error with the Inventory API.
Error format
We expose API errors in JSON format. Here's an example of a JSON 400 Bad Request:
{
"errors": [
{
"propertyName": "Type",
"errorMessage": "Invalid type",
"attemptedValue": "BIKE"
},
{
"propertyName": "Tags",
"errorMessage": "Tags are not supported in Control Panel. Please remove the Tags parameter and try again"
}
],
"isValid": false
}Error glossary
| Error | Description |
|---|---|
| 400 | Bad Request The generic error type for not being able to process your request. We'll generally provide an explanation in the response. More often than not, this error usually means the payload being sent has failed our validation. For information about the parameters we accept, refer to CSN-DTO-Vehicle. |
| 401 | Unauthorized The authorization token is either invalid, disabled or expired. Note that bearer tokens have a short lifespan so you may want to try regenerate a token if you encounter this error. |
| 403 | Forbidden Your account lacks the required permission/s to use the endpoint. The required permissions are listed under each endpoint in the API reference. |
| 404 | Not Found The resource you are looking for could not be found, or the path is incorrect. |
| 409 | Conflict The resource you are trying to create already exists or conflicts with its current state. |
| 415 | Unsupported Media Type The request header content-type must be application/json |
| 500 | Internal Server Error Something unexpected has gone wrong on our end while processing your request. If the problem persists, please contact us. |
