Products > Pricing Rules > pricingRulesModify
Commerce APIProductsPricing RulespricingRulesModify
pricingRulesModify
POST:pricing_rules.json

Description

Modify one or multiple pricing rules.

Permission bit: "pricing_rules.modify"

Topic: Pricing Rules

Arguments

data: [PricingRuleModify!]!

Main argument for mutations.


ids: [String!]!

List of pricing rule ids. See also: Unique Identifiers

Example: ["pu_EQzGqWoY"]


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

customer_group_id: String

Unique customer group identifier. See also: Unique Identifiers

Example: "cg_EQzGqWoY"

Valid when: customer_group_id matches regexp pattern: ^cg_


date_range: DateRangeCreate


display_price_difference: Boolean

Whether price difference should be displayed when this pricing rule matches


name: String

Name of the pricing rule

Example: "Winter Sale"

Valid when: name is not empty

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


parent_rule_id: String

Unique pricing rule identifier. See also: Unique Identifiers

Example: "pu_EQzGqWoY"

Valid when: parent_rule_id matches regexp pattern: ^pu_


priority: Int

Priority of the rule (rule with higher priority is to be evaluated first)

Example: 0


sales_channel_id: String

Unique sales channel identifier. See also: Unique Identifiers

Example: "sc_EQzGqWoY"

Valid when: sales_channel_id matches regexp pattern: ^sc_


Result

[PricingRule!]

Preview (typescript)

Loading module