Skip to main content
POST
/
api
/
v1
/
bom
/
{bom_id}
/
versions
Create Version
curl --request POST \
  --url https://staging.cutmake.ai/api/v1/bom/{bom_id}/versions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "changeDescription": "New version",
  "createdById": "<string>"
}
'
{
  "id": "<string>",
  "documentId": "<string>",
  "versionNumber": 123,
  "changeDescription": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "createdById": "<string>",
  "status": "<string>",
  "submittedAt": "2023-11-07T05:31:56Z",
  "submittedById": "<string>",
  "approvedById": "<string>",
  "rejectionReason": "<string>",
  "lineItems": [
    {
      "id": "<string>",
      "billOfMaterialVersionId": "<string>",
      "grossConsumption": 123,
      "sellingTolerance": 123,
      "netSellingConsumption": 123,
      "buyingTolerance": 123,
      "netBuyingConsumption": 123,
      "materialCostInNativeCurrency": 123,
      "nativeCurrency": "<string>",
      "materialCostInUsd": 123,
      "estimatedMaterialPreparationLeadTime": 123,
      "assignedMaterialOptions": [
        {}
      ],
      "chosenAssignedMaterialId": "<string>",
      "chosenAssignedSkuId": "<string>",
      "category": "Uncategorized",
      "description": "<string>",
      "unit": "pc"
    }
  ],
  "groupedLineItems": [
    {
      "category": "<string>",
      "items": [
        {
          "id": "<string>",
          "billOfMaterialVersionId": "<string>",
          "grossConsumption": 123,
          "sellingTolerance": 123,
          "netSellingConsumption": 123,
          "buyingTolerance": 123,
          "netBuyingConsumption": 123,
          "materialCostInNativeCurrency": 123,
          "nativeCurrency": "<string>",
          "materialCostInUsd": 123,
          "estimatedMaterialPreparationLeadTime": 123,
          "assignedMaterialOptions": [
            {}
          ],
          "chosenAssignedMaterialId": "<string>",
          "chosenAssignedSkuId": "<string>",
          "category": "Uncategorized",
          "description": "<string>",
          "unit": "pc"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Org-Id
string | null

Path Parameters

bom_id
string
required

Body

application/json
changeDescription
string | null
default:New version
createdById
string | null

Response

Successful Response

id
string
required
documentId
string
required
versionNumber
integer
required
changeDescription
string | null
createdAt
string<date-time> | null
createdById
string | null
status
string | null
submittedAt
string<date-time> | null
submittedById
string | null
approvedById
string | null
rejectionReason
string | null
lineItems
LineItemResponse · object[]
groupedLineItems
LineItemCategoryGroup · object[]