bulk Export product information to csv using api

giridhar Addagalla asked on October 26, 2018 11:18

Hi, I am creating a new module for bulk export of product information, which are of SKUID, DocumentSKUName, NodeParentID, NodeID, NodeSKUID,SKUName, SKUNumber, SKUIsMarginPercentage, SKUMargin ,SKUStatus, product name, id each and every thing related to product using api, can any one suggest me a method how to archive that, all i need is how to get that api and a sample query string to export this to csv, thanks.

Recent Answers


David te Kloese answered on October 26, 2018 11:49

Hi,

have a look at the API examples: docs.kentico.com/../products#Products-Productpages

if you start with pages you'll probably want to select the pages where NodeSKUID != null

Or as you can see at the update product pages, Casting it to a (SKUTreeNode) should give you the correct fields and methods.

0 votesVote for this answer Mark as a Correct answer

giridhar Addagalla answered on October 26, 2018 13:49

Hi thanks for that but I dint find any query to get the data all that info is about create, delete, update. the main goal is i need to get each and every information about product using the treenode, can you please help me in that, thanks.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on October 26, 2018 14:14

Well part of the update is getting the data. You don't need to update the retrieved Item

var pages = tree.SelectNodes("YourPageType")
            .Path("/Products")
            .WhereNotNull("NodeSKUID")
            .Columns("Column0", "Column1", "Column2");

Or you can select specific SKU info

        SKUInfoProvider.GetSKUs().Where(....

You can read more about using Object Query at docs.kentico.com/.../retrieving-database-data-using-objectquery-api

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.