Shipping > Shipping Rules > shippingRulesCreate
Commerce APIShippingShipping RulesshippingRulesCreate
shippingRulesCreate
POST:shipping_rules.json

Description

Create one or multiple shipping rules.

Permission bit: "shipping_rules.create"

Topic: Shipping Rules

Arguments

data: [ShippingRuleCreate!]!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

conditions: [ShippingRuleConditionCreate!]


group_policy: ShippingRateGroupPolicy

What to do with multiple shipping rate groups


name: String!

Name of the shipping rule

Example: "FedEx everywhere"

Valid when: name is not empty

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


priority: Int

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

Example: 0


zones: [ZoneCreate!]


Result

[ShippingRule!]

Preview (typescript)

Loading module