curl --location --request PUT 'https://api.stateset.com/v1/bill_of_materials' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"user_group_id": "example_1",
"name": "Example 1",
"mapping": {"40": "213", "134": "386"},
"properties": {"filterValue": "value"}
}'
{
{
"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"
}
]
}
}
This endpoint updates an existing bill of materials.
curl --location --request PUT 'https://api.stateset.com/v1/bill_of_materials' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"user_group_id": "example_1",
"name": "Example 1",
"mapping": {"40": "213", "134": "386"},
"properties": {"filterValue": "value"}
}'
{
{
"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"
}
]
}
}
Show Show child attributes
curl --location --request PUT 'https://api.stateset.com/v1/bill_of_materials' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--data-raw '{
"user_group_id": "example_1",
"name": "Example 1",
"mapping": {"40": "213", "134": "386"},
"properties": {"filterValue": "value"}
}'
{
{
"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"
}
]
}
}