Procurement

Extract Document

Trigger extraction on an uploaded document.

This endpoint:

  1. Downloads the PDF from Supabase Storage
  2. Runs the appropriate extractor (PO, OC, RD, or Invoice)
  3. Classifies parts to extract properties (pipe_size, material, schedule, etc.)
  4. Saves extracted items to procurement_extracted_items
  5. For POs: Creates new material_tracking entries with properties
  6. For OCs/RDs: Matches to existing materials and updates status
  7. For INVOICE: extracts line items for the same manual review flow
post/api/procurement/extract

Request

  • Base URL: https://api.jeevyfabrication.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.jeevyfabrication.com/api/procurement/extract
  • Auth: none declared

Request body

document_idinteger required
document_typestring required
file_pathstring required
project_idinteger nullable
vendor_idinteger nullable

Response

Successful Response

successboolean required
document_idinteger required
items_extractedinteger
materials_createdinteger
materials_updatedinteger
unmatched_itemsinteger
classified_itemsinteger
errorstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.