iotoms Docs

Create a bill of materials

POST
/api/v1/manufacturing/bom

Creates a bill of materials: the product it makes, how much one run yields, and the component items with required quantities and scrap allowance. The code must be unique and each product can have only one bill of materials.

How to use it

  1. Pick the product and its components with List items; optionally pick units with List units of measure.
  2. Send a unique bomCode, the finishedGoodId, outputQty and at least one component with a quantity above zero.
  3. The bill of materials is created as active; check stock needs for a planned run with Calculate material requirements for a BOM.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Request Body

application/json
  1. body
bomCode*string

Your unique code for the bill of materials. A code already in use is rejected.

finishedGoodId*string

Item code of the product being made, from List items. Rejected if it already has a bill of materials.

outputQty*number

Quantity of the product one run yields. Must be greater than zero. Defaults to 1.

outputUom*string

Unit label for the output quantity. Defaults to UNIT.

outputUomId?|

Optional unit of measure ID from List units of measure for the output quantity.

Formatuuid
notes?|

Free-text notes.

components*array<>

Component items needed. At least one is required.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

The bill of materials as it is now stored, with its components.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/manufacturing/bom' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{  "bomCode": "string",  "finishedGoodId": "string",  "outputQty": 0,  "outputUom": "string",  "components": [    {      "componentItemId": "string",      "requiredQty": 0,      "requiredUom": "string",      "scrapPercent": 0    }  ]}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "bomCode": "string",    "finishedGoodId": "string",    "finishedGoodName": "string",    "outputQty": 0,    "outputUom": "string",    "outputUomId": "a1ce3c18-bd7d-4aae-b28c-73065017e73f",    "isActive": true,    "notes": "string",    "components": [      {        "id": 0,        "componentItemId": "string",        "componentItemName": "string",        "requiredQty": 0,        "requiredUom": "string",        "requiredUomId": "3d172696-0779-4f75-8f59-e16f1d7b4889",        "scrapPercent": 0,        "effectiveQty": 0,        "notes": "string"      }    ],    "createdAt": "2019-08-24T14:15:22Z"  }}