Production step
Production process steps
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-step/create
Create a new production step (an individual manufacturing stage such as cutting, assembly, or QC).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name of the production step (required) |
code | string | No | Optional human-readable code for this step |
note | string | No | Optional free-text note |
used_warehouse_id | string | No | ObjectId of the warehouse used in this step (optional) |
employee_ids | string[] | No | ObjectIds of employees assigned to this step (optional) |
attachments | object[] | No | Pre-uploaded attachment object references (optional) |
attachments[].url | string | No | URL of the pre-uploaded attachment |
attachments[].name | string | No | File name of the attachment |
attachments[].size | number | No | File size in bytes |
attachments[].type | string | No | 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"
}
]
}Response
| Field | Type | Description |
|---|---|---|
_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.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Production step ObjectId |
Request body
No request body.
Response
Same response shape as POST /production-step/create.
POST /production-step/get-paging
Paginated list of production steps, filterable by name/code/number search.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Yes | Default: 1 |
limit | number | Yes | Default: 20 |
{
"page": 1,
"limit": 20
}Response
| Field | Type | Description |
|---|---|---|
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.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name of the production step (required) |
code | string | No | Optional human-readable code for this step |
note | string | No | Optional free-text note |
used_warehouse_id | string | No | ObjectId of the warehouse used in this step (optional) |
employee_ids | string[] | No | ObjectIds of employees assigned to this step (optional) |
attachments | object[] | No | Pre-uploaded attachment object references (optional) |
attachments[].url | string | No | URL of the pre-uploaded attachment |
attachments[].name | string | No | File name of the attachment |
attachments[].size | number | No | File size in bytes |
attachments[].type | string | No | MIME type of the attachment |
_id | string | Yes | 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"
}Response
Same response shape as 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.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Production step ObjectId to soft-delete |
Request body
No request body.
Response
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}This page is generated from the OpenAPI spec.