Skip to content

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

FieldTypeRequiredDescription
namestringYes
short_namestringNo
codestringNo
statusstringNoOne of: active, inactive. Default: "active"
json
{
  "name": "string",
  "short_name": "string",
  "code": "string",
  "status": "active"
}

Response

FieldTypeDescription
namestring
codestring
short_namestring
statusstringOne of: active, inactive
json
{
  "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

FieldTypeRequiredDescription
_idstringNo
namestringYes
short_namestringNo
codestringNo
statusstringNoOne of: active, inactive. Default: "active"
json
{
  "_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

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

json
{
  "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

ParameterTypeRequiredDescription
searchstringNoSearch box-types

Request body

No request body.

Response

json
{
  "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

ParameterTypeRequiredDescription
idstringYes

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

ParameterTypeRequiredDescription
deleted_atstringYes

Request body

No request body.

Response

json
{
  "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

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
searchstringNo
namestringNo
short_namestringNo
codestringNo
statusstringNoOne of: active, inactive
json
{
  "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.

FieldTypeDescription
namestring
codestring
short_namestring
statusstringOne of: active, inactive
updated_by_userobject
updated_by_user._idstring
updated_by_user.full_namestring
created_by_userobject
created_by_user._idstring
created_by_user.full_namestring
created_atstring (date-time)
updated_atstring (date-time)
is_defaultboolean
json
{
  "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.

Bito 2.0 Integration API