Upload a BOM file and read it into reviewable lines

Changed on

Multipart upload (file, optional userPrompt of at most 500 characters) of an xlsx, csv, pdf or image file of at most 10 MiB. A client that scanned the file first (POST bom-scan) sends the scan's documentKind (and documentReason), plus acknowledgedNotProductBom when the user chose to continue with a file that is not a product BOM; without documentKind Core scans the file once itself. A file that is not a product BOM is imported with low confidence: a warning, and every line needs review. The AI gateway extracts the line items (name, quantity, unit, stage) and each line is matched against the PCF factor library; the call waits for both. The import is returned with status ready, or error when extraction failed (errorMessage says why; reanalyze retries). Nothing is written to the BOM until the import is applied. 503 AI_GATEWAY_UNAVAILABLE when the gateway is not configured. Requires org.write_data.

post/pcf/products/{productId}/bom-imports

Request

  • Base URL
    https://api.greentally.ai/v1
  • Auth
    HTTP bearer

Path parameters

productIdstring required

Request body multipart/form-data

acknowledgedNotProductBomboolean

The user was told the file did not look like a product BOM and chose to continue. Recorded on the import only, not enforced: an upload of such a file without it is imported with low confidence just the same.

documentConfidence'high' | 'medium' | 'low'

How sure the scan is that the file is a product bill of materials; always low for another kind.

documentKind'product_bom' | 'construction_boq' | 'invoice_or_receipt' | 'ledger_or_table' | 'other'

What a BOM upload looks like, from the scan: a product bill of materials (a manufactured product's materials and components per product unit), or something else.

documentReasonstring

The scan's reason, when the client scanned the file (POST bom-scan) and it was not a product BOM.

filestring binary required
userPromptstring

Response

The import, read and matched

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    4 more changes in this revision