Skip to main content
The Trakkr API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information, and codes in the 5xx range indicate an error with our servers.

Error Response Format

All error responses follow this format:

HTTP Status Codes

Common Error Responses

400 Bad Request

Missing Required Parameter

Invalid Breakdown Format

Invalid Breakdown Values

Invalid Date Format

Date Range Too Large

401 Unauthorized

Missing API Key

403 Forbidden

Invalid API Key

Brand Access Denied

500 Internal Server Error

Authentication Error

Date Range Validation Error

General Server Error

Handling Errors

JavaScript Example

Python Example

Error Handling Best Practices

  1. Check status codes: Always check the HTTP status code before processing the response
  2. Parse error messages: Extract both the error title and detailed messages
  3. Handle network errors: Catch and handle network-level exceptions
  4. Log errors: Log error details for debugging purposes
  5. Retry logic: Consider implementing retry logic for 5xx errors
  6. User feedback: Provide meaningful error messages to end users

Rate Limiting

While the API doesn’t have strict rate limits, we recommend:
  • Making reasonable numbers of requests
  • Implementing exponential backoff for retries
  • Caching responses when appropriate
  • Avoiding rapid-fire requests
Need help debugging? If you’re getting unexpected errors, check our authentication guide or contact support with the full error response.