Skip to main content

Manufacturing API

The Manufacturing module manages the production lifecycle — Bills of Materials (BOMs) define the components and operations needed to produce a finished product; Production Orders track actual production runs; Work Orders track individual operations on the shop floor.


Endpoints

MethodPathDescription
GET/api/manufacturing/bomsList Bills of Materials
POST/api/manufacturing/bomsCreate a BOM
GET/api/manufacturing/boms/:idGet a BOM
PATCH/api/manufacturing/boms/:idUpdate a BOM
DELETE/api/manufacturing/boms/:idDelete a BOM
GET/api/manufacturing/ordersList production orders
POST/api/manufacturing/ordersCreate a production order
GET/api/manufacturing/orders/:idGet a production order
POST/api/manufacturing/orders/:id/confirmConfirm production order
POST/api/manufacturing/orders/:id/produceRecord production
POST/api/manufacturing/orders/:id/closeClose production order
GET/api/manufacturing/orders/:id/work-ordersList work orders
POST/api/manufacturing/orders/:id/work-orders/:woId/startStart a work order
POST/api/manufacturing/orders/:id/work-orders/:woId/doneComplete a work order

Bills of Materials

A BOM defines what components (and in what quantities) are needed to produce a given product.

List BOMs

GET /api/manufacturing/boms?productId=018e5678-abcd-7000-8000-000000000001

Response

{
"data": [
{
"id": "018eeeee-abcd-7000-8000-000000000001",
"name": "Widget Pro v2 — Standard BOM",
"product": { "id": "018e5678-...", "name": "ECOSIRE Widget Pro" },
"quantity": 1,
"uom": "units",
"type": "manufacture",
"components": [
{ "productId": "018e...comp1", "name": "Frame", "quantity": 1, "uom": "units" },
{ "productId": "018e...comp2", "name": "Circuit Board", "quantity": 2, "uom": "units" }
],
"operations": [
{ "name": "Assembly", "workcenter": "Line A", "durationMinutes": 30 }
]
}
],
"meta": { "total": 8, "page": 1, "limit": 20, "totalPages": 1 }
}

Create a BOM

POST /api/manufacturing/boms
Content-Type: application/json

{
"name": "Widget Pro v3 — Standard BOM",
"productId": "018e5678-abcd-7000-8000-000000000001",
"quantity": 1,
"uom": "units",
"type": "manufacture",
"components": [
{ "productId": "018e...comp1", "quantity": 1, "uom": "units" },
{ "productId": "018e...comp2", "quantity": 2, "uom": "units" }
],
"operations": [
{ "name": "Assembly", "workcenter": "Line A", "durationMinutes": 35 }
]
}

BOM types: manufacture, phantom (kit), subcontract


Production Orders

List Production Orders

GET /api/manufacturing/orders?status=in_progress&page=1&limit=20

Query Parameters

ParameterTypeDescription
statusstringdraft, confirmed, in_progress, done, cancelled
productIdstringFilter by finished product
fromISO 8601Scheduled start from

Response

{
"data": [
{
"id": "018effff-abcd-7000-8000-000000000001",
"reference": "MO/2026/0007",
"product": { "id": "018e5678-...", "name": "Widget Pro" },
"bomId": "018eeeee-abcd-7000-8000-000000000001",
"quantity": 50,
"producedQty": 23,
"status": "in_progress",
"scheduledDate": "2026-03-20T06:00:00Z"
}
],
"meta": { "total": 15, "page": 1, "limit": 20, "totalPages": 1 }
}

Create a Production Order

POST /api/manufacturing/orders
Content-Type: application/json

{
"productId": "018e5678-abcd-7000-8000-000000000001",
"bomId": "018eeeee-abcd-7000-8000-000000000001",
"quantity": 100,
"scheduledDate": "2026-04-01T06:00:00Z"
}

Confirm a Production Order

POST /api/manufacturing/orders/018effff-abcd-7000-8000-000000000001/confirm

Reserves component stock and transitions status to confirmed.

Record Production

POST /api/manufacturing/orders/018effff-abcd-7000-8000-000000000001/produce
Content-Type: application/json

{
"qty": 25,
"lotNumber": "LOT-2026-0042"
}

Adds to producedQty. Post multiple times until production is complete.


Work Orders

Start a Work Order

POST /api/manufacturing/orders/018effff-abcd-7000-8000-000000000001/work-orders/wo_001/start

Records the start time for the operation.

Complete a Work Order

POST /api/manufacturing/orders/018effff-abcd-7000-8000-000000000001/work-orders/wo_001/done
Content-Type: application/json

{
"durationMinutes": 32,
"notes": "Slight delay on alignment step."
}

Status Codes

CodeScenario
200Get or operation succeeded
201BOM or production order created
400Insufficient stock to confirm order
404Order or BOM not found
409Production order already in terminal state
422Produced quantity exceeds order quantity