Create Sales Order from Extraction
POST/api/sales-orders/ocr/:extraction_id/create-order
Create a sales order from a reviewed OCR extraction. The request body contains the confirmed/edited field values from the review UI.
When save_sku_mappings is true, any resolved customer SKU-to-product mappings from the extraction lines are persisted to the customer's SKU mapping table for future use.
ship_to_address (optional, nullable object): the per-PO shipping destination extracted from the customer PO's "Ship To" block. A customer can have a different ship-to address on each PO, so this is captured per-extraction rather than read from the customer's default address. When present and non-empty, it is passed through to SalesOrderManager as the order's shipping_address. Fields: name, company, address1, address2, city, province (all nullable, max 255), zip (nullable, max 50), country_code (nullable, max 10). Omit or send null when the PO states no separate shipping destination.
Returns the newly created sales order id and number, and marks the extraction status as 'confirmed'.
Request
Responses
- 200
Successful response