Export invoice files
Learn how to export and download invoice files.
Learn how to export and download invoice files.
Prerequisites
To complete this tutorial, you must have:
- Authorization from the selling partner for whom you are making calls. For more information, refer to Authorizing Selling Partner API applications.
- The Tax Invoicing role assigned to your developer profile.
- The Tax Invoicing role selected on the App registration page for your application.
Step 1. Create an invoice export
Call the createInvoicesExport operation and specify the marketplace, date range, and any optional parameters you want to include.
If the request is successful, the response includes an exportId value.
Tip
To reduce export processing time, use short date intervals for
dateStartanddateEnd. The optimal range is one day.
Step 2. Verify that export processing is complete
Periodically call the getInvoicesExport operation. Pass the exportId value that you received in Step 1 until processing is complete (processingStatus is CANCELLED, DONE, or FATAL). At this point, the response includes an exportDocumentId value if invoice data is available.
Step 3. Get the invoice document URL
Call the getInvoicesDocument operation, passing the exportDocumentId value from Step 2.
The response contains a pre-signed URL that you can use to access the invoice export. If the contents are compressed, the compressional algorithm is provided. The URL expires after 30 seconds.
Updated 22 days ago
