Overview
This page aims to showcase how to synchronize a specific invoice, the possible issues during the synchronization, and how to troubleshoot them.1. Before pushing an invoice
The following requirements must be met before pushing an invoice to your accounting system:- Either the organization setting
accounting.ledger_account_ids.productsmust be specified, or each product listed on an invoice (both catalog products and inline products) must have theledger_account_idspecified. - The accounting system must include tax rates with the same numerical values as used in the invoice in Tesouro.
- If the invoice includes special deductions or incentives, the organization setting
accounting.tax_ids.deductionsmust be specified.
2. Run the synchronization
The synchronization automatically happens every hour following the initial synchronization between Tesouro and the organization’s accounting system. This action maps all the related objects between Tesouro and the accounting system. You can also trigger the data synchronization on demand by callingPOST /accounting-connections/{connection_id}/sync:
draft to issued status.
3. Check for a specific invoice
The synchronization time may vary according to the size of the invoice. You can check the status of the synchronization by callingGET /accounting-synced-records?object_type=receivable&object_id={object_id}.
The query parameter object_type is mandatory. You can sort and filter the results by other fields. For the full list of available sort and filter parameters, see the GET /accounting-synced-records endpoint:
synced_record_id:
Troubleshooting
Failed syncs return theerrors field, which contains the error status with details:
Tax rate does not exist
Tax rate does not exist
Ensure that a tax rate with the exact numerical value exists in the accounting platform. Receivable line items include the
accounting_tax_rate_id field, which allows overriding the default tax rate when pushing invoices to an accounting system. Valid tax rate IDs can be retrieved using the GET /accounting-tax-rates endpoint.POST /accounting-synced-records/{synced_record_id}/push. This action requires the synced_record_id of the related error entry.
If you continue to experience issues and need further assistance with the accounting integration, please contact our Support Team.