Create a production order
Creates a production order in planned status for a bill of materials. The optional X-Actor header records who made the change.
How to use it
- Pick an active recipe from List bills of materials and the manufacturing and output locations from List inventory locations.
- Send bomId, plannedQty, both location IDs and plannedDate.
- The order is created as PLANNED with component quantities scaled from the recipe (including scrap); no stock moves yet.
- Next, call Release a production order.
BearerAuthAuthorizationBearer <JWT>X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
X-Actor?stringName or username of the person making the change, recorded against the order and its stock movements. Defaults to "system".
"system"application/json- body
bomId*stringID of an active bill of materials to produce (see List bills of materials). Inactive recipes are rejected.
uuidplannedQty*numberQuantity of the finished product to make, in the recipe's output unit. Must be greater than 0.
manufacturingLocationId*stringInventory location the components will be taken from when production starts (see List inventory locations).
uuidoutputLocationId*stringInventory location the finished goods will be added to on completion.
uuidplannedDate*stringDate production is planned for, YYYY-MM-DD. Also used to build the order number.
datenotes?|Optional free-text notes for the shop floor.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request was processed; otherwise an error status.
message*stringShort human-readable message describing the outcome, e.g. which record was saved or why the call failed.
data?The production order after the call, with its component lines.
curl -X POST 'https://beta.iotoms.com/api/v1/manufacturing/orders' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "bomId": "53dce8f3-d3cc-4928-853d-2f3a84abe4b1", "plannedQty": 0, "manufacturingLocationId": "56275864-a2a2-4e00-8355-5fb463f05abd", "outputLocationId": "8ac1ed53-5778-48bb-ba89-21cc9ca9c60e", "plannedDate": "2019-08-24"}'{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orderNumber": "string", "bomId": "53dce8f3-d3cc-4928-853d-2f3a84abe4b1", "finishedGoodId": "string", "finishedGoodName": "string", "plannedQty": 0, "actualQty": 0, "status": "string", "manufacturingLocationId": "56275864-a2a2-4e00-8355-5fb463f05abd", "outputLocationId": "8ac1ed53-5778-48bb-ba89-21cc9ca9c60e", "plannedDate": "2019-08-24", "startedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "notes": "string", "components": [ { "id": 0, "componentItemId": "string", "componentItemName": "string", "plannedQty": 0, "actualQty": 0 } ], "createdAt": "2019-08-24T14:15:22Z" }}