Skip to content

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

MaydonTurMajburiyTavsif
namestringHaDisplay name of the production step (required)
codestringYo‘qOptional human-readable code for this step
notestringYo‘qOptional free-text note
used_warehouse_idstringYo‘qObjectId of the warehouse used in this step (optional)
employee_idsstring[]Yo‘qObjectIds of employees assigned to this step (optional)
attachmentsobject[]Yo‘qPre-uploaded attachment object references (optional)
attachments[].urlstringYo‘qURL of the pre-uploaded attachment
attachments[].namestringYo‘qFile name of the attachment
attachments[].sizenumberYo‘qFile size in bytes
attachments[].typestringYo‘qMIME type of the attachment
json
{
  "name": "string",
  "code": "string",
  "note": "string",
  "used_warehouse_id": "string",
  "employee_ids": [
    "string"
  ],
  "attachments": [
    {
      "url": "string",
      "name": "string",
      "size": 0,
      "type": "string"
    }
  ]
}

Javob

MaydonTurTavsif
_idstringProduction step ObjectId
namestringDisplay name of the step
numberstringAuto-assigned sequential number
codestringHuman-readable code
notestringFree-text note
used_warehouseobjectDenormalized warehouse used in this step (present when used_warehouse_id is set)
used_warehouse._idstring
used_warehouse.namestring
used_warehouse.numberstring
employeesobject[]Denormalized employee records assigned to this step
employees[]._idstring
employees[].full_namestring
employees[].numberstring
employees[].attachmentsobject[]
attachmentsobject[]Attachment records linked to this step
created_atstring (date-time)ISO 8601 creation timestamp
updated_atstring (date-time)ISO 8601 last-update timestamp
json
{
  "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

ParametrTurMajburiyTavsif
idstringHaProduction 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

MaydonTurMajburiyTavsif
pagenumberHaStandart: 1
limitnumberHaStandart: 20
json
{
  "page": 1,
  "limit": 20
}

Javob

MaydonTurTavsif
totalnumber
listobject[]
list[]._idstringProduction step ObjectId
list[].namestringDisplay name of the step
list[].numberstringAuto-assigned sequential number
list[].codestringHuman-readable code
list[].notestringFree-text note
list[].used_warehouseobjectDenormalized warehouse used in this step (present when used_warehouse_id is set)
list[].used_warehouse._idstring
list[].used_warehouse.namestring
list[].used_warehouse.numberstring
list[].employeesobject[]Denormalized employee records assigned to this step
list[].employees[]._idstring
list[].employees[].full_namestring
list[].employees[].numberstring
list[].employees[].attachmentsobject[]
list[].attachmentsobject[]Attachment records linked to this step
list[].created_atstring (date-time)ISO 8601 creation timestamp
list[].updated_atstring (date-time)ISO 8601 last-update timestamp
json
{
  "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

MaydonTurMajburiyTavsif
namestringHaDisplay name of the production step (required)
codestringYo‘qOptional human-readable code for this step
notestringYo‘qOptional free-text note
used_warehouse_idstringYo‘qObjectId of the warehouse used in this step (optional)
employee_idsstring[]Yo‘qObjectIds of employees assigned to this step (optional)
attachmentsobject[]Yo‘qPre-uploaded attachment object references (optional)
attachments[].urlstringYo‘qURL of the pre-uploaded attachment
attachments[].namestringYo‘qFile name of the attachment
attachments[].sizenumberYo‘qFile size in bytes
attachments[].typestringYo‘qMIME type of the attachment
_idstringHaObjectId of the production step to update (required)
json
{
  "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

ParametrTurMajburiyTavsif
idstringHaProduction step ObjectId to soft-delete

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.

Bito 2.0 Integration API