CreateBillOfMaterial
Creates a new bill of materials.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | BillOfMaterialInput! | BOM data. |
mutation CreateBillOfMaterial($input: BillOfMaterialInput!) {
CreateBillOfMaterial(input: $input) {
id
label
active
is_default
variant_id
components {
id
quantity
weight
component {
id
label
}
}
}
}UpdateBillOfMaterial
Updates an existing bill of materials.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | BOM ID. |
input | BillOfMaterialInput! | Updated fields. |
DeleteBillOfMaterial
Deletes a bill of materials.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | BOM ID. |
SetDefaultBillOfMaterial
Sets a BOM as the default for its variant.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | BOM ID. |
EnableBillOfMaterials
Enables one or more bills of materials.
Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | [ID!]! | List of BOM IDs. |
DisableBillOfMaterials
Disables one or more bills of materials.
Parameters:
| Parameter | Type | Description |
|---|---|---|
ids | [ID!]! | List of BOM IDs. |
BillOfMaterialInput data type
| Field | Type | Description |
|---|---|---|
label | String | BOM name. |
description | String | Optional description. |
active | Boolean | Whether active. |
is_default | Boolean | Whether default. |
variant | ProductVariantIDInput | Product variant. |
components | [BillOfMaterialComponentInput] | Components list. |
BillOfMaterialComponentInput data type
Data Types
VariantComponentInput
VariantComponentInputAssemblyInput
AssemblyInput| Field | Type | Description |
|---|---|---|
id | ID | Assembly ID (for updates). |
quantity | Float | Quantity to assemble. |
location_id | ID | Location ID. |
batch_number | AssemblyBatchNumberInput | Batch number details. |
components | [AssemblyComponentInput] | Components list. |
AssemblyComponentInput
AssemblyComponentInput| Field | Type | Description |
|---|---|---|
id | ID | Component ID (for updates). |
quantity | Float | Quantity. |
batch_numbers | [AssemblyBatchNumberInput] | Batch numbers. |
AssemblyBatchNumberInput
AssemblyBatchNumberInput| Field | Type | Description |
|---|---|---|
id | ID | Batch number ID (for updates). |
quantity | Float | Quantity. |
data | BatchNumberInput | Batch number details. |
serial_numbers | [SerialNumberInput] | Serial numbers for this batch. |
serial_number_text | String | Serial number text. |
