---
title: "List a project's coupons"
method: GET
path: "/v1/projects/{project}/coupons"
tags: ["Coupons"]
---

# List a project's coupons

`GET /v1/projects/{project}/coupons`

## Request

- Base URL: `https://api.subscriby.net`
- URL: `https://api.subscriby.net/v1/projects/{project}/coupons`
- Auth: HTTP bearer

```bash
curl "https://api.subscriby.net/v1/projects/7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13/coupons?active=true&per_page=25&page=1" \
  -H "Authorization: Bearer sbt_..."
```

Pages the project's coupons, newest first. `active` filters on the creator's on/off switch only; `code` finds one exact code.

> `active=true` is not the same as redeemable. A coupon can be switched on and still not apply: outside its window, fully claimed, or capped for that subscriber. Read `redeemable` on each row for the combined answer.

## Path parameters

- `project` string, uuid, required

## Query parameters

- `active` boolean
- `code` string
- `page` integer
- `per_page` integer
- `sort_by` string
- `sort_direction` 'asc' | 'desc'

## Response `200`

The page.

- object
  - `data` CouponResource[], required: The items on this page.
    - `id` string, required: The coupon's id.
    - `project_id` string, required: The project the coupon belongs to; codes are unique within a project, not across projects.
    - `code` string, required: The code subscribers type at checkout, stored and matched in upper case.
    - `name` string, required: A creator-facing label, never shown to subscribers.
    - `discount` object, required: What comes off the price.
      - `type` string, required: `percentage` or `fixed`.
      - `value` string, required: A decimal string with four places: `"25.0000"` for 25% off, `"10.0000"` for ten of the coupon's currency. Parse it as a decimal, never a float.
      - `currency_id` string, nullable, required: The currency a `fixed` discount is denominated in; null on a `percentage` coupon, which applies to a plan in any currency.
      - `currency` string, nullable: That currency's ISO 4217 code, present only when the relation is loaded: on a single read, a create and an update, not on every list row.
    - `duration` string, required: Always `once`: only first-payment discounts exist today.
    - `limits` object, required: How often and on what the code may be used.
      - `max_redemptions` integer, nullable, required: The total cap across everyone; null for unlimited.
      - `max_redemptions_per_user` integer, required: How many times one member may redeem the code.
      - `minimum_amount` string, nullable, required: The order floor, in the plan's own currency; null for none.
    - `redemptions` object, required: How far the cap has been used.
      - `count` integer, required: Settled redemptions so far.
      - `remaining` integer, nullable, required: Derived, not stored: the cap minus settled redemptions and reservations whose hold has not expired, so an in-flight checkout is already counted and an abandoned one gives its slot back. Prefer it over your own subtraction, which will disagree. Null when uncapped.
      - `exhausted` boolean, required: Whether nothing remains under the cap.
    - `window` object, required: When the code can be redeemed.
      - `starts_at` string, nullable, required: When redemption opens, ISO 8601; null for immediately.
      - `expires_at` string, nullable, required: When redemption closes, ISO 8601; null for never.
    - `plan_ids` object, required: The plans the code is restricted to. An empty array means **every** plan in the project, including plans added later, not no plans.
    - `active` boolean, required: The creator's on/off switch. Not the same as redeemable.
    - `redeemable` boolean, required: The combined answer: switched on, inside its window, not exhausted. Read this rather than `active` to know whether the code applies right now.
    - `created_at` string, nullable, required: When the coupon was created, ISO 8601.
    - `updated_at` string, nullable, required: When it last changed, ISO 8601.
  - `links` object, required: Links to the first, last, previous and next pages.
    - `first` string, nullable, required: The first page's URL.
    - `last` string, nullable, required: The last page's URL.
    - `prev` string, nullable, required: The previous page's URL; null on the first page.
    - `next` string, nullable, required: The next page's URL; null on the last page.
  - `meta` object, required: The paging counters for this page.
    - `current_page` integer, required: The page returned, 1-indexed.
    - `from` integer, nullable, required: The 1-indexed position of this page's first item across every page; null when the page is empty.
    - `last_page` integer, required: How many pages there are.
    - `links` object[], required: Generated paginator links.
      - `url` string, nullable, required: The page's URL; null for the ellipsis and the disabled arrows.
      - `label` string, required: The link's label: a page number, the previous or next arrow, or an ellipsis.
      - `active` boolean, required: Whether this link is the current page.
    - `path` string, nullable, required: Base path for paginator generated URLs.
    - `per_page` integer, required: Number of items shown per page.
    - `to` integer, nullable, required: Number of the last item in the slice.
    - `total` integer, required: Total number of items being paginated.

## Other responses

- `401`: `AUTHENTICATION_REQUIRED`: the request carries no bearer token, or one that is revoked, malformed, or minted for another environment (an `sbt_test_` token on production).
- `403`: `TOKEN_MISSING_ABILITY`: the token is valid but does not carry the ability this endpoint requires; `error.context.required_ability` names the one to grant. An endpoint that also checks who owns a row or which tier the account is on answers `FORBIDDEN`, `TEAM_TIER_REQUIRED` or `CONNECTOR_TIER_REQUIRED` with the same status, and says so in its own description.
- `404`: `RESOURCE_NOT_FOUND`: an id in the path names nothing the token can see. `TENANT_MISMATCH`: the project sits outside the token's `scope:project:` allow-list, or the token carries no team scope. Both answer 404 rather than 403 so that existence outside the token's scope cannot be inferred.
- `429`: `RATE_LIMITED`: the token has spent its 300 requests a minute or 10,000 an hour; `Retry-After` says when the next one is accepted.

---

[API](https://skmtc.dev/memberpass/apis/subscriby-rest-api.md) · [All operations](https://skmtc.dev/memberpass/apis/subscriby-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memberpass/apis/subscriby-rest-api/revisions/59c4df91d764?raw)
