Coupon Codes Endpoint
Pages through the unclaimed codes of one coupon inside a campaign. Use it when a coupon issues unique codes and you want to show or hand out more than the single code returned by the Campaign Detail endpoint.
- Endpoint:
/api/v1/campaigns/{slug}/coupons/{id}/codes - Method:
GETorPOST
Headers
| Header | Value | Required | Description |
|---|---|---|---|
Partner-Access-Token | Base64 String | Yes | Your encrypted AES-256 time-sensitive token. |
Content-Type | application/json | Yes | |
Accept | application/json | Yes | |
X-Currency | e.g. THB | Optional | Currency for all money fields. Defaults to THB. |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | String | Yes | Campaign slug. |
id | Integer | Yes | Coupon ID — the id field of an entry in the Campaign Detail coupons array. |
Payload Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | Integer | Optional | Page number. Minimum 1. Defaults to 1. |
limit | Integer | Optional | Records per page. Between 1 and 100. Defaults to 10. |
Sample Response
{
"result": 1,
"message": "success",
"data": {
"campaign": {
"id": 41,
"name": "Songkran Hotel Sale",
"slug": "songkran-hotel-sale",
"status": "running",
"promotion_type": "coupon",
"start_at": "2026-04-01T00:00:00.000000Z",
"end_at": "2026-04-30T23:59:59.000000Z",
"coupon_expiry": "2026-05-31T23:59:59.000000Z",
"description": "Save on hotel stays across Thailand.",
"term_and_conditions": "<p>One coupon per booking.</p>",
"images": []
},
"coupons": {
"meta": {
"current_page": 1,
"last_page": 12,
"per_page": 10,
"total": 116
},
"data": [
{
"id": 9821,
"code": "SONGKRAN-4F7QK2",
"currency": "THB",
"status": "not_issued",
"discount_type": "percentage",
"discount_value": 10,
"min_purchase_amount": 1000,
"max_discount_amount": 500,
"coupon_expiry": "2026-05-31T23:59:59.000000Z",
"claim_expiry": null,
"reward": "TourMind Hotel",
"reward_destinations": [
{
"id": 12,
"name": "Thailand"
}
],
"reward_variations": [],
"rules": [
"Save up to THB 500",
"Min. spend THB 1000"
],
"applicable_for": "Valid for <strong>Hotel</strong> in <strong>Thailand</strong>"
}
]
}
}
}
Field Reference
| Field | Type | Description |
|---|---|---|
id | Integer | Coupon code row ID. |
code | String | The code to claim or use at checkout. |
status | String | not_issued here, since only unclaimed codes are returned. |
reward | String | null | Product category the coupon targets, e.g. TourMind Hotel. null when valid for everything. |
reward_destinations | Array | Destinations (or airlines for pd9) the coupon is limited to. |
reward_variations | Array | Specific products (hotels, tours, packages) the coupon is limited to. |
discount_amount | Number | Only present when the coupon was resolved against a real cart — see Applicable Coupons. |
All other fields match the coupon fields documented in Campaign Detail.
Notes
- Only codes with
status = not_issuedand no owner are returned. Claimed codes never appear here. - Under
equal_coupon_distributionthe list is automatically restricted to the codes allocated to your partner account. - Unlike the Campaign Detail endpoint, this one ignores the campaign type filter: it is meant for campaigns you already resolved by slug.
- An unknown or inactive slug returns
Campaign not found or inactivewith HTTP404.