Create Warehouse
create_warehouseCreate a warehouse (name + unique code required; type defaults to internal). Runs the canonical creation path: duplicate-name/code check, a default receiving location, and a companion store (same name as the warehouse, returned in stores[] with its own storeId — that storeId, never the warehouse id, is what sales-order import surfaces take). Pass customFields to set tenant-defined custom field values (see list_custom_fields with entity=warehouse); an unknown fieldName fails the call. Use for multi-warehouse tenants during onboarding — single-warehouse tenants already have Main from signup. Requires an operator (unpinned) org token.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"code": "<code>"
},
"name": "create_warehouse"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Short warehouse code (required, unique per tenant, e.g. 'EAST'). | |
| name | Yes | Warehouse display name (required, unique per tenant). | |
| type | No | internal (Spark-managed stock, default) or external (observed-only, e.g. a 3PL/marketplace node). | |
| description | No | Optional description. | |
| customFields | No | Custom field values keyed by fieldName (see list_custom_fields, entity=warehouse). list fields take an option id or name; multilist an array of them. An unknown fieldName fails the call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| code | No | ||
| name | No | ||
| type | No | ||
| stores | No | ||
| description | No | ||
| customFields | No | ||
| replenishmentMode | No | ||
| supplyTransitDays | No | ||
| supplyWarehouseId | No |