Retrieve a voucher code

GET
/voucher-codes/{id}

Returns a single voucher code by its ID.

Path Parameters

id*string

ID of the voucher code (e.g. vc_aBcDeFgHiJ).

Response Body

application/json

application/json

curl -X GET "https://example.com/voucher-codes/string" \  -H "Easol-API-Version: 2026-11-01"
{
  "id": "vc_aBcDeFgHiJ",
  "object": "voucher_code",
  "code": "SUMMER25",
  "discount_type": "percentage",
  "discount_percentage": 25,
  "discount_amount": {
    "amount": 0,
    "currency": "string"
  },
  "bogof_purchase": 2,
  "bogof_free": 1,
  "redemption_limit": 100,
  "redemptions": 12,
  "minimum_quantity": 1,
  "expires_on": "2026-12-31",
  "applies_automatically": true,
  "apply_to_all_products": true,
  "status": "valid",
  "variants": {
    "object": "list",
    "url": "string",
    "has_more": false,
    "next_cursor": "string",
    "data": [
      {
        "id": "expv_aBcDeFgHiJ",
        "object": "experience_variant",
        "name": "Double room",
        "tagline": "Sea view, breakfast included"
      }
    ]
  },
  "date_ranges": {
    "object": "list",
    "url": "string",
    "has_more": false,
    "next_cursor": "string",
    "data": [
      {
        "start_on": "2026-09-01",
        "end_on": "2026-09-30"
      }
    ]
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}