Production route sheet
INFO
Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.
POST /production/route-sheet/create
This method allows adding production-route-sheet into the account.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
items | object[] | Ha | |
items[].product_id | string | Ha | |
items[].amount | number | Ha | |
items[].type | string | Ha | Mumkin qiymatlar: used, produced |
items[].cost_percentage | number | Ha | |
items[].extra_costs | object[] | Ha | |
items[].extra_costs[].cost_id | string | Ha | |
items[].extra_costs[].amount | number | Ha | |
code | string | Yo‘q | |
name | string | Ha | |
note | string | Yo‘q | |
is_active | boolean | Yo‘q | Standart: false |
organization_ids | string[] | Ha | |
additional_costs | object[] | Yo‘q | |
additional_costs[].cost_id | string | Ha | |
additional_costs[].amount | number | Ha | |
additional_costs[].customer_id | string | Yo‘q | |
additional_costs[].supplier_id | string | Yo‘q | |
additional_costs[].employee_id | string | Yo‘q | |
additional_costs[].person_id | string | Yo‘q |
{
"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"
}
]
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | |
product | object | |
product._id | string | |
product.name | string | |
product.box_item | number | Standart: 0 |
product.barcodes | object[] | |
product.barcodes[]._id | string | |
product.barcodes[].barcode | string | |
product.barcodes[].is_active | boolean | Standart: false |
product.barcode | string | |
product.measure | object | |
product.measure.name | string | |
product.measure.system_code | string | |
product.measure.code | string | |
product.measure.short_name | string | |
product.measure.decimal_count | number | Standart: 0 |
product.measure_id | string | |
product.dimension | object | |
product.dimension.shape | string | Mumkin qiymatlar: circular, rectangular, other. Standart: "other" |
product.dimension.netto_weight | number | Standart: 0 |
product.dimension.gross_weight | number | Standart: 0 |
product.dimension.height | number | Standart: 0 |
product.dimension.volume | number | Standart: 0 |
product.dimension.diameter | number | Standart: 0 |
product.dimension.width | number | Standart: 0 |
product.dimension.length | number | Standart: 0 |
product.is_material | boolean | Standart: false |
product.is_product | boolean | Standart: false |
product.is_semi_product | boolean | Standart: false |
product.is_variant | boolean | Standart: false |
product.sku | string | |
warehouse_amount | number | |
type | string | |
measure_id | string | |
measure | object | |
measure.name | string | |
measure.system_code | string | |
measure.code | string | |
measure.short_name | string | |
measure.decimal_count | number | Standart: 0 |
amount | number | |
marks | string[] | |
route_sheet_id | string | |
cost_percentage | number | |
extra_costs | object[] | |
extra_costs[]._id | string | |
extra_costs[].cost_id | string | |
extra_costs[].amount | number | |
extra_costs[].employee_id | string | |
extra_costs[].customer_id | string | |
extra_costs[].supplier_id | string | |
extra_costs[].person_id | string |
{
"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.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
_id | string | Ha | |
items | object[] | Ha | |
items[]._id | string | Yo‘q | |
items[].product_id | string | Yo‘q | |
items[].amount | number | Yo‘q | |
items[].type | string | Yo‘q | Mumkin qiymatlar: used, produced |
items[].cost_percentage | number | Ha | |
items[].extra_costs | object[] | Ha | |
items[].extra_costs[].cost_id | string | Ha | |
items[].extra_costs[].amount | number | Ha | |
code | string | Yo‘q | |
name | string | Yo‘q | |
note | string | Yo‘q | |
is_active | boolean | Yo‘q | Standart: false |
organization_ids | string[] | Yo‘q | |
additional_costs | object[] | Yo‘q | |
additional_costs[].cost_id | string | Ha | |
additional_costs[].amount | number | Ha | |
additional_costs[].customer_id | string | Yo‘q | |
additional_costs[].supplier_id | string | Yo‘q | |
additional_costs[].employee_id | string | Yo‘q | |
additional_costs[].person_id | string | Yo‘q |
{
"_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"
}
]
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /production/route-sheet/create.
POST /production/route-sheet/get-paging
Get production-route-sheet by paging
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
search | string | Yo‘q | |
organization_id | string | Yo‘q | |
is_active | boolean | Yo‘q | Standart: false |
{
"page": 1,
"limit": 20,
"search": "string",
"organization_id": "646b0c2f3d4e1a001f8b4567",
"is_active": false
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
code | number | system code of response. Standart: 0 |
message | string | |
status_code | number | status code of response. Standart: 200 |
messages | object | |
messages.uz | string | |
messages.ru | string | |
messages.en | string | |
time | string (date-time) | time of response |
{
"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
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
Javob tuzilishi quyidagi bilan bir xil: POST /production/route-sheet/create.
DELETE /production/route-sheet/delete/{id}
Delete a production-route-sheet
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"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
So‘rov parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
deleted_at | string | Ha |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"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.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Production route-sheet ObjectId |
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
organization_id | string | Yo‘q | Scope the returned quantities to this organization ObjectId |
warehouse_id | string | Yo‘q | Warehouse ObjectId materials would be consumed from |
produced_warehouse_id | string | Yo‘q | Warehouse ObjectId the output would land in |
{
"organization_id": "string",
"warehouse_id": "string",
"produced_warehouse_id": "string"
}Javob
Javob tuzilishi quyidagi bilan bir xil: 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.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
itemId | string | Ha | Route-sheet item ObjectId (from products[]._id on get-by-id), NOT the route sheet ObjectId |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"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"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.