Skip to main content
GET
/
coupons
/
coupon
/
{couponName}
/
promo-codes
curl -X GET \
  'https://api.appcharge.com/coupons/coupon/summer26/promo-codes?limit=1000&sortDirection=desc&isActive=true&page=1' \
  -H 'x-publisher-token: <x-publisher-token>'
{
    "promoCodes": [
        {
            "name": "swx1",
            "active": false,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-22T15:58:24.116Z",
            "redemptions": 100
        },
        {
            "name": "swx2",
            "active": true,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-25T08:44:26.668Z",
            "redemptions": 50
        }
    ],
    "totalCount": 2,
    "totalPages": 1,
    "hasNextPage": false,
    "page": 1,
    "limit": 1000
}
curl -X GET \
  'https://api.appcharge.com/coupons/coupon/summer26/promo-codes?limit=1000&sortDirection=desc&isActive=true&page=1' \
  -H 'x-publisher-token: <x-publisher-token>'
{
    "promoCodes": [
        {
            "name": "swx1",
            "active": false,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-22T15:58:24.116Z",
            "redemptions": 100
        },
        {
            "name": "swx2",
            "active": true,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-25T08:44:26.668Z",
            "redemptions": 50
        }
    ],
    "totalCount": 2,
    "totalPages": 1,
    "hasNextPage": false,
    "page": 1,
    "limit": 1000
}

Authorizations

x-publisher-token
string
header
required

Publisher token, as displayed in the Publisher Dashboard.

Path Parameters

couponName
string
required

Coupon name.

Example:

"summer26"

Query Parameters

limit
integer

Maximum number of promo codes to return.

Example:

1000

page
integer

Page number to retrieve.

Example:

1

sortDirection
enum<string>
default:asc

Sort direction of results by createdAt.

Available options:
asc,
desc
Example:

"desc"

isActive
boolean

Filter by active status.

Example:

true

Response

Promo codes retrieved successfully.

promoCodes
object[]

List of promo codes.

totalCount
integer

Total number of promo codes matching the query.

Example:

42

totalPages
integer

Total number of pages matching the query.

Example:

1

hasNextPage
boolean

Whether there is an additional page of results.

Example:

true

page
integer

Current page number.

Example:

1

limit
integer

Maximum number of promo codes per page.

Example:

1000