inventories
Inventories are defined in the registry and represent physical or logical stock locations. Each inventory has a unique key and a display label.
Each inventory key can only contain a-z, 0-9, and _. The first character must be non-numeric.
Properties
| Property | Type | Description |
|---|---|---|
label | string or object | Display label for the inventory. Can be a simple string or a localized object with locale keys (e.g., default, sv). |
address | object | Optional postal address for the inventory location. Uses the conventional Address shape. All sub-fields are optional and partial addresses are allowed. Useful for shipping labels, customs documentation, and carrier integrations. |
Additional properties may be added by installed apps. By convention, apps prefix their fields with their app name to avoid collisions (e.g., nshift_warehouseId).
Inventories automatically provide enum values for inventoryKey fields on deliveries and stock positions. The label is used as the dropdown display text. Custom graph fields may reference inventories by specifying values: "inventories".
Address
The optional address field follows the conventional Hantera Address shape. All fields are strings and all are optional:
| Field | Description |
|---|---|
name | Recipient or location name (e.g. "Hantera Logistics AB") |
careOf | "C/O" line |
addressLine1 | Primary street address |
addressLine2 | Secondary street address |
postalCode | Postal or ZIP code |
city | City |
state | State or region (where applicable) |
countryCode | ISO 3166-1 alpha-2 country code (uppercase) |
email | Contact email for this location |
phone | Contact phone for this location |
Partial addresses are allowed — only set the fields that are known. If every field is empty, omit address entirely rather than storing an empty object.
Example
uri: /registry/inventories/wh_stockholm
spec:
value:
label: Warehouse StockholmWith localization:
uri: /registry/inventories/wh_stockholm
spec:
value:
label:
default: Warehouse Stockholm
sv: Lager StockholmWith address:
uri: /registry/inventories/wh_stockholm
spec:
value:
label: Warehouse Stockholm
address:
name: Hantera Logistics AB
addressLine1: Storgatan 1
postalCode: '111 22'
city: Stockholm
countryCode: SE
email: [email protected]
phone: '+46 8 123 45 67'