POST:inventory_rules.json
Commerce APIPOST:inventory_rules.json

POST:inventory_rules.json

Description

Create one or multiple inventory rules.

Permission bit: "inventory_rules.create"

Topic: Inventory Rules

Query Parameters

shop_id: String, required

Unique shop identifier. See also: Unique Identifiers

Example: ?shop_id=sh_EQzGqWoY

Request Body

Array of InventoryRuleCreate

[
  {
    "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