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 details for a specific coupon
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"
}
}
affiliate.true for successful responsesShow Data Object Properties
percentage or fixedforever, once, or repeatingrepeating)fixed)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"
}
}
Was this page helpful?