Skip to content

Production group ​

Production groupings

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-group/create ​

Create a new production group (hierarchical grouping of tech-maps).

Request body

FieldTypeRequiredDescription
typestringYesCategory of tech-maps this group organises (tech_map or route_sheet). One of: tech_map, route_sheet
namestringYesDisplay name of the production group
codestringNoOptional short code for the group
notestringNoOptional free-text note
parent_idstringNoParent production-group ObjectId for hierarchical grouping
organization_idsstring[]YesOrganization ObjectIds this group is scoped to
json
{
  "type": "tech_map",
  "name": "string",
  "code": "string",
  "note": "string",
  "parent_id": "string",
  "organization_ids": [
    "string"
  ]
}

Response

FieldTypeDescription
typestringCategory of tech-maps this group organises (tech_map or route_sheet). One of: tech_map, route_sheet
namestringDisplay name of the production group
codestringOptional short code for the group
notestringOptional free-text note
parent_idstringParent production-group ObjectId for hierarchical grouping
organization_idsstring[]Organization ObjectIds this group is scoped to
_idstringProduction group ObjectId
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": {
    "type": "tech_map",
    "name": "string",
    "code": "string",
    "note": "string",
    "parent_id": "string",
    "organization_ids": [
      "string"
    ],
    "_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-group/get-by-id/{id} ​

Fetch a single production group by ObjectId.

Path parameters

ParameterTypeRequiredDescription
idstringYesProduction-group ObjectId

Request body

No request body.

Response

Same response shape as POST /production-group/create.

POST /production-group/get-paging ​

Paginated list of production groups, filterable by type and organization.

Request body

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
searchstringNoFilter by name or code
typestringNoFilter by group type. One of: tech_map, route_sheet
organization_idstringNoFilter by organization ObjectId
parent_idstringNoFilter by parent group ObjectId
json
{
  "page": 1,
  "limit": 20,
  "search": "string",
  "type": "tech_map",
  "organization_id": "string",
  "parent_id": "string"
}

Response

FieldTypeDescription
totalnumber
listobject[]
list[].typestringCategory of tech-maps this group organises (tech_map or route_sheet). One of: tech_map, route_sheet
list[].namestringDisplay name of the production group
list[].codestringOptional short code for the group
list[].notestringOptional free-text note
list[].parent_idstringParent production-group ObjectId for hierarchical grouping
list[].organization_idsstring[]Organization ObjectIds this group is scoped to
list[]._idstringProduction group ObjectId
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": [
      {
        "type": "tech_map",
        "name": "string",
        "code": "string",
        "note": "string",
        "parent_id": "string",
        "organization_ids": [],
        "_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-group/update/{id} ​

Update an existing production group.

Path parameters

ParameterTypeRequiredDescription
idstringYesProduction-group ObjectId

Request body

FieldTypeRequiredDescription
typestringNoCategory of tech-maps this group organises. One of: tech_map, route_sheet
namestringNoDisplay name of the production group
codestringNoOptional short code for the group
notestringNoOptional free-text note
parent_idstringNoParent production-group ObjectId for hierarchical grouping
organization_idsstring[]NoOrganization ObjectIds this group is scoped to
json
{
  "type": "tech_map",
  "name": "string",
  "code": "string",
  "note": "string",
  "parent_id": "string",
  "organization_ids": [
    "string"
  ]
}

Response

Same response shape as POST /production-group/create.

DELETE /production-group/delete/{id} ​

Soft-delete a production group by ObjectId.

Path parameters

ParameterTypeRequiredDescription
idstringYesProduction-group ObjectId

Request body

No request body.

Response

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

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API