Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Query Coupons

Query for coupons with pagination and filters. Max 100 coupons will be returned per request.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Coupons permission scope.

POST

https://www.wixapis.com/stores/v2/coupons/query

Body Params

NAME
TYPE
DESCRIPTION
query

object

Response Object

NAME
TYPE
DESCRIPTION
coupons

Array<object>

returned coupons

totalResults

integer

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl 'https://www.wixapis.com/stores/v2/coupons/query' \
2 --data-binary '{
3 "query": {
4 "sort": "[{\"dateCreated\": \"asc\"}]"
5 }
6 }' \
7 -H 'Content-Type: application/json' \
8 -H 'Authorization: <AUTH>'

Response

json

1
2{
3 "coupons": [
4 {
5 "id": "c5656e10-00a5-4766-99e1-d215d9f2ced7",
6 "specification": {
7 "name": "officia-pariatur",
8 "code": "WUNYJ",
9 "startTime": "1557689091957",
10 "expirationTime": "1557689091958",
11 "limitedToOneItem": false,
12 "active": true,
13 "scope": {"namespace": "stores"},
14 "moneyOffAmount": 123,
15 "type": "MoneyOff"
16 },
17 "dateCreated": "1574772439003",
18 "expired": true
19 },
20 {
21 "id": "419403ac-2e1e-49fb-be55-022f0f1c3848",
22 "specification": {
23 "name": "officia-pariatur",
24 "code": "WUNYI",
25 "startTime": "1557689091957",
26 "expirationTime": "1557689091958",
27 "limitedToOneItem": false,
28 "active": true,
29 "freeShipping": true,
30 "type": "FreeShipping"
31 },
32 "dateCreated": "1574772347627",
33 "expired": true
34 },
35 {
36 "id": "64d637d8-0ddb-426d-b6fd-cbadd8069374",
37 "specification": {
38 "name": "AAA",
39 "code": "AAA",
40 "startTime": "1558900675028",
41 "limitedToOneItem": true,
42 "active": true,
43 "scope": {
44 "namespace": "bookings",
45 "group": {
46 "name": "service",
47 "entityId": "df47adc9-d5cc-4cc4-8c83-304e2ebb5492"
48 }
49 },
50 "moneyOffAmount": 1,
51 "type": "MoneyOff"
52 },
53 "dateCreated": "1558900687419",
54 "displayData": {
55 "name": "my service",
56 "formattedPrice": "5"
57 }
58 },
59 {
60 "id": "18a6259a-3121-454e-a707-84356e567666",
61 "specification": {
62 "name": "BuyXGetY",
63 "code": "ABCD",
64 "startTime": "1557689091957",
65 "expirationTime": "1557689091958",
66 "usageLimit": 10,
67 "limitedToOneItem": true,
68 "active": true,
69 "scope": {"namespace": "stores"},
70 "buyXGetY": {
71 "x": 3,
72 "y": 2
73 },
74 "type": "BuyXGetY"
75 },
76 "dateCreated": "1557689237798",
77 "expired": true
78 },
79 {
80 "id": "9fad9c8f-737e-4656-b32c-50319ac11d01",
81 "specification": {
82 "name": "BuyXGetY",
83 "code": "ABC",
84 "startTime": "1554066000000",
85 "expirationTime": "1554325199999",
86 "usageLimit": 10,
87 "limitedToOneItem": true,
88 "active": true,
89 "scope": {"namespace": "stores"},
90 "buyXGetY": {
91 "x": 3,
92 "y": 2
93 },
94 "type": "BuyXGetY"
95 },
96 "dateCreated": "1557659443707",
97 "expired": true
98 },
99 {
100 "id": "c9d162d9-46ff-4fbf-aa10-583bb49aa999",
101 "specification": {
102 "name": "xxxx",
103 "code": "12345",
104 "startTime": "1559163600000",
105 "limitedToOneItem": true,
106 "active": true,
107 "scope": {"namespace": "stores"},
108 "moneyOffAmount": 30,
109 "type": "MoneyOff"
110 },
111 "dateCreated": "1557649176434"
112 },
113 {
114 "id": "5e02a750-2e1f-47ef-b49b-e34d3bb116c0",
115 "specification": {
116 "name": "asdasda",
117 "code": "asdasda",
118 "startTime": "1548346416306",
119 "limitedToOneItem": true,
120 "active": true,
121 "scope": {
122 "namespace": "stores",
123 "group": {
124 "name": "product",
125 "entityId": "3be4b9a7-d0b9-3d22-0e64-03053f3abd16"
126 }
127 },
128 "moneyOffAmount": 3,
129 "type": "MoneyOff"
130 },
131 "dateCreated": "1548346421718"
132 }
133 ],
134 "totalResults": 7
135}