Skip to main content
GET
/
coupons
List coupons
curl --request GET \
  --url https://api.affonso.io/v1/coupons \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "affiliate_id": "<string>",
      "program_id": "<string>",
      "code": "<string>",
      "discount_type": "percentage",
      "discount_value": 123,
      "duration": "forever",
      "duration_in_months": 123,
      "product_ids": [
        "<string>"
      ],
      "provider": "stripe",
      "provider_coupon_id": "<string>",
      "provider_promo_code_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "total_pages": 123,
    "has_next_page": true,
    "has_prev_page": true
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Prefix with 'sk_live_' for production or 'sk_dev_' for development.

Query Parameters

page
integer
default:1

Page number (1-based)

Required range: x >= 1
limit
integer
default:50

Number of items per page

Required range: 1 <= x <= 200
affiliate_id
string

Filter by affiliate ID

program_id
string

Filter by affiliate program ID

Search by coupon code

Maximum string length: 100
sort
string

Sort field and direction

Example:

"created_at:desc"

expand
string

Comma-separated list of fields to expand

Example:

"affiliate"

Response

List of coupons

success
boolean
data
object[]
pagination
object