Skip to content

Generate purchase codes in bulk

POST
/pcode/bulk
curl --request POST \
--url https://partner-pcode-dev.tsp.workers.dev/api/partner/v1/pcode/bulk \
--header 'Content-Type: application/json' \
--header 'x-gw: <x-gw>' \
--data '{ "productCode": "FV00", "quantity": 1 }'

Up to 500 per request. All of them share the same batchId, useful for reviewing them later as a group with GET /pcodes?batch_id=.

Media typeapplication/json
object
productCode
required
string
Allowed values: FV00 FV01 FV02 FV03
quantity
required
integer
>= 1 <= 500

Batch created.

Media typeapplication/json
object
success
boolean
data
object
batchId
string
pcodes
Array<string>
Example
{
"success": true
}

Invalid productCode or quantity, or the partner doesn’t have that product enabled (partner_config.allowed_products).

Invalid API Key.

Rate limit exceeded.