Palbase Commerce & Promotions · API
POST
/promotions/rules/{rule_id}/codesCreate single or referral promotion code
Create single or referral promotion code
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" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{}'Responses
201Create single or referral promotion code
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation CreatePromotionCode of commerce's contract.