Paycose Docs
Coupon
GET/coupons/{coupon_id}/promotion_codes

List Promotion Codes by Coupon

Convenience endpoint — identical semantics to GET /promotion_codes?filter[coupon_id]=<id>, but pins the coupon scope to the path. Pagination (limit, page), sort, and search (q) query params are accepted.

Requires: Bearer token, X-Country header.

Request

Example

curl -X GET 'https://api.paycose.com/api/v1/app1/platform/wallet/coupons/{{coupon_id}}/promotion_codes?limit=10&page=1&use-cursor=true&starting_after=&ending_before=&sort=created_at:desc&q=&filter[active]=&filter[code]=&filter[created_at]=&filter[customer_id]=&filter[id]=&filter[labels]=&filter[updated_at]=' \
  -H 'X-Session-Token: {{session_token}}' \
  -H 'X-Country: {{country}}' \
  -H 'X-Test-Mode: {{x_test_mode}}'

Headers

NameValueDescription
X-Session-Token{{session_token}}
X-Country{{country}}
X-Test-Mode{{x_test_mode}}true=wallet_test, false=wallet_live (default). Toggle the x_test_mode collection variable to flip every applicable request.

Responses

200200 OK

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "list",
  "data": [
    {
      "id": null,
      "object": "<string>",
      "livemode": false,
      "created_at": null,
      "updated_at": null,
      "coupon": "<string>",
      "code": "<string>",
      "active": false,
      "quota_used": 0,
      "quota_limit": 0,
      "expires_at": "<RFC3339 timestamp>",
      "first_time_transaction": false,
      "customer": "<string>",
      "minimum_amount": 0,
      "minimum_amount_currency": "<string>",
      "metadata": "<datatypes.JSON>",
      "labels": "<core.Labels>"
    }
  ],
  "page": 1,
  "limit": 10,
  "total_items": 1,
  "total_pages": 1
}

On this page