Documentation
Errors
The API uses standard HTTP status codes. Errors always return a JSON body.
Code
| Field | Description |
|---|---|
error | Error code, stable and safe to check in code |
message | Human-readable explanation. The text may change |
Status codes
| Status | error | When |
|---|---|---|
200 | Success | |
400 | bad_request | A parameter is invalid, such as a non-numeric ID, an unknown sort field or limit over 100 |
404 | not_found | The make, model or trim does not exist, or the URL is not an API route |
500 | internal_error | Unexpected server error |
Examples
Unknown sort field:
Code
Code
ID that is not a number:
Code
Code
Trim that does not exist:
Code
Code
Unknown route:
Code
Code
A search that matches nothing is not an error. It returns 200 with an empty data array.
Last modified on