Skip to Content
API ReferencePromotions

Retrieve promotion usage

Count the completed orders that used a promotion and list the latest ones.

Find out how many completed orders used a promotion, across all of its phases, and get the IDs of the 10 most recent ones to open with the orders API. A promotion nobody has used returns uses: 0 and an empty recent_order_ids, not an error.

GET
/v2/promotions/{promotion}/usage

Authorization

headerAuthorizationBearer <API Key>

Provide your SellApp API key as a bearer token.

Path Parameters

promotion*integer

The promotion ID.

Query Parameters

with_trashed?boolean

Set to true to also find a deleted promotion.

Defaultfalse
only_trashed?boolean

Set to true to find only a deleted promotion. Ignored when with_trashed is true.

Defaultfalse

Header Parameters

X-STORE?string

Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.

Response Body

Successful response.

application/json
  1. response
data*
Example Request
curl -X GET 'https://sell.app/api/v2/promotions/30/usage' \  -H 'X-STORE: launch-lab'

used

{  "data": {    "promotion_id": 30,    "uses": 3,    "recent_order_ids": [      9182,      9175,      9160    ]  }}

unused

{  "data": {    "promotion_id": 30,    "uses": 0,    "recent_order_ids": []  }}