curl -X POST "https://api.clevrscan.com/api/sync/detect_document" \
-H "X-API-Key: <api_key>" \
-F "file=@invoice.pdf"
{
"result": "```json\n{\n \"type\": \"Invoice\",\n \"fields\": [\n \"Company Name\",\n \"Company Address\",\n \"Bill To\",\n \"Ship To\",\n \"Invoice Number\",\n \"Invoice Date\",\n \"P.O. Number\",\n \"Due Date\",\n \"Invoice Total\",\n \"Quantity\",\n \"Description\",\n \"Unit Price\",\n \"Amount\",\n \"Subtotal\",\n \"GST\",\n \"Terms & Conditions\",\n \"Payment Due Date\",\n \"Bank Name\",\n \"Account Number\",\n \"Routing Number\"\n ]\n}\n```"
}
Template Endpoints
Detect Document
Uploads a document for synchronous detection and classification. Returns detection results immediately (blocking request).
POST
/
api
/
sync
/
detect_document
curl -X POST "https://api.clevrscan.com/api/sync/detect_document" \
-H "X-API-Key: <api_key>" \
-F "file=@invoice.pdf"
{
"result": "```json\n{\n \"type\": \"Invoice\",\n \"fields\": [\n \"Company Name\",\n \"Company Address\",\n \"Bill To\",\n \"Ship To\",\n \"Invoice Number\",\n \"Invoice Date\",\n \"P.O. Number\",\n \"Due Date\",\n \"Invoice Total\",\n \"Quantity\",\n \"Description\",\n \"Unit Price\",\n \"Amount\",\n \"Subtotal\",\n \"GST\",\n \"Terms & Conditions\",\n \"Payment Due Date\",\n \"Bank Name\",\n \"Account Number\",\n \"Routing Number\"\n ]\n}\n```"
}
Request Format
Option 1:Multipart Form DataPOST /api/sync/detect_document
Content-Type: multipart/form-data
X-API-Key: <api_key>
file: <binary file>
Parameters
| Parameter | Type | Required | Location | Description |
|---|---|---|---|---|
| file | File | Yes | Body | Document file (PDF, image, etc.) to detect |
| api_key | String | Yes | Header | API key |
curl -X POST "https://api.clevrscan.com/api/sync/detect_document" \
-H "X-API-Key: <api_key>" \
-F "file=@invoice.pdf"
{
"result": "```json\n{\n \"type\": \"Invoice\",\n \"fields\": [\n \"Company Name\",\n \"Company Address\",\n \"Bill To\",\n \"Ship To\",\n \"Invoice Number\",\n \"Invoice Date\",\n \"P.O. Number\",\n \"Due Date\",\n \"Invoice Total\",\n \"Quantity\",\n \"Description\",\n \"Unit Price\",\n \"Amount\",\n \"Subtotal\",\n \"GST\",\n \"Terms & Conditions\",\n \"Payment Due Date\",\n \"Bank Name\",\n \"Account Number\",\n \"Routing Number\"\n ]\n}\n```"
}
⌘I