Product Export REST API

71 views
Skip to first unread message

Ajith Vijayan

unread,
Jul 7, 2020, 2:07:25 AM7/7/20
to ChannelAdvisor Developer Network
Hi,

 am working on a django project in which I have export all products of my client to our application. I checked the ProductExport api. This api works but the file is saved in the import/export and we have to manually download the file and trigger the import script. 
Is there an option so that when we trigger ProductExport, the generated file is automatically downloaded to our local system and we can automate the data import?

Thanks in advance.

camero...@channeladvisor.com

unread,
Jul 7, 2020, 8:45:25 AM7/7/20
to ChannelAdvisor Developer Network
Hello,
The Product Export endpoint is asynchronous, so you'll need to periodically check back using the status endpoint to see if it is finished.  Once the export is complete (there are a few statuses that indicate completion) the ResponseFileUrl property on the response contains a URL to the fetch the file.  While this is more complicated than a single request to get your data it is very scalable as it supports very large catalogs and is not subject to HTTP client/server timeouts.  In summary:
  1. Initiate the bulk export POST /v1/ProductExport
  2. Poll for status (recommend every ~15-60 seconds) GET /v1/ProductExport
    1. Repeat until status is Complete or CompleteWithErrors
  3. Fetch results GET {ResponseFileUrl}
Good luck!

Reply all
Reply to author
Forward
0 new messages