Skip to content

Bulk add voucher codes

POST
/shops/{id}/vouchers/batches/{batch_id}/codes
curl --request POST \
--url https://example.com/shops/example/vouchers/batches/example/codes \
--header 'Content-Type: application/json' \
--data '[ { "code": "example", "link": "example" } ]'

Add voucher codes to a batch in bulk. Accepts an array of { code, link? } objects. A plain array of code strings is also accepted but deprecated — migrate to the object form, which lets you attach a per-code link. The response echoes the shape you sent.

id
required
string
batch_id
required
string
Media typeapplication/json
Any of:
Array<object>
object
code
required
string
link
Any of:
Any of:
string
Examplegenerated
[
{
"code": "example",
"link": "example"
}
]