Skip to main content
GET
/
v1
/
coupons
/
{id}
curl -X GET "https://api.affonso.io/v1/coupons/cpn_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "success": true,
  "data": {
    "id": "cpn_abc123",
    "code": "SAVE25",
    "affiliate_id": "aff_123",
    "discount_type": "percentage",
    "discount_value": 25,
    "duration": "forever",
    "duration_in_months": null,
    "currency": null,
    "product_ids": [],
    "created_at": "2024-01-15T10:30:00Z"
  }
}
Retrieve a single coupon by ID with optional expanded fields.

Path Parameters

id
string
required
The unique identifier of the coupon to retrieve.

Query Parameters

expand
string
Comma-separated list of related data to include in the response. Valid values: affiliate.

Response

success
boolean
Always true for successful responses
data
object
The coupon object.
curl -X GET "https://api.affonso.io/v1/coupons/cpn_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "success": true,
  "data": {
    "id": "cpn_abc123",
    "code": "SAVE25",
    "affiliate_id": "aff_123",
    "discount_type": "percentage",
    "discount_value": 25,
    "duration": "forever",
    "duration_in_months": null,
    "currency": null,
    "product_ids": [],
    "created_at": "2024-01-15T10:30:00Z"
  }
}