Box types
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.
POST /box-types/create
This method allows adding box-types into the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
short_name | string | No | |
code | string | No | |
status | string | No | One of: active, inactive. Default: "active" |
{
"name": "string",
"short_name": "string",
"code": "string",
"status": "active"
}Response
| Field | Type | Description |
|---|---|---|
name | string | |
code | string | |
short_name | string | |
status | string | One of: active, inactive |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"name": "string",
"code": "string",
"short_name": "string",
"status": "active"
},
"time": "2025-05-01T12:00:00Z"
}PUT /box-types/update
This method allows updating box-types in the account.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
_id | string | No | |
name | string | Yes | |
short_name | string | No | |
code | string | No | |
status | string | No | One of: active, inactive. Default: "active" |
{
"_id": "67b486d242ed76693cd2cc59",
"name": "string",
"short_name": "string",
"code": "string",
"status": "active"
}Response
Same response shape as POST /box-types/create.
DELETE /box-types/delete/{id}
Delete a box-types
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}GET /box-types/get-all
Get all box-typess
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
search | string | No | Search box-types |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
{
"name": "string",
"code": "string",
"short_name": "string",
"status": "active"
}
],
"time": "2025-05-01T12:00:00Z"
}GET /box-types/get-by-id/{id}
Get box-types using its _id
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Request body
No request body.
Response
Same response shape as POST /box-types/create.
GET /box-types/get-deleted
Get deleted box-types ids
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deleted_at | string | Yes |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": [
"string"
],
"time": "2025-05-01T12:00:00Z"
}POST /box-types/get-paging
Get box-types by paging
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
search | string | No | |
name | string | No | |
short_name | string | No | |
code | string | No | |
status | string | No | One of: active, inactive |
{
"page": 1,
"limit": 20,
"search": "string",
"name": "string",
"short_name": "string",
"code": "string",
"status": "active"
}Response
data.total is the total number of records and data.data[] holds the current page. The table below describes one record.
| Field | Type | Description |
|---|---|---|
name | string | |
code | string | |
short_name | string | |
status | string | One of: active, inactive |
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 | |
created_at | string (date-time) | |
updated_at | string (date-time) | |
is_default | boolean |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"data": [
{
"name": "string",
"code": "string",
"short_name": "string",
"status": "active",
"updated_by_user": {
"_id": "string",
"full_name": "string"
},
"created_by_user": {
"_id": "string",
"full_name": "string"
},
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z",
"is_default": false
}
]
},
"time": "2025-05-01T12:00:00Z"
}This page is generated from the OpenAPI spec.