Retry Failed Extraction
POST/api/document-inbox/customer_po/:extraction_id/retry
Re-dispatch OCR processing for a failed extraction. Path param type must be one of customer_po, supplier_invoice, vendor_credit, or landed_cost_invoice (regex-constrained); id is the matching extraction ID.
Validations (return 422):
- Extraction status must be 'failed'
- Original file must still be present (file_path != null)
- type must be customer_po, supplier_invoice, vendor_credit, or landed_cost_invoice
On success for customer_po / supplier_invoice: resets the extraction status to 'processing', clears error_message, dispatches the appropriate OCR job.
For vendor_credit: routes, which claims the extraction for processing, then re-runs the parse from the stored Azure raw_response synchronously when available (no second Azure charge), or dispatches the Scan Credit Memo job otherwise. Returns 422 with the manager's error message if the credit's documents are locked or a scan is already in progress.
For landed_cost_invoice: routes, which marks the extraction as processing and re-dispatches a background job. Returns 422 with the manager's error message on failure.
Response 200:
{ "message": "Retry queued." }
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
Successful response
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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.