Warehouses
The physical locations stock is held in. Every inventory record belongs to exactly one warehouse.
Use cases: Use this to mirror your storage locations, and to resolve the `warehouseId` the products and inventory endpoints ask for.
GET
/warehousesList every active warehouse.
A bare array, not an envelope — no pagination and no filters. Each row nests the warehouse under `warehouse` and its joined address under `address` (null when none is set). Archived warehouses are excluded; the default warehouse sorts first, then by name.
Request
curl -X GET "https://api.glance.co.il/warehouses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
[
{
"warehouse": {
"id": 1,
"visibleId": "a2c9d4e6-1b8f-4a0c-9e7d-5f3b2a1c0d9e",
"name": "מחסן ראשי",
"code": "MAIN",
"description": null,
"addressId": 512,
"isActive": true,
"isDefault": true,
"archived": false,
"createdAt": "2026-01-04T08:00:00.000Z",
"updatedAt": "2026-08-01T11:20:00.000Z"
},
"address": {
"id": 512,
"street": "הרצל 10",
"city": "תל אביב",
"zip": "6120101"
}
}
]GET
/warehouses/:idGet a single warehouse.
404 WAREHOUSE_NOT_FOUND when no warehouse carries that visibleId.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | string | required | The warehouse's `visibleId` (a UUID). |
Request
curl -X GET "https://api.glance.co.il/warehouses/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"warehouse": {
"id": 1,
"visibleId": "a2c9d4e6-1b8f-4a0c-9e7d-5f3b2a1c0d9e",
"name": "מחסן ראשי",
"code": "MAIN",
"addressId": 512,
"isActive": true,
"isDefault": true,
"archived": false
},
"address": {
"id": 512,
"street": "הרצל 10",
"city": "תל אביב"
}
}POST
/warehousesCreate a warehouse.
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | required | Warehouse name. |
code | string | Short code, e.g. "MAIN" or "WH1". | |
description | string | Free-text description. | |
addressId | number | Id of an existing address record. There is no free-text address field — create the address first via the Addresses API. | |
isDefault | boolean | Make this the company's default warehouse. Defaults to false. |
Request
curl -X POST "https://api.glance.co.il/warehouses" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"code": "example_code",
"description": "example_description",
"addressId": 0,
"isDefault": true
}'Response
Response
{
"success": true,
"warehouseId": 4
}PUT
/warehouses/:idUpdate a warehouse. All fields are optional.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The warehouse's numeric `id` — this endpoint takes the numeric id, while `GET /warehouses/:id` takes the `visibleId`. |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | Warehouse name. | |
code | string | Short code. | |
description | string | Free-text description. | |
addressId | number | Id of an existing address record. | |
isActive | boolean | Whether the warehouse is in use. | |
isDefault | boolean | Make this the company's default warehouse. |
Request
curl -X PUT "https://api.glance.co.il/warehouses/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"code": "example_code",
"description": "example_description",
"addressId": 0,
"isActive": true,
"isDefault": true
}'Response
Response
{
"success": true
}DELETE
/warehouses/:idArchive a warehouse.
A soft delete: the row is marked `archived` and drops out of `GET /warehouses`. Its stock records and movement history are untouched.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | number | required | The warehouse's numeric `id`. |
Request
curl -X DELETE "https://api.glance.co.il/warehouses/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true
}