Types > PromotionCreate
Commerce APITypesPromotionCreate
PromotionCreate

Description

Topic: Promotions

Fields

add_quantity: Int

When promotion is applied to order, add this many of add_variant_id to line items

Example: 1

Valid when: add_quantity is a non-negative integer


add_variant_id: String

Variant id to add to line items of an order when promotion is used

Example: "va_EQzGqWoY"

Valid when: add_variant_id matches regexp pattern: ^va_


auto_apply: Boolean

Automatically apply this promotion

Example: false


currency: String

Currency code used for all order-related prices defined in the promotion

Example: "USD"


enabled: Boolean

Whether this promotion is active or not

Example: false


ends_at: String

The date and time when the promotion will end

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


max_uses_per_coupon: Int

The maximum number of times a promotion may apply to orders

Example: 1

Valid when: max_uses_per_coupon is a non-negative integer


max_uses_per_customer: Int

The maximum number of uses per-customer

Example: 1

Valid when: max_uses_per_customer is a non-negative integer


max_uses_per_order: Int

The maximum number of uses per order

Example: 5

Valid when: max_uses_per_order is a non-negative integer


name: String!

Name of the promotion

Valid when: name is not empty

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


priority: Int

Priority when automatically applying promotions, higher number takes precedence

Example: 5


rules: [PromotionRuleCreate!]

Possible parameters for this promotion


starts_at: String

The date and time when the promotion starts at

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


Used By

Mutations

promotionsCreate

Preview (typescript)

Loading module