POST:inventory_rules.json
Commerce APIPOST:inventory_rules.json

POST:inventory_rules.json

Description

Modify one or multiple inventory rules.

Permission bit: "inventory_rules.modify"

Topic: Inventory Rules

Query Parameters

ids: Comma-separated array of String, required

List of inventory rule ids. See also: Unique Identifiers

Example: ?ids=ir_EQzGqWoY,ir_EQzGqWoY


shop_id: String, required

Unique shop identifier. See also: Unique Identifiers

Example: ?shop_id=sh_EQzGqWoY

Request Body

Array of InventoryRuleModify

[
  {
    "components": "[]",
    "inventory_strategy": "closest",
    "multiple_locations": true,
    "name": "New York Local Tax",
    "prefer_pickup_location": true,
    "priority": 0,
    "split_bundle_items": false,
    "split_line_items": false,
    "zones": [
      {
        "country": "US",
        "exclude": false,
        "province": "NY",
        "zip_pattern": "40202"
      }
    ]
  }
]

Response Body

Array of InventoryRule

Response Body Type

Loading module