Skip to main content
POST
/
api
/
public
/
v1
/
promotion-codes
/
list
curl --request POST \
  --url https://app.localhost:3000/api/public/v1/promotion-codes/list \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "promotionId": "promo_123",
  "page": 1,
  "limit": 20
}
'
{
  "items": [
    {
      "id": "pc_123",
      "code": "SUMMER20",
      "promotionId": "promo_123",
      "storeId": "store_123",
      "active": true,
      "usageCount": 5,
      "usageLimit": 100,
      "firstTimeCustomersOnly": false,
      "expiresAt": "2025-08-31T23:59:59.000Z",
      "promotion": {
        "id": "promo_123",
        "name": "Summer Sale",
        "storeId": "store_123"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "totalPages": 1
  }
}

Authorizations

Authorization
string
header
required

Enter your API key as: Bearer your-api-key

Body

application/json
promotionId
string

Filter by promotion ID

storeId
string

Filter by store ID

code
string

Search codes by value (partial match)

customerId
string

Filter by customer ID

includeInactive
boolean
default:false

Include inactive promotion codes in results

page
number
default:1

Page number (1-indexed)

limit
number
default:20

Number of items per page

Response

Successful response

items
object[]
pagination
object