Skip to content

Production route sheet ​

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 /production/route-sheet/create ​

This method allows adding production-route-sheet into the account.

Request body

FieldTypeRequiredDescription
itemsobject[]Yes
items[].product_idstringYes
items[].amountnumberYes
items[].typestringYesOne of: used, produced
items[].cost_percentagenumberYes
items[].extra_costsobject[]Yes
items[].extra_costs[].cost_idstringYes
items[].extra_costs[].amountnumberYes
codestringNo
namestringYes
notestringNo
is_activebooleanNoDefault: false
organization_idsstring[]Yes
additional_costsobject[]No
additional_costs[].cost_idstringYes
additional_costs[].amountnumberYes
additional_costs[].customer_idstringNo
additional_costs[].supplier_idstringNo
additional_costs[].employee_idstringNo
additional_costs[].person_idstringNo
json
{
  "items": [
    {
      "product_id": "646b0c2f3d4e1a001f8b4567",
      "amount": 100,
      "type": "used",
      "cost_percentage": 10,
      "extra_costs": []
    }
  ],
  "code": "code",
  "name": "name",
  "note": "note",
  "is_active": false,
  "organization_ids": [
    "646b0c2f3d4e1a001f8b4567"
  ],
  "additional_costs": [
    {
      "cost_id": "646b0c2f3d4e1a001f8b4567",
      "amount": 100,
      "customer_id": "646b0c2f3d4e1a001f8b4567",
      "supplier_id": "646b0c2f3d4e1a001f8b4567",
      "employee_id": "646b0c2f3d4e1a001f8b4567",
      "person_id": "646b0c2f3d4e1a001f8b4567"
    }
  ]
}

Response

FieldTypeDescription
_idstring
productobject
product._idstring
product.namestring
product.box_itemnumberDefault: 0
product.barcodesobject[]
product.barcodes[]._idstring
product.barcodes[].barcodestring
product.barcodes[].is_activebooleanDefault: false
product.barcodestring
product.measureobject
product.measure.namestring
product.measure.system_codestring
product.measure.codestring
product.measure.short_namestring
product.measure.decimal_countnumberDefault: 0
product.measure_idstring
product.dimensionobject
product.dimension.shapestringOne of: circular, rectangular, other. Default: "other"
product.dimension.netto_weightnumberDefault: 0
product.dimension.gross_weightnumberDefault: 0
product.dimension.heightnumberDefault: 0
product.dimension.volumenumberDefault: 0
product.dimension.diameternumberDefault: 0
product.dimension.widthnumberDefault: 0
product.dimension.lengthnumberDefault: 0
product.is_materialbooleanDefault: false
product.is_productbooleanDefault: false
product.is_semi_productbooleanDefault: false
product.is_variantbooleanDefault: false
product.skustring
warehouse_amountnumber
typestring
measure_idstring
measureobject
measure.namestring
measure.system_codestring
measure.codestring
measure.short_namestring
measure.decimal_countnumberDefault: 0
amountnumber
marksstring[]
route_sheet_idstring
cost_percentagenumber
extra_costsobject[]
extra_costs[]._idstring
extra_costs[].cost_idstring
extra_costs[].amountnumber
extra_costs[].employee_idstring
extra_costs[].customer_idstring
extra_costs[].supplier_idstring
extra_costs[].person_idstring
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "646b0c2f3d4e1a001f8b4567",
    "product": {
      "_id": "646b0c2f3d4e1a001f8b4567",
      "name": "name",
      "box_item": 0,
      "barcodes": [
        {
          "_id": null,
          "barcode": null,
          "is_active": null
        }
      ],
      "barcode": "barcode",
      "measure": {
        "name": "name",
        "system_code": "system_code",
        "code": "code",
        "short_name": "short_name",
        "decimal_count": 0
      },
      "measure_id": "646b0c2f3d4e1a001f8b4567",
      "dimension": {
        "shape": "circular",
        "netto_weight": 0,
        "gross_weight": 0,
        "height": 0,
        "volume": 0,
        "diameter": 0,
        "width": 0,
        "length": 0
      },
      "is_material": false,
      "is_product": false,
      "is_semi_product": false,
      "is_variant": false,
      "sku": "sku"
    },
    "warehouse_amount": 0,
    "type": "string",
    "measure_id": "646b0c2f3d4e1a001f8b4567",
    "measure": {
      "name": "name",
      "system_code": "system_code",
      "code": "code",
      "short_name": "short_name",
      "decimal_count": 0
    },
    "amount": 100,
    "marks": [
      "string"
    ],
    "route_sheet_id": "646b0c2f3d4e1a001f8b4567",
    "cost_percentage": 10,
    "extra_costs": [
      {
        "_id": "646b0c2f3d4e1a001f8b4567",
        "cost_id": "646b0c2f3d4e1a001f8b4567",
        "amount": 100,
        "employee_id": "646b0c2f3d4e1a001f8b4567",
        "customer_id": "646b0c2f3d4e1a001f8b4567",
        "supplier_id": "646b0c2f3d4e1a001f8b4567",
        "person_id": "646b0c2f3d4e1a001f8b4567"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /production/route-sheet/update ​

This method allows updating production-route-sheet in the account.

Request body

FieldTypeRequiredDescription
_idstringYes
itemsobject[]Yes
items[]._idstringNo
items[].product_idstringNo
items[].amountnumberNo
items[].typestringNoOne of: used, produced
items[].cost_percentagenumberYes
items[].extra_costsobject[]Yes
items[].extra_costs[].cost_idstringYes
items[].extra_costs[].amountnumberYes
codestringNo
namestringNo
notestringNo
is_activebooleanNoDefault: false
organization_idsstring[]No
additional_costsobject[]No
additional_costs[].cost_idstringYes
additional_costs[].amountnumberYes
additional_costs[].customer_idstringNo
additional_costs[].supplier_idstringNo
additional_costs[].employee_idstringNo
additional_costs[].person_idstringNo
json
{
  "_id": "646b0c2f3d4e1a001f8b4567",
  "items": [
    {
      "_id": "646b0c2f3d4e1a001f8b4567",
      "product_id": "646b0c2f3d4e1a001f8b4567",
      "amount": 100,
      "type": "used",
      "cost_percentage": 10,
      "extra_costs": []
    }
  ],
  "code": "code",
  "name": "name",
  "note": "note",
  "is_active": false,
  "organization_ids": [
    "646b0c2f3d4e1a001f8b4567"
  ],
  "additional_costs": [
    {
      "cost_id": "646b0c2f3d4e1a001f8b4567",
      "amount": 100,
      "customer_id": "646b0c2f3d4e1a001f8b4567",
      "supplier_id": "646b0c2f3d4e1a001f8b4567",
      "employee_id": "646b0c2f3d4e1a001f8b4567",
      "person_id": "646b0c2f3d4e1a001f8b4567"
    }
  ]
}

Response

Same response shape as POST /production/route-sheet/create.

POST /production/route-sheet/get-paging ​

Get production-route-sheet by paging

Request body

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
searchstringNo
organization_idstringNo
is_activebooleanNoDefault: false
json
{
  "page": 1,
  "limit": 20,
  "search": "string",
  "organization_id": "646b0c2f3d4e1a001f8b4567",
  "is_active": false
}

Response

FieldTypeDescription
codenumbersystem code of response. Default: 0
messagestring
status_codenumberstatus code of response. Default: 200
messagesobject
messages.uzstring
messages.rustring
messages.enstring
timestring (date-time)time of response
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "code": 0,
    "message": "Success",
    "status_code": 200,
    "messages": {
      "uz": "Muvaffaqiyatli",
      "ru": "Успешно",
      "en": "Successful"
    },
    "time": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /production/route-sheet/get-by-id/{id} ​

Get production-route-sheet using its _id

Path parameters

ParameterTypeRequiredDescription
idstringYes

Request body

No request body.

Response

Same response shape as POST /production/route-sheet/create.

DELETE /production/route-sheet/delete/{id} ​

Delete a production-route-sheet

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 /production/route-sheet/get-deleted ​

Get deleted production-route-sheet 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 /production/route-sheet/get-with-quantity/{id} ​

Fetch one route sheet together with live per-warehouse stock for every material it consumes. get-by-id returns the recipe; this returns the recipe plus whether the warehouse can actually cover it — the read to make before launching production. Substitute products are hydrated with their own warehouse balances.

Path parameters

ParameterTypeRequiredDescription
idstringYesProduction route-sheet ObjectId

Request body

FieldTypeRequiredDescription
organization_idstringNoScope the returned quantities to this organization ObjectId
warehouse_idstringNoWarehouse ObjectId materials would be consumed from
produced_warehouse_idstringNoWarehouse ObjectId the output would land in
json
{
  "organization_id": "string",
  "warehouse_id": "string",
  "produced_warehouse_id": "string"
}

Response

Same response shape as POST /production/route-sheet/create.

GET /production/route-sheet/get-alternatives/{itemId} ​

List the substitute products registered for a single route-sheet item. Lets you resolve what may be swapped in when the primary material is short, without pulling the whole route sheet. Note the path param is the ITEM ObjectId, not the route sheet's.

Path parameters

ParameterTypeRequiredDescription
itemIdstringYesRoute-sheet item ObjectId (from products[]._id on get-by-id), NOT the route sheet ObjectId

Request body

No request body.

Response

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": [
    {
      "_id": "string",
      "product_id": "string",
      "amount": 0,
      "product": {
        "_id": "string",
        "name": "string",
        "_warehouses": []
      }
    }
  ],
  "time": "2025-05-01T12:00:00Z"
}

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API