OBAPI OBAPI

Manufacturing Orders

Production runs based on a Bill of Materials.

Endpoints

  • GET /obapi/v1/manufacturing-orders -- list
  • GET /obapi/v1/manufacturing-orders/{id} -- single with lines

Parameters

page, per_page, date_start, date_end, status, sort

Status values

Value Description
draft Draft MO
validated Validated, ready to produce
in_progress Production in progress
produced Production finished
cancelled Cancelled

Response (list)

{
    "items": [
        {
            "id": "12",
            "ref": "MO2405-0001",
            "label": "Widget V2 - Batch 50",
            "product_ref": "WIDGET-V2",
            "quantity": "50.00",
            "date_start_planned": "2024-06-01",
            "date_end_planned": "2024-06-15",
            "status": "in_progress"
        }
    ],
    "pagination": { "..." }
}

Response (single)

{
    "manufacturing_order": {
        "id": "12",
        "ref": "MO2405-0001",
        "label": "Widget V2 - Batch 50",
        "mrp_type": "manufacturing",
        "product_ref": "WIDGET-V2",
        "product_label": "Assembled Widget V2",
        "bom_ref": "BOM2405-0002",
        "quantity": "50.00",
        "warehouse": "Production warehouse",
        "date_start_planned": "2024-06-01",
        "date_end_planned": "2024-06-15",
        "created_at": "2024-05-20T11:00:00Z",
        "validated_at": "2024-05-25T09:00:00Z",
        "updated_at": "2024-06-05T17:00:00Z",
        "status": "in_progress",
        "project_ref": "",
        "public_note": "",
        "lines": [
            {
                "id": "30",
                "position": 1,
                "product_ref": "COMP-A1",
                "product_label": "Component A1",
                "quantity": "50.00",
                "warehouse": "Production warehouse",
                "role": "consumed",
                "origin_type": "",
                "origin_id": ""
            },
            {
                "id": "31",
                "position": 2,
                "product_ref": "COMP-B2",
                "product_label": "Component B2",
                "quantity": "200.00",
                "warehouse": "Production warehouse",
                "role": "consumed",
                "origin_type": "",
                "origin_id": ""
            },
            {
                "id": "32",
                "position": 3,
                "product_ref": "WIDGET-V2",
                "product_label": "Assembled Widget V2",
                "quantity": "50.00",
                "warehouse": "Finished goods",
                "role": "produced",
                "origin_type": "",
                "origin_id": ""
            }
        ]
    }
}

Line roles

Value Description
consumed Raw material / component consumed
produced Finished product produced