curl --location --request PUT 'https://api.stateset.com/v1/bill_of_materials' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"bill_of_materials_id": "example_1",
"name": "Example 1",
"mapping": {"40": "213", "134": "386"},
"properties": {"filterValue": "value"}
}'
const updated = await stateset.billofmaterials.update(
'bom_ODkRWQtx9NVsRX'
);
mutation (
$id: String
$bill_of_materials: bill_of_materials_set_input!
) {
update_bill_of_materials (
where: { id : { _eq: $id}}
_set: $bill_of_materials
) {
returning {
created_at
description
groups
id
number
name
updated_at
valid
}
}
}`;
updated = stateset.billofmaterials.update(
'bom_ODkRWQtx9NVsRX'
)
updated = Stateset::BillOfMaterials.update(
'bom_ODkRWQtx9NVsRX'
)
$updated = $stateset->billofmaterials->update(
'bom_ODkRWQtx9NVsRX'
);
updated, err := stateset.BillOfMaterials.Update(
'bom_ODkRWQtx9NVsRX'
)
BillOfMaterials updated = stateset.billOfMaterials.update(
'bom_ODkRWQtx9NVsRX'
);
{
"id": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"name": "Bill of Materials",
"description": "Bill of Materials",
"groups": "Bill of Materials",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z",
"valid": true,
"line_items": [
{
"id": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"bill_of_materials_number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"line_type": "Bill of Materials",
"part_number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"part_name": "Bill of Materials",
"purchase_supply_type": "Bill of Materials",
"quantity": 1,
"status": "Bill of Materials"
}
]
}
Update Bill of Materials
This endpoint updates an existing bill of materials.
PUT
/
v1
/
bill_of_materials
/
{id}
curl --location --request PUT 'https://api.stateset.com/v1/bill_of_materials' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"bill_of_materials_id": "example_1",
"name": "Example 1",
"mapping": {"40": "213", "134": "386"},
"properties": {"filterValue": "value"}
}'
const updated = await stateset.billofmaterials.update(
'bom_ODkRWQtx9NVsRX'
);
mutation (
$id: String
$bill_of_materials: bill_of_materials_set_input!
) {
update_bill_of_materials (
where: { id : { _eq: $id}}
_set: $bill_of_materials
) {
returning {
created_at
description
groups
id
number
name
updated_at
valid
}
}
}`;
updated = stateset.billofmaterials.update(
'bom_ODkRWQtx9NVsRX'
)
updated = Stateset::BillOfMaterials.update(
'bom_ODkRWQtx9NVsRX'
)
$updated = $stateset->billofmaterials->update(
'bom_ODkRWQtx9NVsRX'
);
updated, err := stateset.BillOfMaterials.Update(
'bom_ODkRWQtx9NVsRX'
)
BillOfMaterials updated = stateset.billOfMaterials.update(
'bom_ODkRWQtx9NVsRX'
);
{
"id": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"name": "Bill of Materials",
"description": "Bill of Materials",
"groups": "Bill of Materials",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z",
"valid": true,
"line_items": [
{
"id": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"bill_of_materials_number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"line_type": "Bill of Materials",
"part_number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"part_name": "Bill of Materials",
"purchase_supply_type": "Bill of Materials",
"quantity": 1,
"status": "Bill of Materials"
}
]
}
Body
string
This is the id of the bill of materials
string
This is the number of the bill of materials
string
This is the name of the bill of materials
string
This is the description of the bill of materials
string
This is the groups of the bill of materials
string
This is the date and time when the bill of materials was created
string
This is the date and time when the bill of materials was last updated
boolean
This indicates whether the bill of materials is valid or not
Response
string
This is the id of the bill of materials.
string
This is the number of the bill of materials.
string
This is the name of the bill of materials.
string
This is the description of the bill of materials.
string
This is the groups of the bill of materials.
string
This is the date and time when the bill of materials was created.
string
This is the date and time when the bill of materials was last updated.
boolean
This indicates whether the bill of materials is valid or not.
object
This is an array of line items associated with the bill of materials.
Show Show child attributes
Show Show child attributes
string
This is the id of the line item.
string
This is the number of the bill of materials to which the line item belongs.
string
This is the type or category of the line item.
string
This is the number or code associated with the part or item.
string
This is the name of the part or item.
string
This is the type or category of the purchase/supply associated with the line item.
number
This is the quantity of the part or item required in the bill of materials.
string
This is the status or state of the line item.
curl --location --request PUT 'https://api.stateset.com/v1/bill_of_materials' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"bill_of_materials_id": "example_1",
"name": "Example 1",
"mapping": {"40": "213", "134": "386"},
"properties": {"filterValue": "value"}
}'
const updated = await stateset.billofmaterials.update(
'bom_ODkRWQtx9NVsRX'
);
mutation (
$id: String
$bill_of_materials: bill_of_materials_set_input!
) {
update_bill_of_materials (
where: { id : { _eq: $id}}
_set: $bill_of_materials
) {
returning {
created_at
description
groups
id
number
name
updated_at
valid
}
}
}`;
updated = stateset.billofmaterials.update(
'bom_ODkRWQtx9NVsRX'
)
updated = Stateset::BillOfMaterials.update(
'bom_ODkRWQtx9NVsRX'
)
$updated = $stateset->billofmaterials->update(
'bom_ODkRWQtx9NVsRX'
);
updated, err := stateset.BillOfMaterials.Update(
'bom_ODkRWQtx9NVsRX'
)
BillOfMaterials updated = stateset.billOfMaterials.update(
'bom_ODkRWQtx9NVsRX'
);
{
"id": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"name": "Bill of Materials",
"description": "Bill of Materials",
"groups": "Bill of Materials",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z",
"valid": true,
"line_items": [
{
"id": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"bill_of_materials_number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"line_type": "Bill of Materials",
"part_number": "5f7b1b4a-5b0b-4b0a-8b0b-4b0a5b0b4a5b",
"part_name": "Bill of Materials",
"purchase_supply_type": "Bill of Materials",
"quantity": 1,
"status": "Bill of Materials"
}
]
}
โI