Skip to main content

HTTP response codes

The MyTruv API uses conventional HTTP response codes to indicate the success or failure of a request. Codes in the 2xx 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.
CodeTitleDescription
200OKRequest successful
401UnauthorizedInvalid or missing credentials
404Not FoundResource does not exist
422Unprocessable EntityValid JSON but invalid field values
429Too Many RequestsRate limit exceeded
500Internal Server ErrorSomething went wrong on our servers

Error response format

When an error occurs, the API returns a JSON object with a detail field containing a human-readable error message.

Standard error

{
  "detail": "Link not found"
}

Validation error

{
  "detail": [
    {
      "loc": ["query", "transacted_at_from"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}

Retry guidance

StatusRetry?Strategy
401, 404, 422NoFix the request (client error)
429YesWait for Retry-After seconds, then retry with exponential backoff
500YesRetry up to 3 times with exponential backoff

Next steps

API Overview

Authentication and available endpoints

Pagination

How to paginate through large result sets