
Exporting catalog data
You can use the WebSphere Commerce REST API to export catalog data in CSV format. The default data types that you can export are categories or products.
Before you begin
Procedure
-
Use the Organization Administration Console to assign the following roles to a WebSphere Commerce user:
- Catalog Exporter: The role that allows users to export and download catalog data. This role is typically assigned to category managers, product managers, and site administrators.
- Registered Customer: The role that allows users to log in to the store and access the catalog export tools in the Swagger UI. This role is necessary if the user password is expired and must be reset by using the storefront.
-
Go to the Aurora starter store and log in to the store by using the WebSphere Commerce user
that contains the Catalog Exporter and Registered
Customer roles.
This step is required so that the catalog export REST services can be used in the Swagger UI.
-
Open the Swagger UI.
In the Swagger UI, the catalog_export class is used to export catalog data. Then, the catalog_download class is used to download the exported catalog data.
- Open a web browser and go to the following URL: https://localhost/webapp/wcs/stores/servlet/swagger/index.html
-
Export the catalog data.
-
Download the exported catalog data.
What to do next
If issues occur when you use the catalog export or download services, review the following
troubleshoot tips:
- Ensure that your system has sufficient memory when you run a delta catalog export. Out of memory errors might occur during delta catalog exports, as checking for file differences can potentially be a memory intensive process.
- Ensure that you enter a valid object type when you run the catalog export service. This value is case-sensitive. The catalog_export class does not validate the input. Instead, if you enter an invalid value, errors occur in when later working with the catalog_download class.
- Ensure that the catalog export service completes before you call the catalog download service. The catalog download response indicates this if you try to download it too early.
- Ensure that you are logged in as a user that contains the Catalog Exporter and Registered Customer roles. Otherwise, a NOT_AUTHORIZED_FOR_QUERY error occurs when you work with the catalog export services.
- If the catalog download response indicates an invalid export ID, it might be due to any of the
following reasons:
- The export ID does not exist. Check that you entered the correct value.
- The catalog ID might exist but not within the store ID that you requested.
- The export ID might exist but is expired. This error might occur if a new request of the same kind is issued, making the old one no longer valid.
- The store does not contain any catalogs.
After you download the exported catalog data in CSV format, you can import it into a third-party application for further processing.