Status codes and the error object.

The Tremendous API formats errors as follows:

{
  "errors": {
    "message": "Order failed: validation failure",
    "payload": {
      "payment": {
        "funding_source_id": "Your request was missing a funding_source_id. Tremendous requires this to determine how to pay for your order."
      }
    }
  }
}

The returned JSON object has a single top-level property error. Nested under that property is another object, that comes with two (2) properties:

  • message: (string) A message written in plain English describing the error
  • payload: (object) Each (nested) property in this object references back to the exact same property in the request body you sent. At the lowest level, this object contains messages that describe the specific problem that occurred in that specific field of your request body.

In the example above, the user tried to create an order, which failed. The request body was missing the property funding_source_id nested under a payment object at the top level of the request.

A single endpoint may result in different error states. Our API reference describes all possible error states for each endpoint.

Response codes

The API uses HTTP status codes to communicate the result of a request.

HTTP status codeMeaning
200API request successful
201This HTTP is only returned when an order with a duplicate external_id is submitted. It indicates that the order already exists.
202API request successful (no new resource created yet, but new resource will be created asynchronously in the background)
400Validation error of the sent parameters or request body
401Authorization error e.g. due to an invalid or missing API key
402Not enough funds in your account
404No resource could be found for the provided ID
422Request lacks one of the required parameters
429Rate limit exceeded
500Unexpected error. If this persists, please contact [email protected]