warehouse.create
Create a warehouse: a stock location and a ship-from origin, with its routing priority and its overselling policy. Creating it as the default moves the flag off the current one, atomically.
- Scope:
inventory.adjust - System: no
- Reachable from:
POST /v1/commands/warehouse.create(tenant credential) · MCP toolwarehouse.create· SDKclient.call('warehouse.create', …) - Events:
warehouse.created
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "active": { "type": "boolean" }, "addr_line1": { "anyOf": [ { "maxLength": 200, "type": "string" }, { "type": "null" } ] }, "addr_line2": { "anyOf": [ { "maxLength": 200, "type": "string" }, { "type": "null" } ] }, "city": { "anyOf": [ { "maxLength": 120, "type": "string" }, { "type": "null" } ] }, "country_code": { "maxLength": 2, "minLength": 2, "type": "string" }, "is_default": { "type": "boolean" }, "kind": { "default": "physical", "enum": [ "physical", "virtual" ], "type": "string" }, "name": { "maxLength": 200, "minLength": 1, "type": "string" }, "origin_postal_code": { "maxLength": 32, "minLength": 1, "type": "string" }, "oversell_extra_days": { "anyOf": [ { "maximum": 365, "minimum": 0, "type": "integer" }, { "type": "null" } ] }, "oversell_notice": { "type": "boolean" }, "oversell_policy": { "enum": [ "block", "allow" ], "type": "string" }, "priority": { "maximum": 100000, "minimum": 0, "type": "integer" }, "uf": { "anyOf": [ { "maxLength": 8, "type": "string" }, { "type": "null" } ] } }, "required": [ "name" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "warehouse_id": { "type": "string" } }, "required": [ "warehouse_id" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)