POST:coupons/generate.json
POST:coupons/generate.json
Description
Generate a bunch of coupons at once using various template parameters.
Example mutation
mutation GenerateFiveCoupons($shopID: String!, $promotionID: String!) { couponsGenerate( shop_id: $shopID promotion_id: $promotionID data: { quantity: 5 length: 8 format: numeric prefix: "PROMO-" dash_section_length: 4 } ) }
Example result
PROMO-1286-6703 PROMO-2358-5157 PROMO-7005-0283 PROMO-1247-7714 PROMO-6219-6036
Permission bit: "coupons.create"
Topic: Coupons
Query Parameters
promotion_id: String, required
Unique promotion identifier. See also: Unique Identifiers
Example: ?promotion_id=pr_EQzGqWoY
Unique shop identifier. See also: Unique Identifiers
Example: ?shop_id=sh_EQzGqWoY
Request Body
{ "dash_section_length": 5, "format": "alphabetic", "length": 5, "prefix": "", "quantity": 5, "suffix": "" }