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 HeaderData TypeGroupRequiredDescription
Variant IDstringYesExternal identifier of the record
Product IDstringYesID of the Product this is a Variant of (ignored when creating/updating Variants embedded in Products) (externalId resolvable)
UPCstringNoUPC of the Variant
Identifiers IdentifierstringIdentifiersNo
Identifiers TypestringIdentifiersNo
Identifiers N IdentifierstringIdentifiers NNo
Identifiers N TypeintegerIdentifiers NNo
StatusintegerNoVariant Status defaults: 0 = Active, 1 = Disabled, 2 = Unavailable. See integration specification for instance-specific usage of this field
Sort OrderintegerNoSee integration specification for use of this field
ImagestringImagesNoArray of URLs of images of the Variant
Image NstringImages NNoArray of URLs of images of the Variant
Custom Attribute IDstringAttribute ValuesNoAttribute to be used as key in the key/value pair (externalId resolvable)
Custom Attribute ValuestringAttribute ValuesNoValue to appear in this key/value pair
Custom Attribute Language IDintegerORstringAttribute ValuesNoLanguage ID for the language in which this value appears; use 0 if it is not localized (externalId resolvable)
Custom Attribute N IDstringAttribute Values NNo
Custom Attribute N ValuestringAttribute Values NNo
Custom Attribute N Language IDintegerORstringAttribute Values NNo
Localized Language IDintegerORstringLocalized DataNoID of the Language in which the record appears (externalId resolvable)
Localized DescriptionstringLocalized DataNoDescription of the Variant localized to the language in languageId
Localized NamestringLocalized DataNoName of the Variant localized to the language in languageId
Localized Language ID NintegerORstringLocalized Data NNoID of the Language in which the record appears (externalId resolvable)
Localized Description NstringLocalized Data NNoDescription of the Variant localized to the language in languageId
Localized Name NstringLocalized Data NNoName of the Variant localized to the language in languageId
OptionValue IDstringOption ValuesNo
OptionValue N IDstringOption Values NNo
Related Variant IDstringRelated VariantsNoThe 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 OrderintegerRelated VariantsNoThe sort order for the Related Variant within its set of related variants
Related Variant N IDstringRelated Variants NNo
Related Variant N Sort OrderintegerRelated Variants NNoSee integration specification for use of this field
Is Final SalebooleanNo
Is Open Price PointbooleanNo
Max Open PricenumberNo
Min Open PricenumberNo

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.

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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoImageImage NURL 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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Yes*Localized DescriptionLocalized Description NDescription of the variant localized to the specified languagestring
Yes*Localized Language IDLocalized Language ID NID of the language in which the record appears.
Integers will be resolved to internal identifiers
integer, string
Yes*Localized NameLocalized Name NName of the variant localized to the specified languagestring

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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
YesOption Value IDOption Value N IDID of an Option Value associated with the variantstring

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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoIdentifiers IdentifierIdentifiers N IdentifierThe code for the additional identifier of the variantstring
NoIdentifiers TypeIdentifiers N TypeVariant identifier type, e.g. upcstring

Where N is some positive integer.

The valid identifier types are:

  • upc
  • ean
  • code93
  • gs1
  • code128
  • other

Where “other” is the default type.

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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoRelated Variant IDRelated Variant N IDID of the related variantstring
NoRelated Variant Sort OrderRelated Variant N Sort OrderSort order of the related variant within its set of related variantsinteger

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:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoCustom Attribute IDCustom Attribute N IDIdentifier of the custom attributestring
NoCustom Attribute ValueCustom Attribute N ValueValue of the attributestring
NoCustom Attribute Language IDCustom Attribute N Language IDLanguage 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.

Variant Sample 1