Production step
Production process steps
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-step/create
Create a new production step (an individual manufacturing stage such as cutting, assembly, or QC).
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | Display name of the production step (required) |
code | string | Yo‘q | Optional human-readable code for this step |
note | string | Yo‘q | Optional free-text note |
used_warehouse_id | string | Yo‘q | ObjectId of the warehouse used in this step (optional) |
employee_ids | string[] | Yo‘q | ObjectIds of employees assigned to this step (optional) |
attachments | object[] | Yo‘q | Pre-uploaded attachment object references (optional) |
attachments[].url | string | Yo‘q | URL of the pre-uploaded attachment |
attachments[].name | string | Yo‘q | File name of the attachment |
attachments[].size | number | Yo‘q | File size in bytes |
attachments[].type | string | Yo‘q | MIME type of the attachment |
{
"name": "string",
"code": "string",
"note": "string",
"used_warehouse_id": "string",
"employee_ids": [
"string"
],
"attachments": [
{
"url": "string",
"name": "string",
"size": 0,
"type": "string"
}
]
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
_id | string | Production step ObjectId |
name | string | Display name of the step |
number | string | Auto-assigned sequential number |
code | string | Human-readable code |
note | string | Free-text note |
used_warehouse | object | Denormalized warehouse used in this step (present when used_warehouse_id is set) |
used_warehouse._id | string | |
used_warehouse.name | string | |
used_warehouse.number | string | |
employees | object[] | Denormalized employee records assigned to this step |
employees[]._id | string | |
employees[].full_name | string | |
employees[].number | string | |
employees[].attachments | object[] | |
attachments | object[] | Attachment records linked to this step |
created_at | string (date-time) | ISO 8601 creation timestamp |
updated_at | string (date-time) | ISO 8601 last-update timestamp |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"_id": "string",
"name": "string",
"number": "string",
"code": "string",
"note": "string",
"used_warehouse": {
"_id": "string",
"name": "string",
"number": "string"
},
"employees": [
{
"_id": "string",
"full_name": "string",
"number": "string",
"attachments": []
}
],
"attachments": [
{}
],
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}GET /production-step/get-by-id/{id}
Fetch a single production step by ObjectId.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Production step ObjectId |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
Javob tuzilishi quyidagi bilan bir xil: POST /production-step/create.
POST /production-step/get-paging
Paginated list of production steps, filterable by name/code/number search.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
{
"page": 1,
"limit": 20
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
total | number | |
list | object[] | |
list[]._id | string | Production step ObjectId |
list[].name | string | Display name of the step |
list[].number | string | Auto-assigned sequential number |
list[].code | string | Human-readable code |
list[].note | string | Free-text note |
list[].used_warehouse | object | Denormalized warehouse used in this step (present when used_warehouse_id is set) |
list[].used_warehouse._id | string | |
list[].used_warehouse.name | string | |
list[].used_warehouse.number | string | |
list[].employees | object[] | Denormalized employee records assigned to this step |
list[].employees[]._id | string | |
list[].employees[].full_name | string | |
list[].employees[].number | string | |
list[].employees[].attachments | object[] | |
list[].attachments | object[] | Attachment records linked to this step |
list[].created_at | string (date-time) | ISO 8601 creation timestamp |
list[].updated_at | string (date-time) | ISO 8601 last-update timestamp |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"list": [
{
"_id": "string",
"name": "string",
"number": "string",
"code": "string",
"note": "string",
"used_warehouse": {
"_id": null,
"name": null,
"number": null
},
"employees": [],
"attachments": [],
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
}
]
},
"time": "2025-05-01T12:00:00Z"
}PUT /production-step/update
Update an existing production step. Requires _id plus at minimum the name field.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | Display name of the production step (required) |
code | string | Yo‘q | Optional human-readable code for this step |
note | string | Yo‘q | Optional free-text note |
used_warehouse_id | string | Yo‘q | ObjectId of the warehouse used in this step (optional) |
employee_ids | string[] | Yo‘q | ObjectIds of employees assigned to this step (optional) |
attachments | object[] | Yo‘q | Pre-uploaded attachment object references (optional) |
attachments[].url | string | Yo‘q | URL of the pre-uploaded attachment |
attachments[].name | string | Yo‘q | File name of the attachment |
attachments[].size | number | Yo‘q | File size in bytes |
attachments[].type | string | Yo‘q | MIME type of the attachment |
_id | string | Ha | ObjectId of the production step to update (required) |
{
"name": "string",
"code": "string",
"note": "string",
"used_warehouse_id": "string",
"employee_ids": [
"string"
],
"attachments": [
{
"url": "string",
"name": "string",
"size": 0,
"type": "string"
}
],
"_id": "string"
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /production-step/create.
DELETE /production-step/delete/{id}
Soft-delete a production step by ObjectId (sets is_deleted=true). The step is no longer returned in normal listings after deletion.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Production step ObjectId to soft-delete |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.