bomWhereUsed
Requires permission biddesk:assembly:read.
Every bill-of-materials version that holds a product, directly (depth 1) or through sub-assemblies, up to 12 levels; released versions only unless includeDrafts. Sorted by depth, assembly, version number. Requires Bid Desk with engineered products and permission to read 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
query BomWhereUsed($productId: ID!) {
bomWhereUsed(productId: $productId) {
status
assemblyProductId
componentProductId
depth
quantity
versionId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query BomWhereUsed($productId: ID!) {\n bomWhereUsed(productId: $productId) {\n status\n assemblyProductId\n componentProductId\n depth\n quantity\n versionId\n }\n}",
"variables": {
"productId": "id"
}
}
EOF
Variables:
{
"productId": "id"
}
Response:
{
"data": {
"bomWhereUsed": [
{
"status": "DRAFT",
"assemblyProductId": "id",
"componentProductId": "id",
"depth": 0,
"quantity": "string",
"versionId": "id"
}
]
}
}
bomWhereUsed(
includeDrafts: Boolean
productId: ID!
): [BomWhereUsed!]!
Arguments
bomWhereUsed.includeDrafts ● Boolean scalar
Also search draft versions. Default false.
bomWhereUsed.productId ● ID! non-null scalar
The product to look up.
Type
BomWhereUsed object
One place a product is used: a bill-of-materials version that holds it, directly (depth 1) or through sub-assemblies.