iotoms Docs

Update a bill of materials

PATCH
/api/v1/manufacturing/bom/{id}

Updates the output quantity, output unit, notes or active flag of a bill of materials. Only the fields you send change. The product, code and components cannot be changed here.

How to use it

  1. Get the ID from List bills of materials.
  2. Send only the fields to change; outputQty must be above zero. Set isActive to false to retire it.
  3. Components are not edited by this call and stay as they are.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

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
outputQty?|

New output quantity; must be greater than zero. Leave out to keep it.

outputUom?|

New unit label for the output quantity. Leave out to keep it.

outputUomId?|

New unit of measure ID for the output quantity. Leave out to keep it.

Formatuuid
isActive?|

Set false to retire the bill of materials, true to reactivate it.

notes?|

New notes. Leave out to keep the current notes.

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 PATCH 'https://beta.iotoms.com/api/v1/manufacturing/bom/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{}'
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"  }}