Report

Create a report to be processed

You can use this endpoint to create an import or an export. The parameters used in each case are different so definitely check out the model to see what each parameter is used for. Please note the prefixes 'For exports only:' and 'For imports only:'.<br/>

Import

You'll need to build a file that has a header row that describes the contents of the corresponding column. You can find a list of acceptable column headers here. For example, if you were importing a file to set the MSRP for a set of SKUs, the first column header would have to be 'SKU' and the second column header would be 'MSRP'.<br/>

Export

If you don't supply any columnTypes in your request, we will include all of the possible columns that can be exported. If you'd like to restrict the number of columns you can pass the column types as an array. You can find a list of acceptable column headers here. For example if you were trying to export the MSRP for SKUs you would send ["SKU", "MSRP"] in the columnType parameter.<br/> You can also use filters to limit the results of a report. You can find find more information on how to build a filter query here<br/> An account can have at most 20 exports pending or processing at once. Past that, this endpoint returns 429 Too Many Requests with a Retry-After header, in seconds.

post/report

Request

  • Base URL
    https://api.zentail.com/v1
  • Auth
    API key in header AUTHORIZATION

Request body

labelstring required

Assigns a label to this report.

isExportboolean

If true, this is an export. Otherwise it's an import.

datastring

For imports only: This should be a csv, xls, xlsx, xslsm, txt, or tsv file encoded in base 64 (e.g. base64_encode(data) in PHP).

extension'csv' | 'xls' | 'xlsx' | 'xlsm' | 'txt' | 'tsv'

For imports only: This tells us the type of file that was encoded in the data parameter.

overwriteWithBlankboolean

For imports only: If set to true, blank values supplied in the upload , data will overwrite.

createNewProductsboolean

For imports only: If set to true, if a SKU doesn't exist in zentail, we will create one.

columnTypesstring[]

For exports only: Use this field to provide the columns you'd like to export. You can find the columns eligible for export at here. If no columns are supplied, all the possible columns will be exported (there are lot!).

delimiterstring

For exports only: We will use this delimiter to separate the data in the export.

activeOnlyboolean

For exports only: If set to true, export will only include active products.

insertOnlyboolean

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.

includeHeaderboolean

For exports only: If set to true, export will include a header

exportForExcelboolean

For exports only: If set to true, will export as an Excel file.

filterstring

For exports only: Use this to pass in filters to restrict the products being exported. See how to write a filter formula here., we will create one.

headersOnlyboolean

For exports only: If true, this export will only have header rows.

Response

Success

reportIdinteger
labelstring
isExportboolean

If true, this is an export. Otherwise it's an import.

requestedTsstring date-time

Timestamp when the report was requested to be run.

completedTsstring date-time

Timestamp when the report was completed.

columnTypesstring[]

Array of the column headers in this report.

status'PENDING' | 'PROCESSING' | 'CANCELED' | 'COMPLETE'
totalLinesinteger

Total number of lines processed successfully.

linesSuccessfullyProcessedinteger
filePathstring

Path to access the stored file. Use this to download an exported file when it is "COMPLETE"

errorMessagestring

Returns an error message if we ran into an error processing the report.

overwriteWithBlankboolean

For imports only: If set to true, blank values supplied in the upload data will overwrite. NULL is equivalent to false.

createNewProductsboolean

For imports only: If set to true, if a SKU doesn't exist in zentail we will create one. NULL is equivalent to false.

activeOnlyboolean

For exports only: If set to true, export will only include active products.

insertOnlyboolean

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.

includeHeaderboolean

For exports only: If set to true, export will include a header

exportForExcelboolean

For exports only: If set to true, will export as an Excel file.

filterstring

For exports only: Use this to pass in filters to restrict the products being exported. See how to write a filter formula here.

delimiterstring

For exports only: We will use this delimiter to separate the data in the export.

headersOnlyboolean

For exports only: If true, this export will only have header rows.

uploaderstring

If this is null, then the report was created by the API.

Changes

No recorded changes to this operation across all 1 revision of this API.