Types > Promotion
Commerce APITypesPromotion
Promotion

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


add_variant: ProductVariant

This product variant will be added to the order when promotion triggers

Expandable

Permission bit: "product_variants.read"


auto_apply: Boolean!

Automatically apply this promotion

Example: false


created_at: String!

The date and time when the promotion was created

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

Timestamp (RFC 3339)


currency: String!

Currency code

Example: "USD"


enabled: Boolean!

Whether this promotion is active or not

Example: false


ended: Boolean!

Whether promotion is ended based on server time

Example: false


ends_at: String

The date and time when the promotion will end

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

Timestamp (RFC 3339)


id: String!

Unique promotion identifier. See also: Unique Identifiers

Example: "pr_EQzGqWoY"


max_uses_per_coupon: Int

The maximum number of times a promotion may apply to orders

Example: 1


max_uses_per_customer: Int

The maximum number of uses per-customer

Example: 1


max_uses_per_order: Int

The maximum number of uses per order

Example: 5


name: String!

Name of the promotion

Translatable


priority: Int!

Priority when automatically applying promotions, higher number takes precedence

Example: 5


rules: [PromotionRule!]!

Possible parameters for this promotion


started: Boolean!

Whether promotion is started based on server time

Example: false


starts_at: String!

The date and time when the promotion starts at

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

Timestamp (RFC 3339)


times_used: Int!

Total number of times this promotion was used by all customers

Example: 0


updated_at: String!

The date and time when the promotion was updated

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

Timestamp (RFC 3339)


Used By

Mutations

promotionsCreate, promotionsModify

Queries

promotions

Types

Order, PromotionExpandableItems, PromotionPage, PromotionSearchResult, UnifiedSearchResult

Preview (typescript)

Loading module