Deem Offers API Documentation


Conventional HTTP response codes to indicate success or failure of an API request are used. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, a charge failed, etc.), and codes in the 5xx range indicate an error with OfferEngine’s servers.

Not all errors map cleanly onto HTTP response codes. All specific errors are mentioned on a per request basis in each request explanation.

All errors return JSON with a type and message describing the particular problem that occurred with the previous request.

This section provides a high overview of the error behavior, but each api call has specific error responses explained within its own documentation.

HTTP Status Code Summary

  • 200 OK - Everything worked as expected.

  • 400 Bad Request - Often missing a required parameter.

  • 401 Unauthorized - No valid API key provided.

  • 402 Request Failed - Parameters were valid but request failed.

  • 404 Not Found - The requested item doesn’t exist.

  • 409 Conflict - A conflict with request and stored data.

  • 422 Unprocessable Entity - The request is unprocessable.

  • 500, 502, 503, 504 Server errors - something went wrong on an OfferEngine server.

Error Types

  • auth_failed - key provided does not match an active api key

  • validation_failed - usually a missing required parameter

  • create_failed - object parameters are malformed

  • update_failed - object parameters are malformed

  • find_failed - objects or objects could not be found as requested

  • purchase_failed - credit card charge failed

  • redeem_failed - voucher could not be found or is already redeemed

Error Message

Field providing a human readable explanation of the error that occurred

Error Response

  "status": "error",
  "error_type": "",
  "error_msg": ""

Error Response Example

Status: 404 Not Found
  "status": "error",
  "error_type": "find_failed",
  "error_msg": "Unable to find"