Coupons

List used coupons

GET
/v1/coupons

One row per normalized coupon code used in the store's invoiced orders of the period. Codes are normalized per platform (trimmed and upper-cased; on Tray, the part before /), so BemVindo10 and BEMVINDO10 are one coupon. VTEX, Shopify and Tray carry coupons; other platforms answer an empty list. The discount is the whole order's discount, not only the coupon's share. Responses are cached for 30 minutes.

Authorization

ClientIdAuthClientSecretAuth
headerx-client-id<token>

Client ID

headerx-client-secret<token>

Client secret

Query Parameters

organizationId*string

Organization that owns the store.

Formatuuid
integrationId*string

Store identifier: the sourceIntegrationId returned by GET /v1/products/integrations (a UUID or a <channel>:<identifier> store key).

dateFrom?string

First day of the period (inclusive), YYYY-MM-DD. Without dateFrom and dateTo the period is the current month, from its first day to today in the America/Sao_Paulo calendar. Only dateTo: from the first day of its month. Only dateFrom: until today. The rules apply to the resulting period, so a lone date is held to them too: neither date may be in the future, dateFrom must be on or before dateTo, and the period spans at most 365 days (a lone dateFrom at most 365 days before today). Otherwise 400.

Formatdate
dateTo?string

Last day of the period (inclusive), YYYY-MM-DD. Cannot be in the future (today in the America/Sao_Paulo calendar is the latest accepted day), also when sent alone; the period spans at most 365 days. Otherwise 400.

Formatdate
search?string

Case-insensitive substring match on the normalized coupon code.

Lengthlength <= 120
minOrders?number

Inclusive lower bound on orders (orders that used the coupon). Must not exceed the matching max when both are sent. Applies to data, totals (except totalOrders and periodCouponOrders) and pagination.

Range0 <= value
maxOrders?number

Inclusive upper bound on orders (orders that used the coupon).

Range0 <= value
minUnits?number

Inclusive lower bound on units (net units of those orders). Must not exceed the matching max when both are sent. Applies to data, totals (except totalOrders and periodCouponOrders) and pagination.

Range0 <= value
maxUnits?number

Inclusive upper bound on units (net units of those orders).

Range0 <= value
minNetRevenue?number

Inclusive lower bound on netRevenue (net revenue of those orders). Must not exceed the matching max when both are sent. Applies to data, totals (except totalOrders and periodCouponOrders) and pagination.

Range0 <= value
maxNetRevenue?number

Inclusive upper bound on netRevenue (net revenue of those orders).

Range0 <= value
minDiscountValue?number

Inclusive lower bound on discountValue (order discount of those orders). Must not exceed the matching max when both are sent. Applies to data, totals (except totalOrders and periodCouponOrders) and pagination.

Range0 <= value
maxDiscountValue?number

Inclusive upper bound on discountValue (order discount of those orders).

Range0 <= value
sortBy?string

Sort field. Nulls sort last in both directions; ties are broken by couponCode ascending.

Default"orders"
Value in"couponCode""orders""units""grossValue""discountValue""netRevenue""averageTicket""discountRate"
sortOrder?string
Default"desc"
Value in"asc""desc"
page?integer
Range1 <= value <= 10000
Default1
pageSize?integer
Range1 <= value <= 100
Default25

Response Body

Paginated coupon rows with totals

application/json
  1. response
data*array<>
totals*
period*

Period actually applied, after defaults.

asOf*|

Freshness of the period's data: the older of the latest sales refresh and the latest coupon refresh. null when the period has no order.

Formatdate-time
pagination*
curl -X GET "https://example.com/v1/coupons?organizationId=497f6eca-6276-4993-bfeb-53cbbbba6f08&integrationId=string"
{  "data": [    {      "couponCode": "BEMVINDO10",      "orders": 120,      "units": 310,      "grossValue": 25000.5,      "discountValue": 2500,      "netRevenue": 22500.5,      "averageTicket": 187.5,      "discountRate": 0.1,      "shareOfCouponOrders": 0.25    }  ],  "totals": {    "coupons": 14,    "couponOrders": 480,    "totalOrders": 3200,    "periodCouponOrders": 512,    "units": 1200,    "grossValue": 98000,    "discountValue": 9100,    "netRevenue": 88900  },  "period": {    "from": "2026-10-01",    "to": "2026-10-28"  },  "asOf": "2026-10-28T06:00:00.000Z",  "pagination": {    "page": 1,    "pageSize": 25,    "total": 14,    "totalPages": 1  }}