Skip to content

Production tech map ​

Technological maps — the step graph that turns route sheets into a finished product

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-tech-map/create ​

Create a technological map — the step graph that turns route sheets into a finished product. Each item pairs a production step with the route sheet that produces it and names the steps that follow.

So‘rov tanasi

MaydonTurMajburiyTavsif
namestringHaDisplay name of the technological map
group_idstringYo‘qProduction-group ObjectId (a group of type tech_map) this map belongs to
codestringYo‘qOptional short code for the map
notestringYo‘qOptional free-text note
itemsobject[]HaOrdered steps of the map, at least one. Each entry pairs a step with the route sheet that produces it and names the steps that come next.
items[].step_idstringHaProduction-step ObjectId this node of the map executes
items[].route_sheet_idstringHaProduction route-sheet ObjectId holding the recipe for this step
items[].next_step_idsstring[]Yo‘qProduction-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph.
attachmentsobject[]Yo‘qFiles attached to the map (drawings, specifications)
attachments[].file_idstringYo‘qUploaded file ObjectId
attachments[].namestringYo‘qOriginal file name
json
{
  "name": "string",
  "group_id": "string",
  "code": "string",
  "note": "string",
  "items": [
    {
      "step_id": "string",
      "route_sheet_id": "string",
      "next_step_ids": []
    }
  ],
  "attachments": [
    {
      "file_id": "string",
      "name": "string"
    }
  ]
}

Javob

MaydonTurTavsif
namestringDisplay name of the technological map
group_idstringProduction-group ObjectId (a group of type tech_map) this map belongs to
codestringOptional short code for the map
notestringOptional free-text note
itemsobject[]Hydrated step graph — each item carries its step and route sheet inline alongside the ids sent on create
items[].step_idstringProduction-step ObjectId this node of the map executes
items[].route_sheet_idstringProduction route-sheet ObjectId holding the recipe for this step
items[].next_step_idsstring[]Production-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph.
items[]._idstringTech-map item ObjectId
items[].tech_map_idstringOwning technological map ObjectId
items[].stepobjectHydrated production step
items[].step._idstring
items[].step.namestring
items[].route_sheetobjectHydrated route sheet
items[].route_sheet._idstring
items[].route_sheet.namestring
items[].route_sheet.numberstring
attachmentsobject[]Files attached to the map (drawings, specifications)
attachments[].file_idstringUploaded file ObjectId
attachments[].namestringOriginal file name
_idstringTechnological map ObjectId
numberstringAuto-generated sequential map number
groupobjectHydrated production group this map belongs to
group._idstring
group.namestring
route_sheet_idsstring[]Every route-sheet ObjectId referenced by the map's items
last_route_sheet_idstringRoute sheet of the terminal step — the one that yields the finished product
is_deletedbooleanSoft-delete flag
created_atstring (date-time)Creation timestamp (ISO 8601)
updated_atstring (date-time)Last update timestamp (ISO 8601)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "name": "string",
    "group_id": "string",
    "code": "string",
    "note": "string",
    "items": [
      {
        "step_id": "string",
        "route_sheet_id": "string",
        "next_step_ids": [],
        "_id": "string",
        "tech_map_id": "string",
        "step": {
          "_id": null,
          "name": null
        },
        "route_sheet": {
          "_id": null,
          "name": null,
          "number": null
        }
      }
    ],
    "attachments": [
      {
        "file_id": "string",
        "name": "string"
      }
    ],
    "_id": "string",
    "number": "string",
    "group": {
      "_id": "string",
      "name": "string"
    },
    "route_sheet_ids": [
      "string"
    ],
    "last_route_sheet_id": "string",
    "is_deleted": false,
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z"
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /production-tech-map/get-by-id/{id} ​

Fetch a single technological map by ObjectId, hydrated with its step graph, steps and route sheets.

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaTechnological-map ObjectId

So‘rov tanasi

So‘rov tanasi talab qilinmaydi.

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /production-tech-map/create.

POST /production-tech-map/get-paging ​

Paginated list of technological maps, filterable by production group and free-text search over name, number and code.

So‘rov tanasi

MaydonTurMajburiyTavsif
pagenumberHaStandart: 1
limitnumberHaStandart: 20
searchstringYo‘qFilter by name, number or code
group_idstringYo‘qFilter by production-group ObjectId
json
{
  "page": 1,
  "limit": 20,
  "search": "string",
  "group_id": "string"
}

Javob

MaydonTurTavsif
totalnumber
listobject[]
list[].namestringDisplay name of the technological map
list[].group_idstringProduction-group ObjectId (a group of type tech_map) this map belongs to
list[].codestringOptional short code for the map
list[].notestringOptional free-text note
list[].itemsobject[]Hydrated step graph — each item carries its step and route sheet inline alongside the ids sent on create
list[].items[].step_idstringProduction-step ObjectId this node of the map executes
list[].items[].route_sheet_idstringProduction route-sheet ObjectId holding the recipe for this step
list[].items[].next_step_idsstring[]Production-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph.
list[].items[]._idstringTech-map item ObjectId
list[].items[].tech_map_idstringOwning technological map ObjectId
list[].items[].stepobjectHydrated production step
list[].items[].route_sheetobjectHydrated route sheet
list[].attachmentsobject[]Files attached to the map (drawings, specifications)
list[].attachments[].file_idstringUploaded file ObjectId
list[].attachments[].namestringOriginal file name
list[]._idstringTechnological map ObjectId
list[].numberstringAuto-generated sequential map number
list[].groupobjectHydrated production group this map belongs to
list[].group._idstring
list[].group.namestring
list[].route_sheet_idsstring[]Every route-sheet ObjectId referenced by the map's items
list[].last_route_sheet_idstringRoute sheet of the terminal step — the one that yields the finished product
list[].is_deletedbooleanSoft-delete flag
list[].created_atstring (date-time)Creation timestamp (ISO 8601)
list[].updated_atstring (date-time)Last update timestamp (ISO 8601)
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "list": [
      {
        "name": "string",
        "group_id": "string",
        "code": "string",
        "note": "string",
        "items": [],
        "attachments": [],
        "_id": "string",
        "number": "string",
        "group": {
          "_id": null,
          "name": null
        },
        "route_sheet_ids": [],
        "last_route_sheet_id": "string",
        "is_deleted": false,
        "created_at": "2025-05-01T12:00:00Z",
        "updated_at": "2025-05-01T12:00:00Z"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /production-tech-map/update/{id} ​

Update an existing technological map. The item graph is rewritten from the items[] array, so send every step — not just the changed ones.

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaTechnological-map ObjectId

So‘rov tanasi

MaydonTurMajburiyTavsif
namestringHaDisplay name of the technological map
group_idstringYo‘qProduction-group ObjectId (a group of type tech_map) this map belongs to
codestringYo‘qOptional short code for the map
notestringYo‘qOptional free-text note
itemsobject[]HaFull replacement set of steps. The item graph is rewritten from this array, so send every step, not just the changed ones.
items[].step_idstringHaProduction-step ObjectId this node of the map executes
items[].route_sheet_idstringHaProduction route-sheet ObjectId holding the recipe for this step
items[].next_step_idsstring[]Yo‘qProduction-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph.
attachmentsobject[]Yo‘qFiles attached to the map (drawings, specifications)
attachments[].file_idstringYo‘qUploaded file ObjectId
attachments[].namestringYo‘qOriginal file name
json
{
  "name": "string",
  "group_id": "string",
  "code": "string",
  "note": "string",
  "items": [
    {
      "step_id": "string",
      "route_sheet_id": "string",
      "next_step_ids": []
    }
  ],
  "attachments": [
    {
      "file_id": "string",
      "name": "string"
    }
  ]
}

Javob

Javob tuzilishi quyidagi bilan bir xil: POST /production-tech-map/create.

DELETE /production-tech-map/delete/{id} ​

Soft-delete a technological map by ObjectId.

Yo‘l parametrlari

ParametrTurMajburiyTavsif
idstringHaTechnological-map ObjectId

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