New to the Accounting Entries API?
API Overview
What an Accounting Entry is and how the API is structured.
API Scopes
Required scope:
accounting-entries:read.Generate API Keys
How to generate standalone API keys for authenticating your integration.
Standalone API Key Guide
End-to-end guide for authenticating with standalone API keys.
Standalone API Keys with Postman
How to make API calls using standalone API keys in Postman.
Getting Started
You need API credentials with at least theaccounting-entries:read scope. Once authenticated, you can use these endpoints.
Key Differences
- Pass the legacy
expenseIdas theaccountingEntryId, because both identify the same record. - The search endpoint is new. It returns receipts across Accounting Entries, so you no longer list the receipts of each Accounting Entry one by one.
- The request body must include
includeDeleted(set it totrueto include deleted receipts). You can also filter byaccountingEntryIds,employeeIds,fileType,mimeTypeandsource. - The search endpoint needs one of the
company_id,partner_idororganization_idquery parameters. - The receipt endpoints return the
ORIGINALfile by default. To getTHUMBNAILorPREVIEW, set thefile_typequery parameter on the GET endpoint, orfileTypein the body of the search. - The list and search endpoints use cursor-based pagination. Use
limitto set the page size. To read the next page, send theendCursorfrom the response asafter, untilhasNextPageisfalse. Usesorting_keysandsorting_orderto sort the results. - The
urlof a receipt expires after 24 hours. Request the receipt again to get a newurl.
Field Mapping
The table below maps fields from the legacyReceipt model to their equivalents in the receipt object that the Accounting Entries API returns.
—: field is not available in the Accounting Entries API receipt*: data is the same but represented differently
New Fields in the Accounting Entries API Receipt
The following fields are available on the Accounting Entries API receipt with no equivalent in the legacy Receipt API.FAQs
Which API replaces the legacy Receipt API?
It depends on whether you run an export.
- If you book expenses in an Accounting System, use the Export API (v3). It provides receipts as attachments on Export Items.
- To get receipts outside an Export Job, use the Accounting Entries API.
How do I get receipts outside an Export Job?
- Use
GET /v1/accounting-entries/{accountingEntryId}/receipts. Pass the legacyexpenseIdas theaccountingEntryId, because both identify the same record. - To search the receipts of many Accounting Entries in one request, use
POST /v1/accounting-entries/receipts:search. - The endpoints return the
ORIGINALfile by default. ForTHUMBNAILorPREVIEW, set thefile_typequery parameter on the GET endpoint, orfileTypein the body of the search. - The receipt
urlexpires after 24 hours.