Adding entities
New product groups, content, and translations are added or replaced usingreplace. The replace instruction replaces the entity with the new state, removing all previous information about it.
New entities can also be added through edit, provided that the edit instruction contains full and valid entities, and that the instruction specifies non-existing keys. This will not remove any unedited information if the entity already exists.
Adding product groups
The following examples assume the use of translations. See Adding translations for examples of how to connect IDs to values.Add basic product group
This import adds or replaces product grouppg1, making it available in uk.
No overrides are provided, and all valid request contexts will use the data provided at default level. Providing data only at default level is applicable for retailers with a single market containing a single locale.
Add product group with advanced feature usage
This import adds or replaces product grouppg1, making it available in uk and se.
- For all requests using
sv-SEas locale, defaults and overrides for*|sv-SEapply. - For all requests using
seas market, defaults and overrides forse|*apply. - For all requests using
ukas market, defaults and overrides foruk|*apply. - For all other requests, only defaults apply.
Adding translations
Add translation
This import adds or replaces a translation inen-GB for ID M1 in the custom label attribute material.
Add all translations for product group example
Here is an unexpanded import example of adding translations for all IDs used in the “Add basic product group” example.Adding content
Add content with advanced feature usage
This import adds or replaces contentc1, making it available in se and uk.
- For all requests using
sv-SEas locale, defaults and overrides for*|sv-SEapply. - For all requests using
seas market, defaults and overrides forse|*apply. - For all other requests, defaults apply.
Adding products and variants
Products and variants are inner entities and can only be added to existing parent entities. Inner entities are added throughedit of the parent entity. When editing a previously non-existing inner entity key, the edit instruction must contain all mandatory entity information, or the import will fail.
Add new product to existing product group
Assumingp2 and p2-v1 do not previously exist, this import adds them to product group pg1 without affecting any other properties or inner entities of pg1.
A new product must contain at least one variant to be valid.
Add new variant to existing product
Assumingp2-v2 does not previously exist, this import adds it to product p1 without affecting any other properties or inner entities of p1 or pg1.
Editing entities
When editing entities, all previously imported information is retained unless explicitly edited. This can be used to alter properties, add single products or variants to existing product groups, or add market and locale overrides for existing entities.Extending market support
Existing entities can be made available in additional markets by adding a new market identifier to themarkets array. If no market overrides are supplied, all default values will apply for the new market as well. This is typically only relevant when inventory is shared across multiple markets.
As utility support, market availability can also be extended by adding an override for the new market without explicitly updating the markets array. This automatically appends the new market from the override to the markets array.
Add existing product and variants to new markets
The following import makes productp1 and all its variants additionally available for us, given that they were available in se and uk before.
Add market through the markets array
Add market through a new override
Add existing content to new markets
The following import makes contentc1 additionally available for us, given that it was available in se and uk before.
Add market through the markets array
Add market through a new override
Extending locale support
All entities are available by default on all locales in the markets they are available for. The applicable locales of a market are determined by the configured market definitions. Adding locale support for a market is therefore done with a configuration import. The data returned for a particular locale depends on available entity data and imported translations. In addition to adding translations, locale data can also be added through new overrides.Add locale data for product
The following import adds locale overrides for localefi-FI on product p1.
Add locale data for content
The following import adds locale overrides for localefi-FI on content c1.
Changing specific properties
Theedit instruction allows modifications of specific properties and structural changes, such as adding variants and extending market availability. It also supports adding new entities.
For product and variant changes, all parent keys must be provided. Minor changes to non-existing products or variants will likely result in failed imports, because that implies adding a new invalid entity.
For simple changes, use editAttributes. These instructions are ignored when targeting non-existing keys, and support editing products and variants directly.
Update variant price and stock level
Add custom label to product
Edit content type
Removing data
Replacing the catalog completely removes all catalog data and adds the new data defined in the import file. To fully remove all catalog data, perform such an import with an empty file. This is usually only relevant during development and testing. To remove specific data, use remove and clear instructions when updating the catalog.Remove entities completely
Remove product groups
Remove pg1
Remove multiple groups
Remove products
Remove p1
Remove variants
Remove p1-v1
Remove content
Remove image
Remove entity market data
Removing entity market data means that the entity is no longer available for the market. All overrides targeting the specified market identifier are removed, and the entity’smarkets array is updated.
If the entity is only available for the market being removed, the entire entity is removed from the catalog, including all default data.
Variants cannot be removed on a per-market level. In the rare case that a variant should not be available in all markets its parent product is available in, use the limitedMarkets variant attribute.
Remove product group from market
Remove product from market
Remove content from market
Remove all product groups from market
Remove all content from market
Remove translations for locale
Remove all translations for a locale

