Warehouse
INFO
Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.
GET /warehouse/get-by-id/{id}
Get warehouse using its _id
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
| Field | Type | Description |
|---|---|---|
name | string | |
code | string | |
is-main | boolean | |
status | string | One of: active, inactive |
order_number | number | |
note | string | |
shape | string | One of: rectangle, circular, other |
height | number | |
width | number | |
length | number | |
diameter | number | |
volume | number | |
address | string | |
recommended_temperature | number | |
recommended_humidity | number | |
coordinates | object | |
coordinates.lat | number | |
coordinates.long | number | |
updated_by | string | |
is_default | boolean | |
updated_by_user | object | |
updated_by_user._id | string | |
updated_by_user.full_name | string | |
created_by_user | object | |
created_by_user._id | string | |
created_by_user.full_name | string | |
responsible_employee | object | |
responsible_employee._id | string | |
responsible_employee.full_name | string | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
organization | object | |
organization._id | string | |
organization.name | string | |
warehouse_type | object | |
warehouse_type._id | string | |
warehouse_type.name | string | |
warehouse_type.order_number | number | |
warehouse_type.status | string | One of: active, inactive |
warehouse_type.is_default | boolean |
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"name": "string",
"code": "string",
"is-main": false,
"status": "active",
"order_number": 0,
"note": "string",
"shape": "rectangle",
"height": 0,
"width": 0,
"length": 0,
"diameter": 0,
"volume": 0,
"address": "string",
"recommended_temperature": 0,
"recommended_humidity": 0,
"coordinates": {
"lat": 0,
"long": 0
},
"updated_by": "string",
"is_default": false,
"updated_by_user": {
"_id": "string",
"full_name": "string"
},
"created_by_user": {
"_id": "string",
"full_name": "string"
},
"responsible_employee": {
"_id": "string",
"full_name": "string"
},
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z",
"organization": {
"_id": "string",
"name": "string"
},
"warehouse_type": {
"_id": "string",
"name": "string",
"order_number": 0,
"status": "active",
"is_default": false
}
},
"time": "2025-05-01T12:00:00Z"
}POST /warehouse/get-paging
Get warehouse by paging
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
search | string | No | |
organization_id | string | No | |
is_main | boolean | No | |
status | string | No | One of: active, inactive |
json
{
"page": 1,
"limit": 20,
"search": "string",
"organization_id": "64b7f4d9e2b3b6a0b7c5d800",
"is_main": false,
"status": "active"
}Response
data.total is the total number of records and data.data[] holds the current page. The table below describes one record.
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": []
},
"time": "2025-05-01T12:00:00Z"
}POST /warehouse/get-all
Get all warehouses
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
search | string | No | |
organization_id | string | No | |
is_main | boolean | No | |
status | string | No | One of: active, inactive |
json
{
"page": 1,
"limit": 20,
"search": "string",
"organization_id": "64b7f4d9e2b3b6a0b7c5d800",
"is_main": false,
"status": "active"
}Response
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [],
"time": "2025-05-01T12:00:00Z"
}GET /warehouse/get-deleted
Get deleted warehouse ids
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted_at | string | Yes |
Request body
No request body.
Response
json
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
"string"
],
"time": "2025-05-01T12:00:00Z"
}This page is generated from the OpenAPI spec.