> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # GetBulkDownload # Package: getPaid # Namespace: BulkDownloads # Method link: https://dev.wix.com/docs/api-reference/business-management/get-paid/bulk-downloads/get-bulk-download.md ## Permission Scopes: Manage Receipts: SCOPE.RECEIPTS.MANAGE ## Introduction Retrieves a bulk download. --- ## REST API ### Schema ``` Method: getBulkDownload Description: Retrieves a bulk download. URL: https://www.wixapis.com/get-paid/v1/bulk-downloads/{bulkDownloadId} Method: GET # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: bulkDownloadId Method parameters: param name: bulkDownloadId | type: none | required: true Return type: GetBulkDownloadResponse - name: bulkDownload | type: BulkDownload | description: Retrieved bulk download. - name: id | type: string | description: Bulk download GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the bulk download is updated. To prevent conflicting changes, the current `revision` must be passed when updating the bulk download. - name: createdDate | type: string | description: Date and time the bulk download was created. - name: updatedDate | type: string | description: Date and time the bulk download was last updated. - name: expirationDate | type: string | description: Date and time the bulk download expires. The .zip file is available for download with the `downloadUrl` until this time. Default expiration date is 24 hours after creation. - name: downloadGenerationStatus | type: DownloadGenerationStatus | description: Status of the bulk download generation. - enum: - UNKNOWN_DOWNLOAD_STATUS: Unknown download status. - PROCESSING: Generation is in progress. - PARTIAL_SUCCESS: Generation was successful for some, but not all, entities. Check `skippedEntityIds` for entities not included. The `downloadUrl` is available to download the .zip file containing the successfully generated entities. - SUCCESS: Generation was successful. The .zip file is ready for download using the `downloadUrl`. - FAILED: Generation has failed. - name: downloadUrl | type: string | description: URL to download the generated .zip file. Open this URL in a browser to download the file. Only available when the `downloadGenerationStatus` is `"PARTIAL_SUCCESS"` or `"SUCCESS"`. - name: namespace | type: Namespace | description: App namespace. Currently only supports `"RECEIPTS"`. - enum: - UNKNOWN_NAMESPACE: Unknown namespace. - RECEIPTS: Receipts ([SDK](https://dev.wix.com/docs/sdk/backend-modules/get-paid/receipts/about-the-receipts-apis.md) | [REST](https://dev.wix.com/docs/rest/business-management/get-paid/receipts/about-the-receipts-apis.md)). - name: entityIds | type: array | description: List of GUIDs of the entities to include in the bulk download. - name: skippedEntityIds | type: array | description: IDs of the entities that aren't included in the .zip file. If `downloadGenerationStatus` is `"PARTIAL_SUCCESS"` then these entities may still be included once the initiated download is complete. If the value of `downloadGenerationDetails.processed` matches `downloadGenerationDetails.total` then all of the entities have been processed and the skipped entities aren't included in the bulk download. - name: downloadGenerationDetails | type: DownloadGenerationDetails | description: Details about the number of files processed. - name: processed | type: integer | description: Number of files that have been processed. - name: total | type: integer | description: Total number of files to process. Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: USER_ID_NOT_FOUND | Description: User identification GUID is missing. ``` ### Examples ### Get Bulk Download Retrieves a specific bulk download by ID ```curl curl -X GET \ 'https://www.wixapis.com/get-paid/v1/bulk-downloads/8046df3c-7575-4098-a5ab-c91ad8f33c47' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.getPaid.BulkDownloads.getBulkDownload(bulkDownloadId) Description: Retrieves a bulk download. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: bulkDownloadId Method parameters: param name: bulkDownloadId | type: string | description: Bulk download GUID. | required: true Return type: PROMISE - name: _id | type: string | description: Bulk download GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the bulk download is updated. To prevent conflicting changes, the current `revision` must be passed when updating the bulk download. - name: _createdDate | type: Date | description: Date and time the bulk download was created. - name: _updatedDate | type: Date | description: Date and time the bulk download was last updated. - name: expirationDate | type: Date | description: Date and time the bulk download expires. The .zip file is available for download with the `downloadUrl` until this time. Default expiration date is 24 hours after creation. - name: downloadGenerationStatus | type: DownloadGenerationStatus | description: Status of the bulk download generation. - enum: - UNKNOWN_DOWNLOAD_STATUS: Unknown download status. - PROCESSING: Generation is in progress. - PARTIAL_SUCCESS: Generation was successful for some, but not all, entities. Check `skippedEntityIds` for entities not included. The `downloadUrl` is available to download the .zip file containing the successfully generated entities. - SUCCESS: Generation was successful. The .zip file is ready for download using the `downloadUrl`. - FAILED: Generation has failed. - name: downloadUrl | type: string | description: URL to download the generated .zip file. Open this URL in a browser to download the file. Only available when the `downloadGenerationStatus` is `"PARTIAL_SUCCESS"` or `"SUCCESS"`. - name: namespace | type: Namespace | description: App namespace. Currently only supports `"RECEIPTS"`. - enum: - UNKNOWN_NAMESPACE: Unknown namespace. - RECEIPTS: Receipts ([SDK](https://dev.wix.com/docs/sdk/backend-modules/get-paid/receipts/about-the-receipts-apis.md) | [REST](https://dev.wix.com/docs/rest/business-management/get-paid/receipts/about-the-receipts-apis.md)). - name: entityIds | type: array | description: List of GUIDs of the entities to include in the bulk download. - name: skippedEntityIds | type: array | description: IDs of the entities that aren't included in the .zip file. If `downloadGenerationStatus` is `"PARTIAL_SUCCESS"` then these entities may still be included once the initiated download is complete. If the value of `downloadGenerationDetails.processed` matches `downloadGenerationDetails.total` then all of the entities have been processed and the skipped entities aren't included in the bulk download. - name: downloadGenerationDetails | type: DownloadGenerationDetails | description: Details about the number of files processed. - name: processed | type: integer | description: Number of files that have been processed. - name: total | type: integer | description: Total number of files to process. Possible Errors: HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: USER_ID_NOT_FOUND | Description: User identification GUID is missing. ``` ### Examples ### getBulkDownload ```javascript import { bulkDownloads } from '@wix/get-paid'; async function getBulkDownload(bulkDownloadId) { const response = await bulkDownloads.getBulkDownload(bulkDownloadId); }; ``` ### getBulkDownload (with elevated permissions) ```javascript import { bulkDownloads } from '@wix/get-paid'; import { auth } from '@wix/essentials'; async function myGetBulkDownloadMethod(bulkDownloadId) { const elevatedGetBulkDownload = auth.elevate(bulkDownloads.getBulkDownload); const response = await elevatedGetBulkDownload(bulkDownloadId); } ``` ### getBulkDownload (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { bulkDownloads } from '@wix/get-paid'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { bulkDownloads }, // Include the auth strategy and host as relevant }); async function getBulkDownload(bulkDownloadId) { const response = await myWixClient.bulkDownloads.getBulkDownload(bulkDownloadId); }; ``` ---