Extract expiry data from a base64-encoded file
post
https://api.expiryedge.com/v1/extractDocumentDirectany role30/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/extractDocumentDirect' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"base64Data": "JVBERi0xLjcKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFI+PgpzdHJlYW0K",
"fileName": "malpractice-insurance.pdf",
"mimeType": "application/pdf"
}'Antwort
{
"success": true,
"extraction": {
"documents": [
{
"name": "Professional Liability Policy",
"document_type": "insurance",
"issuing_authority": "Contoso Mutual",
"holder_name": "Northwind Dental LLC",
"reference_number": "PL-889120",
"start_date": "2025-10-15",
"expiry_date": "2026-10-15",
"vendor": "Contoso Mutual",
"notes": null,
"confidence": "high",
"extracted_fields": []
}
]
},
"fileName": "malpractice-insurance.pdf",
"ai_scans": {
"used": 8,
"limit": 25,
"remaining": 17,
"resets_at": "2026-10-01T00:00:00.000Z"
}
}The file is sent as base64 inside a JSON body (not multipart); max 10MB decoded. Uses 1 AI scan. Returns 403 ai_scan_feature_not_available when the plan has no AI scans.
When the monthly AI scan quota is used up it returns 429 with an AiScanQuotaError body.
base64DatastringerforderlichRaw file bytes, base64 encoded, without adata:URL prefix.fileNamestringmimeTypestringErlaubtapplication/pdfimage/pngimage/jpegimage/jpgimage/webpimage/gifimage/tiffStandardapplication/pdf
200
Extraction result.
successbooleanextractionobjectfileNamestringai_scansobjectAI scan quota after this call.
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
403 | The organization's plan does not include AI scans. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
500 | Unexpected server error. Retry later; quote requestId to support. |
