const url = 'https://api.zentail.com/v1/report';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.zentail.com/v1/report \ --header 'Authorization: Bearer <token>'This returns a list of Reports (most recent reports first).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Passing this will only return reports created after createdTs.
Passing this will return the number of Reports specified in pageLength
Passing this will return the next page of a previous call (we will disregard all other parameters provided). You can find nextToken in the response from a previous GET report call.
Responses
Section titled “ Responses ”Success
object
object
If true, this is an export. Otherwise it’s an import.
Timestamp when the report was requested to be run.
Timestamp when the report was completed.
Array of the column headers in this report.
Total number of lines processed successfully.
Path to access the stored file. Use this to download an exported file when it is “COMPLETE”
Returns an error message if we ran into an error processing the report.
For imports only: If set to true, blank values supplied in the upload data will overwrite. NULL is equivalent to false.
For imports only: If set to true, if a SKU doesn’t exist in zentail we will create one. NULL is equivalent to false.
For exports only: If set to true, export will only include active products.
For imports only: If set to true, report will only fill in blank data on Zentail. Any data that already exists on Zentail will not be overwritten by data in the file.
For exports only: If set to true, export will include a header
For exports only: If set to true, will export as an Excel file.
For exports only: Use this to pass in filters to restrict the products being exported. See how to write a filter formula here.
For exports only: We will use this delimiter to separate the data in the export.
For exports only: If true, this export will only have header rows.
If this is null, then the report was created by the API.
object
Indicates if there is an additional page. This is true if there is another page, otherwise it is false.
If hasNext is true this provides the full URL for the next page of results.
Example
{ "results": [ { "isExport": false, "status": "PENDING", "overwriteWithBlank": false, "createNewProducts": false, "activeOnly": false, "insertOnly": false, "includeHeader": true, "exportForExcel": false, "delimiter": ",", "headersOnly": false } ]}Bad Request
object
Example
{ "errorCode": 400}Permission Denied
object
Example
{ "errorCode": 403}Not Found
object
Example
{ "errorCode": 404}Zentail Error
object
Example
{ "errorCode": 500}Zentail Error
object
Example
{ "errorCode": 503}