API version: unstable
API version: 2021-07 Release candidate
API version: 2021-04 Latest
API version: 2021-01
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

PriceRule object

Version unstable

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version unstable

An auto-generated type for paginating through multiple PriceRules.

Fields

Types that return PriceRule

Mutations for PriceRule

Version unstable

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRule

Mutations for PriceRule

Version 2021-07 (Release candidate)

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2021-07 (Release candidate)

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2021-07 (Release candidate)

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2021-04 (Latest)

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2021-04 (Latest)

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2021-04 (Latest)

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2021-01

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2021-01

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2021-01

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2020-10

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2020-10

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2020-10

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2020-07

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2020-07

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2020-07

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2020-04

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2020-04

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2020-04

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2020-01 (Unsupported)

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2020-01 (Unsupported)

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2020-01 (Unsupported)

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2019-10 (Unsupported)

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2019-10 (Unsupported)

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2019-10 (Unsupported)

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2019-07 (Unsupported)

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2019-07 (Unsupported)

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2019-07 (Unsupported)

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Version 2019-04 (Unsupported)

Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply.

Required access

read_price_rules access scope.

Connections

  • List of the price rule's discount codes.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • times_used

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    savedSearchId ( ID )

    ID of an existing saved search. The search’s query string is used as the query argument.

    sortKey ( DiscountCodeSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

  • events (EventConnection!)

    The paginated list of events associated with the price rule.

    Argument Description
    after ( String )

    Returns the elements that come after the specified cursor.

    before ( String )

    Returns the elements that come before the specified cursor.

    first ( Int )

    Returns up to the first n elements from the list.

    last ( Int )

    Returns up to the last n elements from the list.

    query ( String )

    Supported filter parameters:

    • comments
    • created_at
    • subject_type
    • verb

    See the detailed search syntax for more information about using filters.

    reverse ( Boolean )

    Reverse the order of the underlying list.
    Default value: false

    sortKey ( EventSortKeys )

    Sort the underlying list by the given key.
    Default value: ID

Fields

  • allocationLimit (Int)

    The maximum number of times that the price rule can be allocated onto an order.

  • allocationMethod (PriceRuleAllocationMethod!)

    The method by which the price rule's value is allocated to its entitled items.

  • app (App)

    The application that created the price rule.

  • createdAt (DateTime!)

    The date and time when the price rule was created.

  • customerSelection (PriceRuleCustomerSelection!)

    The customers that can use this price rule.

  • discountCodesCount (Int!)

    How many discount codes associated with the price rule.

  • endsAt (DateTime)

    The date and time when the price rule ends. For open-ended price rules, use null.

  • A list of the price rule's features.

  • hasTimelineComment (Boolean!)

    Indicates whether there are any timeline comments on the price rule.

  • id (ID!)

    Globally unique identifier.

  • itemEntitlements (PriceRuleItemEntitlements!)

    The items to which the price rule applies.

  • itemPrerequisites (PriceRuleLineItemPrerequisites!)

    The items required for the price rule to be applicable.

  • legacyResourceId (UnsignedInt64!)

    The ID of the corresponding resource in the REST Admin API.

  • oncePerCustomer (Boolean!)

    Whether the price rule can be applied only once per customer.

  • prerequisiteQuantityRange (PriceRuleQuantityRange)

    The number of the entitled items must fall within this range for the price rule to be applicable.

  • prerequisiteShippingPriceRange (PriceRuleMoneyRange)

    The shipping cost must fall within this range for the price rule to be applicable.

  • prerequisiteSubtotalRange (PriceRuleMoneyRange)

    The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable.

  • prerequisiteToEntitlementQuantityRatio (PriceRulePrerequisiteToEntitlementQuantityRatio)

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

  • shareableUrls ([PriceRuleShareableUrl!]!)

    URLs that can be used to share the discount.

  • shippingEntitlements (PriceRuleShippingLineEntitlements!)

    The shipping lines to which the price rule applies.

  • startsAt (DateTime!)

    The date and time when the price rule starts.

  • status (PriceRuleStatus!)

    The status of the price rule.

  • summary (String)

    A detailed summary of the price rule.

  • target (PriceRuleTarget!)

    The type of lines (line_item or shipping_line) to which the price rule applies.

  • title (String!)

    The title of the price rule.

  • totalSales (MoneyV2)

    The total sales from orders where the price rule was used.

  • usageCount (Int!)

    The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count.

  • usageLimit (Int)

    The maximum number of times that the price rule can be used in total.

  • validityPeriod (PriceRuleValidityPeriod!)

    A time period during which a price rule is applicable.

  • valueV2 (PricingValue!)

    The value of the price rule.

Types that return PriceRule

Mutations for PriceRule

Implements

Deprecated fields

  • entitlementToPrerequisiteQuantityRatio (PriceRuleEntitlementToPrerequisiteQuantityRatio) deprecated

    Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items.

    Deprecation warning

    Use prerequisiteToEntitlementQuantityRatio instead

  • traits ([PriceRuleTrait!]!) deprecated

    A list of the price rule's features.

    Deprecation warning

    Use features instead

  • value (PriceRuleValue!) deprecated

    The value of the price rule.

    Deprecation warning

    Use valueV2 instead

Version 2019-04 (Unsupported)

An auto-generated type for paginating through multiple PriceRules.

On this page

Fields

Version 2019-04 (Unsupported)

An auto-generated type which holds one PriceRule and a cursor during pagination.

Fields

  • cursor (String!)

    A cursor for use in pagination.

  • node (PriceRule!)

    The item at the end of PriceRuleEdge.

Types that return PriceRuleEdge

Samples