# Warehouses
Warehouses represent the business's main item distributors or central kitchens.
# The Warehouse Object
# Sample
{
"id"
:
"8d03c214"
,
"name": "NY1",
"name_localized": null,
"reference": "W001",
"latitude": null,
"longitude": null,
"created_at": "2019-02-18 06:53:25",
"updated_at": "2019-02-18 10:53:25",
"deleted_at": null,
"users": [
{
"id": "8f7c0010",
"pivot": {
"branch_id": "8d03c214",
"user_id": "8f7c0010"
}
}
]
}
# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the warehouse | |
name | string | updatable | Name of the warehouse. |
name_localized | string | nullable updatable | Localized name of the warehouse. |
users | array | updatable includable | List of User objects attached to the warehouse. |
reference | string | nullable updatable | user friendly reference for the warehouse. |
latitude | string | nullable updatable | Latitude of the warehouse. |
longitude | string | nullable updatable | longitude of the warehouse. |
created_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was created. |
updated_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was updated. |
deleted_at | string | nullable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was deleted. |
# List Warehouses
GET /warehouses
# Scope
general.read
# Filters
namename_localizedreferenceidusers.idupdated_afteris_deletedcreated_onupdated_ondeleted_onassigned
# Response
{
"data": [
{
"id": "8d03c214",
"name": "NY1",
"name_localized": null,
"reference": "W001",
"created_at": "2019-02-18 06:53:25",
"updated_at": "2019-02-18 10:53:25",
"deleted_at": null,
"users": [
{
"id": "8f7c0010",
"pivot": {
"branch_id": "8d03c214",
"user_id": "8f7c0010"
}
}
]
}
]
}
# Get Warehouse
GET /warehouses/{warehousesId}
# Scope
general.read
# Response
{
"data": {
"id": "8d03c214",
"name": "NY1",
"name_localized": null,
"reference": "W001",
"latitude": null,
"longitude": null,
"created_at": "2019-02-18 06:53:25",
"updated_at": "2019-02-18 10:53:25",
"deleted_at": null,
"users": [
{
"id": "8f7c0010",
"pivot": {
"branch_id": "8d03c214",
"user_id": "8f7c0010"
}
}
]
}
}
# Update Warehouse
POST /warehouses/{warehousesId}
# Scope
admin.write
# Request
{
"name": "NY1",
"name_localized": null,
"reference": "2222",
"users": [
{
"id": "8d06aaa0"
}
]
}
# Response
{
"data": {
"id": "8d03c214",
"name": "NY1",
"name_localized": null,
"reference": "W001",
"latitude": null,
"longitude": null,
"created_at": "2019-02-18 06:53:25",
"updated_at": "2019-02-18 10:53:25",
"deleted_at": null,
"users": [
{
"id": "8f7c0010",
"pivot": {
"branch_id": "8d03c214",
"user_id": "8f7c0010"
}
}
]
}
}