Promotions > Coupons > couponsCreate
Commerce APIPromotionsCouponscouponsCreate

couponsCreate

POST:coupons.json

Description

Create one or multiple coupons for a given promotion.

Permission bit: "coupons.create"

Topic: Coupons

Arguments

data: [CouponCreate!]!

Main argument for mutations.


promotion_id: String!

Unique promotion identifier. See also: Unique Identifiers

Example: "pr_EQzGqWoY"


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"

Data Argument Fields

code: String!

A discount code that can be entered by a customer on checkout

Example: "PR100-ASJD-QW15"

Valid when: code matches regexp pattern: ^[a-zA-Z0-9\-]+$

Valid when: code's length doesn't exceed 250 characters

Result

[Coupon!]

Preview

Loading module