Palbase Commerce & Promotions · API
POST
/promotions/rules/{rule_id}/codes/batchGenerate batch of single-use promotion codes
Generate batch of single-use promotion codes
Called by your server, with the project's secret key.
Path
rule_idstring · requiredPath parameter rule_id.curl
curl -X POST "https://<your-ref>.palbase.studio/promotions/rules/<rule_id>/codes/batch" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{}'Responses
201Generate batch of single-use promotion codes
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation GeneratePromotionCodeBatch of commerce's contract.