Bulk Downloads: Sample Use Case and Flow

This article presents a possible use case and its corresponding sample flow that you can support. This can be a helpful jumping off point as you plan your implementation.

Download all receipts from the previous quarter

You can download all of the previous quarter's receipts:

  1. Call Query Receipts, filtered by the requested dates, to retrieve the receipts from the previous quarter.
  2. Retrieve and store the IDs of the receipts.
  3. Call Initiate Bulk Download for those receipt IDs.
  4. Call Get Bulk Download with the bulk download ID from the response in the earlier step. Check that the value of downloadGenerationDetails.processed matches downloadGenerationDetails.total to ensure all receipts have been processed. Then, retrieve the downloadUrl and use it to download the .zip file containing the receipts.
Did this help?