Skip to content

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

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

FieldTypeDescription
namestring
codestring
is-mainboolean
statusstringOne of: active, inactive
order_numbernumber
notestring
shapestringOne of: rectangle, circular, other
heightnumber
widthnumber
lengthnumber
diameternumber
volumenumber
addressstring
recommended_temperaturenumber
recommended_humiditynumber
coordinatesobject
coordinates.latnumber
coordinates.longnumber
updated_bystring
is_defaultboolean
updated_by_userobject
updated_by_user._idstring
updated_by_user.full_namestring
created_by_userobject
created_by_user._idstring
created_by_user.full_namestring
responsible_employeeobject
responsible_employee._idstring
responsible_employee.full_namestring
created_atstring (date-time)
updated_atstring (date-time)
organizationobject
organization._idstring
organization.namestring
warehouse_typeobject
warehouse_type._idstring
warehouse_type.namestring
warehouse_type.order_numbernumber
warehouse_type.statusstringOne of: active, inactive
warehouse_type.is_defaultboolean
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

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
searchstringNo
organization_idstringNo
is_mainbooleanNo
statusstringNoOne 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

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
searchstringNo
organization_idstringNo
is_mainbooleanNo
statusstringNoOne 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

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"
}

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API