Product JSON to CSV
Usage
CLI
Usage: product-json-to-csv [options]
Convert commercetools products from JSON to CSV
Options:
--help, -h Show help [boolean]
--version, -v Show version number [boolean]
--projectKey, -p API project key [string] [required]
--apiUrl The host URL of the HTTP API service [string]
[default: "https://api.commercetools.com"]
--authUrl The host URL of the OAuth API service [string]
[default: "https://auth.commercetools.com"]
--accessToken CTP client access token
Required scopes: ['view_products'] [string]
--template, -t CSV file containing your header that defines what you
want to export
--input, -i Path from which to read product chunks.
[default: "stdin"]
--output, -o Path to output [string] [default: "stdout"]
--referenceCategoryBy Define which identifier should be used for the
categories column. [choices: "name", "key", "externalId",
"namedPath"] [default: "name"]
--referenceCategoryOrderHintBy Define which identifier should be used for the
categoryOrderHints column. [choices: "name", "key",
"externalId", "namedPath"] [default: "name"]
--fillAllRows Define if product attributes like name should be
added to each variant row. [boolean]
--onlyMasterVariants Export only masterVariants from products.
[boolean] [default: false]
--language, -l Language(s) used for localised attributes such as
category names. Can contain multiple languages
delimited by comma "," [string] [default: "en"]
--delimiter, -d Used CSV delimiter. [default: ","]
--multiValueDelimiter, -m Used CSV delimiter in multiValue fields. [default: ";"]
--encoding, -e Encoding used when saving data to output file
[string] [default: "utf8"]
--logLevel Logging level: error, warn, info or debug [string]
[default: "info"]
--prettyLogs Pretty print logs to the terminal [boolean]
--logFile Path to file where logs should be saved [string]
[default: "product-json-to-csv.log"]Pass products through a pipe
Pass products from a file
CSV Parser Template
Parse without CSV template
Support for different encodings
JS
Configuration
Example
Last updated