Category import

Learn about the headers and values supported for importing Categories.

Supported headers and values

HeaderValueRequired/Optional
data-objectAn annotation for the imported data. It is ignored during import.Optional
keyA unique identifier for the Category that is imported. The key must only include letters, numbers, underscores (_), or dashes (-). If a Category with the provided key exists in the Project, the Category is updated with the provided value—otherwise, a new Category is created.Required
name.enA localized name for the Category. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Required, when creating a new Category.
slug.enA localized slug for the Category. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Required, when creating a new Category.
description.enA localized description for the Category. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Optional
externalIdAn additional identifier for the Category—for example, if the Category exists in external systems.Optional
orderHintDecimal value between 0 and 1. Frontend applications can use this value for ordering Categories within the same level in the category tree.Optional
metaTitle.enA localized name for the Category for search engines. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Optional
metaDescription.enA localized description for the Category for search engines. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Optional
metaKeywords.enA localized keyword for the Category for improved search engine performance. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Optional
parent.keyA unique identifier for a Category used as the parent, if the imported Category is a child Category. Before importing, a Category with this key must exist.Required, when updating a parent Category.
parent.typeIdcategoryRequired, if parent.key is provided.
custom.type.keyA unique identifier for the Type referenced in a Custom Field.Required, when importing Custom Fields to a Category.
custom.type.typeIdtypeRequired, if custom.type.key is provided.
custom.fields.{nameOfCustomField}Replace {nameOfCustomField} with the name of the Custom Field, as defined in the respective FieldDefinition. The value must conform to the FieldType of the Custom Field. For more information, see Custom Fields.Optional
assets.keyA unique identifier for the Asset. The key must only include letters, numbers, underscores (_), or dashes (-). If an Asset with the provided key exists in the Category, the Asset is updated with the provided value—otherwise, a new Asset is created.Required, when importing Assets.
assets.name.enA localized name for the Asset. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Required, when importing Assets.
assets.description.enA localized description for the Asset. You can provide multiple headers to include different languages values.

For headers ending with .en, you can change en to reference another language. For example, including the header name.de allows you to include a German name, and name.en-US allows you to include an English (American) name.

Optional
assets.sources.uriA URI for the Asset.Required, when importing Assets.
assets.tagsA semicolon-separated list of keywords used for categorizing and organizing Assets.Optional
assets.custom.type.keyA unique identifier for the Type referenced in a Custom Field.Required, when importing Custom Fields to a Asset.
assets.custom.type.typeIdtypeRequired, if assets.custom.type.key is provided.
assets.custom.fields.{nameOfCustomField}Replace {nameOfCustomField} with the name of the Custom Field, as defined in the respective FieldDefinition. The value must conform to the FieldType of the Custom Field. For more information, see Custom Fields.Optional

Custom Fields

When importing LocalizedString Custom Fields, provide headers and values for each language. For example, for English and German, provide custom.fields.{nameOfCustomField}.en and custom.fields.{nameOfCustomField}.de respectively.

  • For Money Custom Fields, provide the following additionally:

    HeaderValueRequired/Optional
    custom.fields.{nameOfCustomField}.currencyCodeAn ISO 4217-compliant currency code such as USD, EUR, or GBP.Required
    custom.fields.{nameOfCustomField}.centAmountAn amount in the smallest indivisible unit for a currency. For example, 500 can be equal to USD 5.00 or JPY 500.Required
    custom.fields.{nameOfCustomField}.typecentPrecisionRequired
    custom.fields.{nameOfCustomField}.fractionDigitsThe number of digits after the decimal separator. For example, 2 for USD or 0 for JPY.Required

Sets of Custom Fields

For sets of simple Custom Fields (such as numbers, text, and booleans) the header would contain the Custom Fields name, and value would be a semicolon-separated list. The following example demonstrates how to import sets of text and numbers.

custom.fields.colorCombinationcustom.fields.numberSet
red;green;blue10;5;32

Sets of complex Custom Fields

For sets of complex values (such as localized text, references, and money), you can import single set values by defining the index then subfields in the header. The following example demonstrates how to update the first entry of a set of Custom Fields called relatedCategories that references Categories.

custom.fields.relatedCategories.1.keycustom.fields.relatedCategories.1.typeId
red-shirtscategory

To update the second entry, include the same headers but change the 1 to 2.

You can also import multiple set values by using * instead of a number. With this approach, the values of set items are entered into sequential rows.

The following example demonstrates how to create a set of Custom Fields called relatedCategories with four entries.

custom.fields.relatedCategories.*.keycustom.fields.relatedCategories.*.typeId
red-shirtscategory
summer-collectioncategory
new-arrivalscategory
red-accessoriescategory

Delete data

When updating resources, you can remove data for optional fields. To remove data, in the CSV file, enter [DELETE] as the value for the header (field). When deleting values for reference fields or multi-value fields, you must add a new column with the common prefix as the header, and enter [DELETE] as the value.

For example, to delete data for a parent Category—that is parent.key and parent.typeId in the CSV file—add a new column, parent, with [DELETE] as its value.