Reprtoir uses standard HTTP response codes to indicate the success or failure of an API request:

  • Codes in the 200 range indicate success.
  • Codes in the 400 range indicate a failure given the information provided.
  • Codes in the 500 range indicate an error with the Reprtoir servers (very uncommon).

In the occurrence of 4xx response code, Reprtoir will provide a JSON error object with a message that briefly explains the error.

Error Response Structure

When an error occurs on a API request, we always respond with a JSON error object:

  "error": {
    "status": 403,
    "code": "ERROR_MISSING_API_KEY",
    "documentation": "",
    "message": "API key is missing",
    "details": null

Error Code Reference Table

CodeHTTP StatusDescription
ERROR_MISSING_FEATURE400The request cannot perform due to a missing feature in your account.
ERROR _INVALID_API_KEY401The API key used in the request is invalid.
ERROR_INVALID_API_VERSION401The X-API-VersionHTTP header of the request specified an invalid API version.
ERROR_MISSING_API_KEY403The X-API-KeyHTTP header of the request was not set.
ERROR_RESOURCE_NOT_FOUND404The resource you were trying to retrieve was not found.
ERROR_INVALID_PARAMETERS422The request contains some invalid parameters. You will receive more information on the detailskey of the JSON error object.