Deem Offers API Documentation

Reseller Coupons

Check coupon status

Endpoint for a third party reseller to check the status of a coupon.

GET https://<username>:<password>@api.offers.deem.com/api/v3/coupons/:coupon_id

Response

Status: 200 OK
{
  "coupon": {
    "id": "a21c5452d8",
    "expires_at": null,
    "created_at": "Fri Dec 16 19:14:55 UTC 2011",
    "qr_code_url": "http://domain/coupon/qr_code/ab231c9e",
    "qr_code": "apaosidnqw4tdsdpqi45jf091835ukdfq3-40695.kfmdg-q09i6m'ldfi8nqk6",
    "state": "valid",
    "redemption_code": null,
    "redeemed_at": null
  }
}

Error Responses

If there is an error in processing the request, an error message will be returned.

Error Response Example

Status: 404 Not Found
{
  "status": "error",
  "error_type": "find_failed",
  "error_msg": "Failed. not found."
}

Cancel coupon

Endpoint for a third party reseller to cancel a coupon.

DELETE https://<username>:<password>@api.offers.deem.com/api/v3/coupons/:coupon_id/cancel

Response

Status: 200 OK
{
  "status": "success"
}

Error Responses

If there is an error in processing the request, an error message will be returned.

Error Response Example

Error returned when a coupon is not found.

Status: 404 Not Found
{
  "status": "error",
  "message": "Failed. not found.",
  "type": "find_failed"
}

Error returned when cancel coupon fails.

Status: 422 Unprocessable Entity
{
  "status": "error",
  "message": "Validation failed",
  "code": "422",
  "errors": {
    "coupons": [
      "barcode 656352535683 is non refundable",
      "in a non refundable state",
      "coupons cannot already be part of another refund",
      "you can not refund more coupons than were bought"
    ]
  }
}