File Format - Variant
Variant File Format
The first line of a Variant CSV file must be the header row.
A variant instance is a group of rows in the CSV file that are sequential and include the same required fields. Data relating to fields specified under Base Headers and Multi-Column Headers must be specified in the first row of a variant instance. Additional rows of a variant instance may only include fields specified under Multi-Row Headers.
Spec
The following table shows the accepted CSV columns for the variants entity. Note that any columns including N
denote a dynamic integer. A column specified as Field N
signifies that you can use columns Field 1
, Field 2
, …, Field N
to allow for multiple values per record of the given field, similar to an array.
CSV Header | Data Type | Group | Required | Description |
---|---|---|---|---|
Variant ID | string | Yes | External identifier of the record | |
Product ID | string | Yes | ID of the Product this is a Variant of (ignored when creating/updating Variants embedded in Products) (externalId resolvable) | |
UPC | string | No | UPC of the Variant | |
Identifiers Identifier | string | Identifiers | No | |
Identifiers Type | string | Identifiers | No | |
Identifiers N Identifier | string | Identifiers N | No | |
Identifiers N Type | integer | Identifiers N | No | |
Status | integer | No | Variant Status defaults: 0 = Active, 1 = Disabled, 2 = Unavailable. See integration specification for instance-specific usage of this field | |
Sort Order | integer | No | See integration specification for use of this field | |
Image | string | Images | No | Array of URLs of images of the Variant |
Image N | string | Images N | No | Array of URLs of images of the Variant |
Custom Attribute ID | string | Attribute Values | No | Attribute to be used as key in the key/value pair (externalId resolvable) |
Custom Attribute Value | string | Attribute Values | No | Value to appear in this key/value pair |
Custom Attribute Language ID | integerORstring | Attribute Values | No | Language ID for the language in which this value appears; use 0 if it is not localized (externalId resolvable) |
Custom Attribute N ID | string | Attribute Values N | No | |
Custom Attribute N Value | string | Attribute Values N | No | |
Custom Attribute N Language ID | integerORstring | Attribute Values N | No | |
Localized Language ID | integerORstring | Localized Data | No | ID of the Language in which the record appears (externalId resolvable) |
Localized Description | string | Localized Data | No | Description of the Variant localized to the language in languageId |
Localized Name | string | Localized Data | No | Name of the Variant localized to the language in languageId |
Localized Language ID N | integerORstring | Localized Data N | No | ID of the Language in which the record appears (externalId resolvable) |
Localized Description N | string | Localized Data N | No | Description of the Variant localized to the language in languageId |
Localized Name N | string | Localized Data N | No | Name of the Variant localized to the language in languageId |
OptionValue ID | string | Option Values | No | |
OptionValue N ID | string | Option Values N | No | |
Related Variant ID | string | Related Variants | No | The Variant External ID of the related variant. This field is returned as null in GET operations as it isn’t ID resolvable. |
Related Variant Sort Order | integer | Related Variants | No | The sort order for the Related Variant within its set of related variants |
Related Variant N ID | string | Related Variants N | No | |
Related Variant N Sort Order | integer | Related Variants N | No | See integration specification for use of this field |
Is Final Sale | boolean | No | ||
Is Open Price Point | boolean | No | ||
Max Open Price | number | No | ||
Min Open Price | number | No |
Groups
A group is a class of headers that relate to one another, and may allow for multiple pieces of information to be presented. For example, a customer can have multiple emails, addresses, phone numbers, and more.
Images (Recommended)
There are two ways that images can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.
Multi-Row Approach
In this approach, one column header is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.
Multi-Column Approach
In this approach, one column header may be used many times alongside one row (the first row) of a variant instance. To use this column multiple times, an identifying number must exist for N and be unique for each new column.
Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Images group.
The following columns may be included:
Required | Multi-Row Approach Column Name | Multi-Column Approach Column Name | Description | Type |
---|---|---|---|---|
No | Image | Image N | URL to images of the variant. | string |
Where N is some positive integer.
Localized Data (Required)
There are two ways that localized data can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.
Multi-Row Approach
In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.
Multi-Column Approach
In this approach, multiple sets of column headers may be used alongside one row (the first row) of a variant instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.
Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Localized Data group.
The following columns may be included:
Required | Multi-Row Approach Column Name | Multi-Column Approach Column Name | Description | Type |
---|---|---|---|---|
Yes* | Localized Description | Localized Description N | Description of the variant localized to the specified language | string |
Yes* | Localized Language ID | Localized Language ID N | ID of the language in which the record appears. Integers will be resolved to internal identifiers | integer, string |
Yes* | Localized Name | Localized Name N | Name of the variant localized to the specified language | string |
Where N is some positive integer.
Note:
(Required)*
means these fields are required when sending
Option Values (Required)
There are two ways that option values can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.
Multi-Row Approach
In this approach, one column header is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.
Multi-Column Approach
In this approach, one column header may be used many times alongside one row (the first row) of a variant instance. To use this column multiple times, an identifying number must exist for N and be unique for each new column.
Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Option Values group.
The following columns may be included:
Required | Multi-Row Approach Column Name | Multi-Column Approach Column Name | Description | Type |
---|---|---|---|---|
Yes | Option Value ID | Option Value N ID | ID of an Option Value associated with the variant | string |
Where N is some positive integer.
Identifiers (Optional)
There are two ways that variant identifiers can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.
Multi-Row Approach
In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.
Multi-Column Approach
In this approach, multiple sets of column headers may be used alongside one row (the first row) of a variant instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.
Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Related Variants group.
The following columns may be included:
Required | Multi-Row Approach Column Name | Multi-Column Approach Column Name | Description | Type |
---|---|---|---|---|
No | Identifiers Identifier | Identifiers N Identifier | The code for the additional identifier of the variant | string |
No | Identifiers Type | Identifiers N Type | Variant identifier type, e.g. upc | string |
Where N is some positive integer.
The valid identifier types are:
- upc
- ean
- code93
- gs1
- code128
- other
Where “other” is the default type.
Related Variants (Optional)
There are two ways that related variants can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.
Multi-Row Approach
In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.
Multi-Column Approach
In this approach, multiple sets of column headers may be used alongside one row (the first row) of a variant instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.
Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Related Variants group.
The following columns may be included:
Required | Multi-Row Approach Column Name | Multi-Column Approach Column Name | Description | Type |
---|---|---|---|---|
No | Related Variant ID | Related Variant N ID | ID of the related variant | string |
No | Related Variant Sort Order | Related Variant N Sort Order | Sort order of the related variant within its set of related variants | integer |
Where N is some positive integer.
Custom Attributes
There are two ways that custom attributes can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.
Multi-Row Approach
In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.
Multi-Column Approach
In this approach, multiple sets of column headers may be used alongside one row (the first row) of a variant instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.
Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Custom Attributes group.
The following columns may be included:
Required | Multi-Row Approach Column Name | Multi-Column Approach Column Name | Description | Type |
---|---|---|---|---|
No | Custom Attribute ID | Custom Attribute N ID | Identifier of the custom attribute | string |
No | Custom Attribute Value | Custom Attribute N Value | Value of the attribute | string |
No | Custom Attribute Language ID | Custom Attribute N Language ID | Language of the attribute. Supported languages and their ids can be found here Integers will be resolved to internal identifiers | integer, string |
Where N is some positive integer.
Variant CSV Example
See the following Variant CSV sample file.