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
header
AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
promotion*integerThe promotion ID.
with_trashed?booleanSet to true to also find a deleted promotion.
Default
falseonly_trashed?booleanSet to true to find only a deleted promotion. Ignored when with_trashed is true.
Default
falseX-STORE?stringStore 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.
Successful response.
application/json- response
data*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": [] }}