Coupon Codes

List coupon codes with cursor-based pagination

Changed on

Returns coupon code data with cursor-based pagination and optional full-text search via the query parameter.

get/coupon-codes

Request

  • Base URL
    https://api.session.services
  • Auth
    API key in header x-tenant-id

Query parameters

couponId, string

Optional filter to retrieve coupon codes for a specific coupon

Example:cpn_01jps5cgsfzs1ksqaet5hba8ac
teamId, string

Optional filter to retrieve coupon codes created by a specific team

Example:tem_01jqpjksnsen9vprw95et60t2m
active, boolean

Optional filter to retrieve only active or inactive coupon codes

Example:true
query, string

Optional search query to filter coupon codes by name. When provided, search-backed pagination is used.

Example:SUMMER
limit, integer

Maximum number of coupon codes to return per request (1-100, default: 20)

Example:20
cursor, string

Pagination cursor returned by a previous request. Omit on the first request.

Example:eyJpZCI6ImNwY18wMWpwczVjZ3NmenR3N2h4Y3ZyMndmdGsyIn0

Response

OK

object required
codes, CouponCode[] required

Array of codes for the current result set

before, string nullable

Cursor for navigating backward in the result set. Omitted when there are no prior results.

after, string nullable

Cursor for navigating forward in the result set. Omitted when there are no subsequent results.

limit, number required

Maximum number of items to return in each result set

Example response

{
  "codes": [
    {
      "id": "cod_01jps5cgsfzftw7hxcvr2wftk2",
      "createdAt": "2026-12-02T02:43:23.597Z",
      "updatedAt": "2026-12-02T02:43:23.597Z",
      "name": "TEST50",
      "active": true,
      "couponId": "cpn_01jps5cgsfzs1ksqaet5hba8ac"
    }
  ],
  "before": "eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNqIn19",
  "after": "eyJ2ZXJzaW9uIjoxLCJpbnRlbnQiOnsic291cmNlIjoiZGVtbyJ9LCJwb3MiOnsicHJpbWFyeUtleSI6InBybV8wMXM4NTNkIn19",
  "limit": 20
}

Changes

    • breaking

      for the query request parameter limit, the type changed from number to integer

    • warning

      for the query request parameter limit, the max was set to 100.00

    • warning

      for the query request parameter limit, the min was set to 1.00