Skip to main content

Ocr Service

The Ocr Service allows us to OCR, process, and retrieve information from documents. Through this service, we can retrieve tax returns from fiscal documents.

This provider supports these data types:

Test OcrService integration:

1. Enable OcrService provider:

(PUT) /api/v6/providers/ocr_service
{
"enable": true
}

2. Settings OcrService provider:

(PUT) /api/v6/providers/ocr_service/settings
{
"auto_connect": false
}

3. Create OcrService data connection:

(POST) /api/v6/users/{userId}/data-connections
{
"requested_data_types": ["TAX_RETURN"],
"provider_name": "ocr_service"
}

4. Add a tax bundle document for OCR processing:

To add a tax bundle document for OCR processing, use the following endpoint:

(POST) /api/v6/input/users/{userId}/tax-returns/ocr-service
{
"tax_return_id": "string",
"data": {
"file": "file (base64)",
"closing_date": "2021-05-19",
"closing_year": "string",
"submitted_date": "2021-05-19",
"type": "string",
"duration": 0,
"privacy": "string"
}
}

5. Create a synchronization:

After validating that the data connection status is CONNECTED, you can run a new synchronization.

(POST) /api/v6/users/{userId}/sync
{
"data_types": ["TAX_RETURN"]
}

To verify that you are receiving the retrieved tax returns, check the following endpoints:

  • GET /api/v6/users/{userId}/tax-returns
  • GET /api/v6/users/{userId}/tax-returns/{taxReturnId}
  • GET /api/v6/users/{userId}/tax-return-analysis