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.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
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 the API 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
- 201
- 401
- 403
- 404
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.