Commet
  • Pricing
Log InTry out
Create promo code POSTGet promo code GETList promo codes GETUpdate promo code PUT
System status
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

List promo codes

List promo codes with cursor-based pagination.

GET
/promo-codes

List promo codes with cursor-based pagination.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Query Parameters

limit?integer
Range0 < value <= 9007199254740991
cursor?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/promo-codes"
{  "success": true,  "data": [    {      "id": "string",      "code": "string",      "discountType": "percentage",      "discountValue": -9007199254740991,      "durationCycles": -9007199254740991,      "billingInterval": "weekly",      "maxRedemptions": -9007199254740991,      "expiresAt": "2019-08-24T14:15:22Z",      "isActive": true,      "redemptionCount": -9007199254740991,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "object": "promo_code",      "livemode": true    }  ],  "hasMore": true,  "nextCursor": "string"}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Get promo code GET

Retrieve a promo code by its public ID.

Update promo code PUT

Update a promo code's billing interval, redemption limits, expiration, active status, or plan restrictions.