Create a promo code for a programme
POST/api/v1/programs/:programId/promo-codes
Create a promo code for a programme
Request
Responses
- 201
- 400
- 403
- 404
- 409
- 422
- 500
- 502
Promo code created
Validation error or past expiry date
Partner not approved
Programme or participant not found
PROMO_CODE_DUPLICATE (code already exists in this programme, all rows) or PROMO_CODE_TAKEN_IN_WORKSPACE (a live-or-reserved code with the same string exists in another of the merchant programmes in the same mode — spec #049, kernel I-15h)
STRIPE_CONNECTION_REQUIRED (discount code with no Stripe connection for the programme mode) or STRIPE_REJECTED (Stripe rejected the discount configuration — non-retryable)
PROMO_CODE_FINALISE_FAILED (spec #049): the Stripe Promotion Code was created but promoting the local reservation to synced/active failed; the reservation was rolled back and the Stripe code deactivated — safe to retry
STRIPE_SYNC_FAILED: a transient Stripe error (outage / rate limit) while syncing a discount code — safe to retry