HTTP response codes
The MyTruv API uses conventional HTTP response codes to indicate the success or failure of a request. Codes in the2xx range indicate success, codes in the 4xx range indicate an error with the information provided, and codes in the 5xx range indicate a server error.
| Code | Title | Description |
|---|---|---|
200 | OK | Request successful |
401 | Unauthorized | Invalid or missing credentials |
404 | Not Found | Resource does not exist |
422 | Unprocessable Entity | Valid JSON but invalid field values |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Something went wrong on our servers |
Error response format
When an error occurs, the API returns a JSON object with adetail field containing a human-readable error message.
Standard error
Validation error
Retry guidance
| Status | Retry? | Strategy |
|---|---|---|
401, 404, 422 | No | Fix the request (client error) |
429 | Yes | Wait for Retry-After seconds, then retry with exponential backoff |
500 | Yes | Retry up to 3 times with exponential backoff |
Next steps
API Overview
Authentication and available endpoints
Pagination
How to paginate through large result sets