Skip to content

Batch create promo code definitions

Request

Create up to 50 promo code definitions in one request. Definitions are saved in the draft status, and no actual codes are generated yet.

Only include recognized fields, unknown fields will be rejected. We validate everything before saving, so all valid items succeed together or none do. You will only see failed items in the response.

When ready, use the status-update endpoint to activate your definitions and generate the actual promo codes.

Security
ZephrHmacHttp
Bodyapplication/jsonrequired
promo_code_definitionsArray of objects, [ 1 .. 50 ] items(batch-promo-code-definition-item)required

Your list of promo code definitions. You can include 1 to 50 codes.

{ "promo_code_definitions": [ { … }, { … } ] }

Responses

OK. Your request is being processed. Review the response to see which items completed and which need attention.

Headers
any
Bodyapplication/json
messagestringrequired

Human-readable summary of the batch result.

Example:"2 promo code definitions created successfully"
failuresArray of objects(promo-code-definition-batch-item-failure)required

Details about why each item failed. Items not listed here were processed successfully.

Response
{ "message": "2 promo codes have been created successfully.", "failures": [] }