v1

latestOpenAPI 3.1.02026-07-2665153355.3 KB
Promo Codes

Retrieves a paginated list of up to 1,000 promo codes for a specific coupon.

get/coupons/coupon/{couponName}/promo-codes

Query parameters

limitinteger
Example:1000

Maximum number of promo codes to return.

pageinteger
Example:1

Page number to retrieve.

sortDirection'asc' | 'desc'
Example:desc

Sort direction of results by createdAt.

isActiveboolean
Example:true

Filter by active status.

Response

Promo codes retrieved successfully.

totalCountinteger

Total number of promo codes matching the query.

totalPagesinteger

Total number of pages matching the query.

hasNextPageboolean

Whether there is an additional page of results.

pageinteger

Current page number.

limitinteger

Maximum number of promo codes per page.

Example response

{
  "promoCodes": [
    {
      "name": "swx1",
      "active": true,
      "maxRedemptions": 50,
      "createdAt": "2025-01-22T15:58:24.116Z",
      "updatedAt": "2025-01-25T08:44:26.668Z",
      "redemptions": 10
    }
  ],
  "totalCount": 42,
  "totalPages": 1,
  "hasNextPage": true,
  "page": 1,
  "limit": 1000
}