All Collections
Apideck Unify
How to download invoices from the Accounting API
How to download invoices from the Accounting API

Download invoices via the Proxy API

Updated over a week ago

Downloading invoices is not a dedicated endpoint on the Accounting API yet. You can use the Proxy API to download the invoices directly to work around this. Please find a few examples below:

For QuickBooks: CURL example

curl --location --request GET '<https://unify.apideck.com/proxy>' \\ --header 'x-apideck-consumer-id: ******' \\ --header 'x-apideck-app-id: ***********' \\ --header 'x-apideck-service-id: quickbooks' \\ --header 'x-apideck-downstream-url:<https://sandbox-quickbooks.api.intuit.com/v3/company/{company_id}/invoice/{id}/pdf?minorversion=63>' \\ --header 'Accept: application/pdf' \\ --header 'Authorization: Bearer ********'

For Sage Business Accounting: CURL example

curl --location --request GET '<https://unify.apideck.com/proxy>' \\ --header 'x-apideck-consumer-id: ******' \\ --header 'x-apideck-app-id: ***********' \\ --header 'x-apideck-service-id: sage-business-cloud-accounting' \\ --header 'x-apideck-downstream-url:<https://api.accounting.sage.com/v3.1/sales_invoices/{id}>' \\ --header 'Accept: application/pdf' \\ --header 'Authorization: Bearer ********'

For Xero: CURL example

curl --location --request GET '<https://unify.apideck.com/proxy>' \\ --header 'x-apideck-consumer-id: ******' \\ --header 'x-apideck-app-id: ***********' \\ --header 'x-apideck-service-id: xero' \\ --header 'x-apideck-downstream-url: <https://api.xero.com/api.xro/2.0/Invoices/{id}>' \\ --header 'Accept: application/pdf' \\ --header 'Authorization: Bearer ********'
Did this answer your question?