Example: A spend management tool syncs supplier invoices from Qonto nightly to match them against purchase orders and flag any discrepancies before payment.Prerequisites:
- At least one supplier invoice exists in Qonto.
- Scopes:
supplier_invoice.read,attachment.read
Initialize the sync timestamp
Same approach as client invoices: load the last successful sync timestamp from your database and capture the current time.
- Python
- Node.js
Fetch all supplier invoices updated in the time window
List supplier invoices updated between your last sync and now, sorted chronologically and paginated.Endpoint: List supplier invoices
OAuth scope required:
supplier_invoice.read.Additional filters are available:
filter[status] (e.g., to_review, to_pay, paid), filter[due_date], and filter[created_at_from] / filter[created_at_to].- Python
- Node.js
Retrieve and download attachments
For each invoice with an
attachment_id, fetch the attachment and download the file. The attachment URL expires in 30 minutes — download immediately.Endpoint: Retrieve an attachmentOAuth scope required:
attachment.read.- Python
- Node.js
We now have an up-to-date local copy of all supplier invoices and their attachments for the given time window.