Idempotency Supported
This API triggers export of invoice data. The exported zip file contains CSV files with invoice-related data.
Invoice Export Best Practice
For a full export, Chargebee recommends exporting data in batches by using date filters. The table below provides examples of how to set the filters:
| Scenario | Filter Example | Description |
|---|---|---|
| Export invoices updated after January 1, 2024 | invoice[updated_at][after] = "1704067200" | Export invoices from January 1, 2024 onwards. |
| Export invoices for 2023 | invoice[updated_at][between] = "[1672531200,1704067199]" | Export all invoices for the year 2023. |
| Export invoices for 2022 | invoice[updated_at][between] = "[1640995200,1672531199]" | Export all invoices for the year 2022. |
If the export still fails, further reduce the date range, for example:
| Scenario | Filter Example | Description |
|---|---|---|
| Export for the second half of 2024 | invoice[updated_at][after] = "1717200000" | Export invoices are updated after June 1, 2024. |
| Export for the first half of 2024 | invoice[updated_at][between] = "[1704067200,1717199999]" | Export invoices updated between January 1, 2024, and May 31, 2024. |
| Export for the second half of 2023 | invoice[updated_at][between] = "[1685577600,1704067199]" | Export invoices updated between June 1, 2023, and December 31, 2023. |
| Export for the first half of 2023 | invoice[updated_at][between] = "[1672531200,1685577599]" | Export invoices updated between January 1, 2023, and May 31, 2023. |
Note
The date ranges in the examples above are just suggestions; you can adjust the date window to fit your specific needs. If an export fails due to large data volume, reduce the date window further and retry the export.
Sample Request
Sample Result[JSON]
URL Format
POST https://[site].chargebee.com/api/v2/exports/invoices
Input Parameters
Returns
Export object
Resource object representing export