saveBomOptions
Requires permission biddesk:assembly:manage.
Adds, changes and removes option groups (pick one / optional extras) and decision-table rules (requires / excludes / lookup) of a draft bill of materials, and moves lines into or out of groups, in one save. The whole tree is checked; any problem refuses the save as BOM_INVALID with errors, and nothing is written. Refused with BOM_VERSION_NOT_DRAFT on a released or obsolete version, BOM_TOO_LARGE over 200 groups or 500 rules and VERSION_CONFLICT when someone saved first. Requires Bid Desk with engineered products and permission to manage assemblies.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SaveBomOptions($input: SaveBomOptionsInput!) {
saveBomOptions(input: $input) {
version
versionId
lineGroups {
lineId
optionGroupKey
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SaveBomOptions($input: SaveBomOptionsInput!) {\n saveBomOptions(input: $input) {\n version\n versionId\n lineGroups {\n lineId\n optionGroupKey\n }\n }\n}",
"variables": {
"input": {
"expectedVersion": 0,
"versionId": "id"
}
}
}
EOF
Variables:
{
"input": {
"expectedVersion": 0,
"versionId": "id"
}
}
Response:
{
"data": {
"saveBomOptions": {
"version": 0,
"versionId": "id",
"lineGroups": [
{
"lineId": "id",
"optionGroupKey": "string"
}
]
}
}
}
saveBomOptions(
input: SaveBomOptionsInput!
): BomOptions!
Arguments
saveBomOptions.input ● SaveBomOptionsInput! non-null input
The groups, rules and line groups to save.
Type
BomOptions object
The option groups, decision-table rules and line groups of one bill-of-materials version.