This section gives a step-by-step example for fetching bookkeeping data and optionally marking verifications as synced. It assumes activation level organization.company (API calls are then scoped to that company).
Fetch confirmed verification groups after a given date (e.g. 30 days before the run).
- Unconfirmed groups have no
confirmation_dateand are excluded. - For minimal payload, add
_slim=trueto return onlyid.
Endpoint: GET /accounting/bookkeeping/verificationgroup/list/
GET .../accounting/bookkeeping/verificationgroup/list/?_page=1&_page_size=500&confirmation_date__gte=2024-01-15Query parameters:
- _page — Page number (e.g. 1)
- _page_size — Page size (e.g. 500)
- confirmation_date__gte — Only groups confirmed on or after this date (e.g. 2024-01-15)
Fetch accounting.verification items in the groups from step 1, with a registration date filter (e.g. same 30-day window) to avoid re-syncing old data.
- Filtering on
registration_dateis recommended to avoid duplicate syncs.
Endpoint: GET /accounting/bookkeeping/verification/list/
GET .../accounting/bookkeeping/verification/list/?_page=1&_page_size=500®istration_date__gte=2024-01-15&verification_group__in=<group-id-1>,<group-id-2>Query parameters:
- _page — Page number (e.g. 1)
- _page_size — Page size (e.g. 500)
- registration_date__gte — Only verifications registered on or after this date (e.g. 2024-01-15)
- verification_group__in — Comma-separated IDs from step 1
Fetch accounting.transaction items for the verifications from step 2.
Endpoint: GET /accounting/bookkeeping/transaction/list/ (or equivalent transaction list in the API)
GET .../accounting/bookkeeping/transaction/list/?_page=1&_page_size=500&verification__in=<verification-id-1>,<verification-id-2>Query parameters:
- _page — Page number (e.g. 1)
- _page_size — Page size (e.g. 500)
- verification__in — Comma-separated verification IDs from step 2
- Collect the set of invoice IDs from the
invoicefield on the verifications from step 2. - Fetch accounting.invoicerelatedpdffile items.
Endpoint: List endpoint for invoice-related PDF files (see API Reference).
GET .../accounting/invoicerelatedpdffile/list/?_page=1&_page_size=500&invoice__in=<invoice-id-1>,<invoice-id-2>Query parameters:
- _page — Page number (e.g. 1)
- _page_size — Page size (e.g. 500)
- invoice__in — Comma-separated invoice IDs from verifications (step 2)
You can record that a verification has been synced/processed. This reduces duplicate syncs and allows Pigello UI to show sync status.
- POST to the list endpoint for integrations.integrationserviceidconnection with a list of items.
- Set
content_typeto{"id":"accounting.verification"}andobject_idto the verification ID. - Set
external_idto the ID in your external system.
Endpoint: List endpoint for integrations.integrationserviceidconnection.
To list connections for verifications:
GET .../integrations/integrationserviceidconnection/list/accounting.verification/?_page=1&_page_size=500Query parameters:
- _page — Page number (e.g. 1)
- _page_size — Page size (e.g. 500)
Notes:
- All activations of your integration can read each other's integration-service-id connections (e.g. Company A can see connections for Company B).