commitBomImport
Requires permission biddesk:assembly:manage.
Creates a draft bill of materials for every assembly in the previewed file, all or nothing. Nothing is released. 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
mutation CommitBomImport($input: BomImportInput!, $previewHash: String!) {
commitBomImport(input: $input, previewHash: $previewHash) {
lineCount
versions {
assemblyProductId
lineCount
versionId
versionNo
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CommitBomImport($input: BomImportInput!, $previewHash: String!) {\n commitBomImport(input: $input, previewHash: $previewHash) {\n lineCount\n versions {\n assemblyProductId\n lineCount\n versionId\n versionNo\n }\n }\n}",
"variables": {
"input": {
"fileKey": "string",
"mapping": [
{
"field": "string",
"header": "string"
}
],
"sheet": "string",
"structure": "LEVEL"
},
"previewHash": "string"
}
}
EOF
Variables:
{
"input": {
"fileKey": "string",
"mapping": [
{
"field": "string",
"header": "string"
}
],
"sheet": "string",
"structure": "LEVEL"
},
"previewHash": "string"
}
Response:
{
"data": {
"commitBomImport": {
"lineCount": 0,
"versions": [
{
"assemblyProductId": "string",
"lineCount": 0,
"versionId": "string",
"versionNo": 0
}
]
}
}
}
commitBomImport(
input: BomImportInput!
previewHash: String!
): BomImportResult!
Arguments
commitBomImport.input ● BomImportInput! non-null input
The sheet and mapping that were previewed.
commitBomImport.previewHash ● String! non-null scalar
The hash the preview returned.
Type
BomImportResult object
The drafts a BOM import created.