Answer: pdf-to-data extracts the fields you describe in a schema object and returns each value with a confidence score; three credits. When the lowest score falls below confidence_threshold the result is marked needs_review and waits in the review queue, where you correct and approve it — approval fires the review.approved webhook with the corrected data.
Request
Upload to the v1 tool route with the schema in options, or post JSON with a file_url to /api/v1/extract/data. A missing or empty schema is a 400 schema_required.
curl -X POST https://www.ashdocs.com/api/v1/tools/pdf-to-data \
-H "X-API-Key: ash_test_xxxxxxxx" \
-F "files=@invoice.pdf" \
-F 'options={"schema":{"invoice_number":"string","total":"number"},"confidence_threshold":0.9}'The review queue
The four review routes in the table are session (dashboard) routes. A result created with zero retention writes no review row, so it never enters the queue — its confidence stays inline in the response only.
Options and review routes
Generated from the backend source.
| Sent in | Key | What it does |
|---|---|---|
| pdf-to-data options / /api/v1/extract/data body | schema | Required, non-empty object describing the fields to extract. Missing or empty is a 400 schema_required. |
| options / form field | confidence_threshold | Default 0.85. When the lowest field confidence is below it, the result is marked needs_review and enters the review queue. |
| /api/v1/extract/tables and /extract/bank-statement | confidence_threshold (form) | The same threshold as a multipart form field on the extract endpoints. |
| options | on_low_confidence | fail returns 422 low_confidence instead of completing; flag (default) or ignore completes the job and reports needs_review. |
| review queue | GET /api/review | Your results awaiting review (only_pending=true by default; limit up to 200), each with signed links to its source file. |
| review queue | GET /api/review/{result_id} | One result with its extracted data, confidence and source file. |
| review queue | PATCH /api/review/{result_id} | Save corrected extracted_json; approve: true clears needs_review and fires the review.approved webhook. |
| review queue | POST /api/review/{result_id}/reject | Reject the result: it leaves the queue marked rejected. |
Frequently asked questions
What happens when confidence is low?
The job completes with needs_review: true and the result waits in the review queue. Send on_low_confidence: fail to get a 422 low_confidence instead.
Which model does the extraction?
Claude Sonnet 5.
Do zero-retention results appear in the review queue?
No. Zero retention stores no review row, so only the inline response carries the confidence.