previewBomImport
Requires permission biddesk:assembly:manage.
What an import would do: the tree, each problem by row and the SKUs not found. Writes nothing. Requires Bid Desk, the engineered-product feature 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
query PreviewBomImport($input: BomImportInput!) {
previewBomImport(input: $input) {
canCommit
previewHash
problemTotal
assemblies {
blockedByDraft
new
newVersionOfReleased
total
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query PreviewBomImport($input: BomImportInput!) {\n previewBomImport(input: $input) {\n canCommit\n previewHash\n problemTotal\n assemblies {\n blockedByDraft\n new\n newVersionOfReleased\n total\n }\n }\n}",
"variables": {
"input": {
"fileKey": "string",
"mapping": [
{
"field": "string",
"header": "string"
}
],
"sheet": "string",
"structure": "LEVEL"
}
}
}
EOF
Variables:
{
"input": {
"fileKey": "string",
"mapping": [
{
"field": "string",
"header": "string"
}
],
"sheet": "string",
"structure": "LEVEL"
}
}
Response:
{
"data": {
"previewBomImport": {
"canCommit": true,
"previewHash": "string",
"problemTotal": 0,
"assemblies": {
"blockedByDraft": 0,
"new": 0,
"newVersionOfReleased": 0,
"total": 0
}
}
}
}
previewBomImport(
input: BomImportInput!
): BomImportPreview!
Arguments
previewBomImport.input ● BomImportInput! non-null input
The sheet and mapping to preview.
Type
BomImportPreview object
What a BOM import would do. Nothing is written.