Change payable status
You can manually change the status of the payables and move them through the lifecycle until their payment. See Manual transition for more information. Alternatively, we recommend that you implement approval policies to manage the payables transitions.Get payables analytics
You can obtain aggregated statistics for the total number and sum total amount of all existing payables, along with the breakdown per payable status. To do this, send aGET request to the /payables/analytics endpoint.
The results can be filtered by a specific time period, counterpart, or other search filters. For the full list of available sort and filter parameters, see the GET /payables/analytics endpoint.
For example, to get statistics about all payables in the approve_in_progress and waiting_to_be_paid statuses, call GET /payables/analytics?status__in=approve_in_progress&status__in=waiting_to_be_paid:
GET /payables/analytics?created_at__gte=2023-10-01T14%3A48%3A00Z&created_at__lte=2023-10-31T14%3A48%3A00Z- Get statistics about all payables for a specific period.GET /payables/analytics?counterpart_name=Acme%20Inc.- Get statistics about all payables for a specific counterpart. */
List all payables
It is possible to view all the payables in the Tesouro space. To allow the right level of access to the authorized users, Tesouro allows certain organization users to view them but not change uploads. To list all payables, callGET /payables. You can sort and filter the results by the amount, status, and other fields. For the full list of available sort and filter parameters, see the GET /payables endpoint.
Some examples:
Sample request to fetch 100 payables:
prev_pagination_token and next_pagination_token fields in the response are pagination tokens.
Retrieve a payable
Once a payable is uploaded, the organization and organization users can review the information extracted from the payable by the OCR system. To retrieve a payable, callGET /payables/{payable_id}:
Update a payable
Payables in thedraft and new statuses can be updated, for example, to provide additional details or fix the information extracted by OCR. To update a payable, send a PATCH request to the /payables/{payable_id} endpoint with the request body containing the new field values. For example, to update the description field:
Delete a payable
Payables in any status can be deleted by calling theDELETE /payables/{payable_id} endpoint:
This action is irreversible, and once deleted, payables can no longer be accessed.