Coupons

Retrieve a single coupon pool by its identifier — the list rows' inventory and health, plus usage_count, the connected store's pool-wide redemption counter read live. Privy tracks no redemption events, so there is no per-code breakdown here; check an individual code with GET /v1/coupons/{id}/codes/{code}.

Required scope: coupons_read

get/coupons/{id}

Request

  • Base URL
    https://api.privy.com/v1
  • Auth
    HTTP bearer

Path parameters

idstring required

The coupon pool's unique identifier (returned as id in coupon responses). Ids are opaque public strings — a numeric id from a Privy dashboard URL is not a valid API id and will 404; list coupons and match by title instead.

Headers

Privy-Account-Idstring

Target a subaccount instead of the main connected account. Pass a subaccount id from get_account's subaccounts list. Only direct subaccounts of the connected account are reachable — omit this for the main account itself.

Response

The coupon pool.

Example response

{
  "data": {
    "id": "Xk2fW9qLpV",
    "title": "Welcome 10%",
    "master_code": "SAVE20",
    "prefix_code": "VIP",
    "coupon_codes_remaining": 4,
    "coupon_codes_issued": 4210,
    "attached_to": {
      "displays": [
        {
          "id": "gk2P8Zw1Lq",
          "title": "Summer Sale Popup"
        }
      ],
      "campaigns": [
        {
          "id": "Nw8K2rT5xY",
          "title": "June Restock Announcement"
        }
      ]
    },
    "usage_count": 12
  }
}

Changes

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • info

      endpoint added