Create a promotion
Creates a new promotion. code is required for single-code coupon promotions;
pass multi_codes: true with number_of_codes to auto-generate a batch.
Rules and actions can be created in the same request by passing arrays of
{ type, preferences, ... } rows. The server reconciles to the desired set:
new rows are built, existing rows (by id) are updated, omitted rows are removed.
Required scope: write_promotions (for API-key authentication).
Authorizations
Secret API key for admin access
JWT token for admin user authentication
Body
Required for single-code coupon promotions. Ignored when multi_codes is true.
all, any coupon_code needs a code (or multi_codes); automatic applies without one.
coupon_code, automatic Generates number_of_codes codes starting with code_prefix.
The rules the promotion should have: entries with id update, entries without are created, and rules left out are removed.
The actions the promotion should have, matched the same way as rules.
Response
promotion created with rules and actions

