Skip to main content
All CollectionsOpen API
Using the Reports Endpoint
Using the Reports Endpoint

How to use the reports endpoint on Zentail's Open API to post reports or get reports.

Michael Goldmeier avatar
Written by Michael Goldmeier
Updated over a year ago

The Report endpoint on the API is a flexible method of creating SKUs, editing data for existing SKUs, and exporting product data from Zentail. This article will review first the import and then export functionality of the POST/report endpoint.

The first step to using Zentail's API is to generate an API Token for your account.

POST report

Import functionality: Creating new SKUs or Editing existing SKUs

The Report endpoint can, and often is, used to create new SKUs on Zentail. Just be sure to set "createNewProducts" key to true .

Using this endpoint allows you to send product data to Zentail for all the attributes that matter, and only those attributes. With all of the valid attributes available across different marketplaces and categories, it would be overwhelming to try and include all available fields all the time with this report. Therefore, you can choose to send only the appropriate attributes with each call. This is very similar to the Template-less reports functionality through Zentail's regular import / export feature.

If you are using this endpoint to edit existing product data, the product data in the the file will edit the included attributes for each SKU in the report. By default, blank data is ignored. You can opt to overwrite existing data in Zentail with blank data in the field by setting the key "overwriteWithBlank" to true .

Please be sure to go to our developer docs and review the documentation.  You can wrap the field in quotes, similar to the examples outlined here.

  • First, pick the column types that will be used in the report from the valid fields in Zentail's Data Dictionary.

-- The Attribute name must match exactly, including spaces and letter-case.
-- If the POST data has ""isExport": false", all fields in the report must be importable.

  • Using the delimiter specified in the POST data (i.e. , ,| ,etc...) list the desired Attribute Names as the header of the file. Note: you should always set the first column header as SKU .

  • Include all product data that corresponds to the SKU in each row

  • Encode the file using Base64 standard. Make sure to include this in the "data" key in the Post data. Include all other keys in the Post data body as indicated in the documentation.

  • If you are using this report to create new SKUs on Zentail, make sure to set "createNewProducts" key to true .

  • Make the API call! 

Export functionality: Download product data from Zentail

Please be sure to go to our developer docs and review the documentation. To export product data from Zentail,

  • First, pick the column headers that will be used in the report from the valid fields in Zentail's Data Dictionary.

-- The Attribute name must match exactly, including spaces and letter-case.
-- If the POST data has ""isExport": true", all fields in the report must be exportable.

  • For exports, the default delimiter is , 

  • Set the data key "isExport" to true .

  • You have the option to use filters to limit the results of a report. You can find find more information on how to build a filter query here.

  • Make the API call!

POST Report Response

Once you've made the API call, you'll receive a response. There are a few fields that you should pay special attention to: "reportId" and "filePath".

  • reportID - This is the ID you can use with the GET/report/{reportId} endpoint to retrieve report data for a specific report ID.

  • status - This will update to "COMPLETED" once the filePath is available.

  • filePath - This will be a URL from where you can download your import or export file. Note: this field may not be available in the initial response as it takes time to generate the report. You should poll the GET/report/{reportId} endpoint until you are able to retrieve the filePath.

Did this answer your question?