v8

OpenAPI 3.1.02026-08-033623795.0 MB
Promo codes

List promo codes

Returns a paginated list of promo codes belonging to a company, with optional filtering by product, plan, and status.

Required permissions:

  • promo_code:basic:read
  • access_pass:basic:read
get/promo_codes

Query parameters

afterstring nullable

Returns the elements in the list that come after the specified cursor.

beforestring nullable

Returns the elements in the list that come before the specified cursor.

firstinteger nullable

Returns the first n elements from the list.

Example:42
lastinteger nullable

Returns the last n elements from the list.

Example:42
company_idstring required

The unique identifier of the company to list promo codes for.

Example:biz_xxxxxxxxxxxxxx
product_idsstring[] nullable

Filter to only promo codes scoped to these product identifiers.

plan_idsstring[] nullable

Filter to only promo codes scoped to these plan identifiers.

status'active' | 'inactive' | 'archived'

Statuses for promo codes

created_beforestring date-time nullable

Only return promo codes created before this timestamp.

Example:2023-12-01T05:00:00.401Z
created_afterstring date-time nullable

Only return promo codes created after this timestamp.

Example:2023-12-01T05:00:00.401Z

Response

A successful response

Example response

{
  "data": [
    {
      "amount_off": 6.9,
      "created_at": "2023-12-01T05:00:00.401Z",
      "expires_at": "2023-12-01T05:00:00.401Z",
      "id": "promo_xxxxxxxxxxxx",
      "product": {
        "id": "prod_xxxxxxxxxxxxx",
        "title": "Pickaxe Analytics"
      },
      "promo_duration_months": 42,
      "stock": 42,
      "uses": 42
    }
  ]
}