This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
Submit a job to export selected products from a Wix data collection to a CSV file:
Call Submit Job with the following parameters:
The method returns a response such as:
To check the job's status, call the Get Job method with the job's id.
The method returns a response such as:
A job is completed when its status updates to COMPLETED or PARTIALLY_SUCCESSFUL.
Note: To respond in real time when a job's status is updated, you can subscribe to the Job Updated webhook. Learn more about webhooks.
When the job completes, download the file from the URL in the response's destination.file.url property.
To know more about the job's results, view the job's logs by calling List Movement Jobs.
The method returns a response such as:
Submit a job to import products from a CSV file into a Wix data collection. If a product already exists in the destination collection, the job skips it:
Call Create File Upload Url to generate a file upload URL.
The method returns a response such as:
Save fileId and uploadUrl for later use.
Upload the source file to the uploadUrl you saved in the previous step. For example:
Note: The upload URL is valid for 15 minutes.
Call Submit Job with the following parameters. In the request's source.file.fileId property, specify the fileId you saved earlier:
The method returns a response such as:
Wix Data now begins importing the data from the file into the specified collection.
To check the job's status, call the Get Job method with the job's id.
The method returns a response such as:
A job is completed when its status updates to COMPLETED or PARTIALLY_SUCCESSFUL.
Note: To respond in real time when a job's status is updated, you can subscribe to the Job Updated webhook. Learn more about webhooks.
When the job completes, you can access the imported items in the CMS and with Wix Data APIs.
Submit a job to export localized CMS content to a CSV file. After editing its content, import it back to the site:
Call Submit Job with the following parameters:
The method returns a response such as:
To check the job's status, call Get Job with the job's id:
The method returns a response such as:
A job is completed when its status updates to COMPLETED or PARTIALLY_SUCCESSFUL
Note: To respond in real time when a job's status is updated, you can subscribe to the Job Updated webhook. Learn more about webhooks.
Download the file from the URL in the response's destination.file.url property and edit its content.
Call Create File Upload Url to generate a file upload URL:
The method returns a response such as:
Save fileId and uploadUrl for later use.
Upload the edited file to the uploadUrl you saved in the previous step. For example:
Note: The upload URL is valid for 15 minutes.
Call Submit Job again to import the edited product translations back into the site's CMS. In the request's source.file.fileId, specify the fileId you saved earlier. In the request's destination.localization.languages array, specify the languages you want to import:
Note: The first language in the destination.localization.languages array is considered the main CMS language.
The method returns a response such as:
A job is completed when its status is updated to COMPLETED or PARTIALLY_SUCCESSFUL.
Note: To respond in real time when a job's status is updated, you can subscribe to the Job Updated webhook. Learn more about webhooks.
When the job completes, you can access the imported items using: