Documentation Index
Fetch the complete documentation index at: https://docs.invaro.ai/llms.txt
Use this file to discover all available pages before exploring further.
Checking Processing Status
After submitting documents for processing, you can monitor their status using the job ID received in the processing response.
Status Endpoints
Invoices
Bank Statements
Schemas
curl "https://api.invaro.ai/api/v1/parse/invoices/{job_id}" \
-H "Authorization: Bearer your_api_key"
const response = await fetch(`https://api.invaro.ai/api/v1/parse/invoices/${job_id}`, {
headers: {
'Authorization': 'Bearer your_api_key'
}
});
const data = await response.json();
const status = data.data.status;
curl "https://api.invaro.ai/api/v1/parse/statements/{job_id}" \
-H "Authorization: Bearer your_api_key"
const response = await fetch(`https://api.invaro.ai/api/v1/parse/statements/${job_id}`, {
headers: {
'Authorization': 'Bearer your_api_key'
}
});
const data = await response.json();
const status = data.data.status;
You can also check the status or details of your configured schemas.
List All Schemas# Get the first page of schemas
curl "https://api.invaro.ai/api/v1/schemas/list" \
-H "Authorization: Bearer your_api_key"
See the List Schemas API Reference for pagination and filtering options.
Get Schema by IDcurl "https://api.invaro.ai/api/v1/schemas/id/{schema_id}" \
-H "Authorization: Bearer your_api_key"
See the Get Schema by ID API Reference for response details.
Status Response
The API returns the current status of the processing job:
{
"success": true,
"data": {
"job_id": "job_1739261168870934041",
"status": "completed", // or "processing", "pending", "failed"
"file_id": "sample_document.pdf",
"created_at": "2024-01-07T10:00:00Z",
"updated_at": "2024-01-07T10:01:00Z",
"progress": 100,
"results": {
// Processed document data
}
}
}
Status Values
- pending - Job is queued for processing
- processing - Document is being processed
- completed - Processing finished successfully
- failed - Processing failed
Implementing Status Polling
Here’s an example of how to implement status polling:
async function pollStatus(jobId, docType = 'invoices') {
while (true) {
const response = await fetch(`https://api.invaro.ai/api/v1/parse/${docType}/${jobId}`, {
headers: {
'Authorization': 'Bearer your_api_key'
}
});
const data = await response.json();
const status = data.data.status;
if (status === 'completed') {
return data.data.results;
} else if (status === 'failed') {
throw new Error('Processing failed');
}
// Wait 5 seconds before next check
await new Promise(resolve => setTimeout(resolve, 5000));
}
}
When polling for status, implement appropriate retry logic and error handling. We recommend polling every 5-10 seconds.
Next Steps
Code Examples
See complete code examples for the entire workflow