You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference/promotions.v3.yml
+113-4Lines changed: 113 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -88,13 +88,13 @@ paths:
88
88
responses:
89
89
'201':
90
90
$ref: '#/components/responses/PromotionsResponse'
91
-
'400':
91
+
'400':
92
92
description: The request payload was invalid.
93
93
content:
94
94
application/json:
95
95
schema:
96
96
$ref: '#/components/schemas/ErrorResponse400'
97
-
'403':
97
+
'403':
98
98
description: The request payload was invalid.
99
99
content:
100
100
application/json:
@@ -195,6 +195,74 @@ paths:
195
195
'204':
196
196
description: The deletion was successful or the specified resource does not exist.
197
197
content: {}
198
+
199
+
'/promotions/{promotion_id}/codegen':
200
+
post:
201
+
tags:
202
+
- Coupon Codes (Bulk)
203
+
summary: Generate Bulk Coupon Codes
204
+
description: |-
205
+
Generate a batch of coupon codes for a particular bulk coupon promotion.
206
+
207
+
**Note:**
208
+
* batch_size is limited to 250 codes per request for first version. If batch_size is not an integer or larger than 250, it will return a 400 error code.
209
+
* The default rate limit for this endpoint is 40 concurrent requests.
210
+
operationId: generatePromotionCodesBatch
211
+
parameters:
212
+
- $ref: '#/components/parameters/ContentType'
213
+
- $ref: '#/components/parameters/Accept'
214
+
- $ref: '#/components/parameters/PromotionIdPath'
215
+
requestBody:
216
+
content:
217
+
application/json:
218
+
schema:
219
+
required:
220
+
- batch_size
221
+
type: object
222
+
properties:
223
+
prefix:
224
+
type: string
225
+
description: A prefix to add to the generated codes.
226
+
example: 'PROMO'
227
+
suffix:
228
+
type: string
229
+
description: A suffix to add to the generated codes.
230
+
example: '2025'
231
+
batch_size:
232
+
type: integer
233
+
description: The number of coupon codes to generate in each batch. The maximum value is 250.
234
+
example: 5
235
+
max_uses:
236
+
type: integer
237
+
description: The maximum number of times each coupon code can be used. The default value is 0, which represents unlimited uses.
238
+
example: 10
239
+
max_uses_per_customer:
240
+
type: integer
241
+
description: The maximum number of times a specific customer can use each coupon code. The default value is 0, which represents unlimited uses.
0 commit comments