Variants

Variants are sub elements of products that define different variations a product exist in, ex. different colors, sizes etc. Variants cannot exist on its own as they need to be attached to a product. Variants have defining attributes which defines the attributes variants of a product vary on, ex. color and size, with and length etc.

Get ids of all variants in the system

get

By default, ids for archived variants are not returned

Authorizations
AuthorizationstringRequired
Query parameters
includeArchivedbooleanOptional

Include archived variants

Default: false
Responses
200

OK

application/json
Responseinteger · int32[]
get
/v1/variants/ids
200

OK

Get basic model for a variant

get
Authorizations
AuthorizationstringRequired
Path parameters
idinteger · int32Required

Id of variant

Responses
200

OK

application/json
get
/v1/variants/{id}
200

OK

Delete a variant

delete
Authorizations
AuthorizationstringRequired
Path parameters
idinteger · int32Required

Id of variant to delete

Responses
200

OK

No content

delete
/v1/variants/{id}
200

OK

No content

Update a variant

patch
Authorizations
AuthorizationstringRequired
Path parameters
idinteger · int32Required

Id of variant

Body

Update model containing the updates to make on a variant. Note that properties with null values will be ignored and will not cause an update. This means you should only set properties that shall be updated on the variant

ProductIdinteger · int32 | nullableOptional

Id of product to move variant to

IsArchivedboolean | nullableOptional

Indicate whether the product shall be archived or un-archived

ArchiveReasonstring · uuid | nullableOptional

Reference to the archive reason when archiving variant (if IsArchived is true)

SortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants of the product

VariantGroupSortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants in same variant group

WorkflowStateUidstring · uuid | nullableOptional

Workflow state to set on the variant

Responses
200

OK

No content

patch
/v1/variants/{id}
200

OK

No content

Get basic model for a range of variants

post
Authorizations
AuthorizationstringRequired
Bodyinteger · int32[]
integer · int32[]Optional
Responses
200

OK

application/json
post
/v1/variants/batch
200

OK

Get basic models for variants

get

No more than 5000 variants can be requested at a time. If no limit is provided, the default limit of 1000 will be used. By default, archived variants are not returned

Authorizations
AuthorizationstringRequired
Query parameters
includeArchivedbooleanOptionalDefault: false
limitinteger · int32OptionalDefault: 1000
afterIdinteger · int32Optional
Responses
200

OK

application/json
get
/v1/variants
200

OK

Create new variants

post

A maximum of 5000 variants can be created in one request

Authorizations
AuthorizationstringRequired
Bodyobject[]

Model for creating a new variant

ProductIdinteger · int32Optional

Id of product to attach variant to

SortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants of the product (when null, variant is placed after existing variants)

VariantGroupSortOrderinteger · int32 | nullableOptional

Sort order of variant compared to other variants in same variant group

WorkflowStateUidstring · uuid | nullableOptional

Workflow state to set on the variant

Responses
200

OK

application/json
Responseinteger · int32
post
/v1/variants

Delete multiple variants

delete
Authorizations
AuthorizationstringRequired
Bodyinteger · int32[]
integer · int32[]Optional
Responses
200

OK

No content

delete
/v1/variants
200

OK

No content

Update multiple variants

patch
Authorizations
AuthorizationstringRequired
Bodyobject[]

Update model for a variant

VariantIdinteger · int32Optional

Id of variant to update

Responses
200

OK

No content

patch
/v1/variants
200

OK

No content

Get all identifiers and their internal ids for a specific identifier type

get
Authorizations
AuthorizationstringRequired
Path parameters
identifierAliasstringRequired

Alias of identifier type

Responses
200

OK

application/json
get
/v1/variants/identifiers/{identifierAlias}
200

OK

Get the internal id of a variant based on its identifier

get
Authorizations
AuthorizationstringRequired
Path parameters
identifierAliasstringRequired

Alias of identifier type

identifierstringRequired

Identifier value

Responses
200

OK

application/json
Responseinteger · int32
get
/v1/variants/identifiers/{identifierAlias}/{identifier}
200

OK

Get internal ids of multiple variants from their identifier

post
Authorizations
AuthorizationstringRequired
Body

Provide an identifier alias along with an array of identifiers to get the internal entity ids matching those identifiers

IdentifierAliasstring | nullableOptional

The alias of the identifier

Identifiersstring[] | nullableOptional

Array of identifiers to return internal ids for

Responses
200

OK

application/json
post
/v1/variants/batch/identifiers
200

OK

Get attribute values for a variant

get
Authorizations
AuthorizationstringRequired
Path parameters
idinteger · int32Required

Id of variant

Query parameters
globalListValueReferencesOnlybooleanOptional

Indicate if only uids of referenced to global list values shall be returned instead of the materialized values

Default: false
Responses
200

OK

application/json
get
/v1/variants/{id}/attributevalues

Get attribute values for multiple variants

post

No more than 5000 variants can be requested at a time.

Authorizations
AuthorizationstringRequired
Body

Define which categories to fetch data for and what data to fetch

VariantIdsinteger · int32[] | nullableOptional

Ids of products to return

IncludeValuesinteger · enumOptional

Defines which attribute values to return

  • 1 = All: Return all attribute values
  • 2 = Scopes: Return values for scopes specified in request
  • 3 = Aliases: Return values for attribute aliases specified in request
  • 4 = ScopesAndAliases: Return values for attributes in specified scopes, plus values in the attributes specified by alias
  • 5 = Uids: Return values for attribute uids specified in request
Possible values:
Scopesstring[] | nullableOptional

If IncludeValues is Scopes, define which scopes to return values for here

Aliasesstring[] | nullableOptional

If IncludeValues is Aliases, define aliases of the attributes to include values for

Uidsstring · uuid[] | nullableOptional

If IncludeValues is Uids, define uids of the attributes to include values for

LimitToCultureCodesstring[] | nullableOptional

Only return values for specific languages

LimitToSegmentsstring[] | nullableOptional

Only return values for specific dimension segments

GlobalListValueReferencesOnlybooleanOptional

Indicate if only uids of referenced to global list values shall be returned instead of the materialized values

FromTimestampstring · date-time | nullableOptional

Get attribute values back in time

Responses
200

OK

application/json
post
/v1/variants/batch/attributevalues
200

OK

Get references to a variant

get

#Available from v.3.5.0

Authorizations
AuthorizationstringRequired
Path parameters
idinteger · int32Required

Id of variant

Responses
200

OK

application/json
get
/v1/variants/{id}/references
200

OK

Get references to a batch of variants

post

#Available from v.3.5.0 No more than 5000 values can be requested at a time.

Authorizations
AuthorizationstringRequired
Bodyinteger · int32[]
integer · int32[]Optional
Responses
200

OK

application/json
post
/v1/variants/batch/references
200

OK

Get ids of variants matching certain criteria

post
Authorizations
AuthorizationstringRequired
Body

Search model used for searching products or variants in PIM

IncludeArchivedbooleanOptional

Include archived items in result

Responses
200

OK

application/json
Responseinteger · int32[]
post
/v1/variants/search
200

OK

Get paged result of variants matching certain criteria. Result mapped with headers and item results

post
Authorizations
AuthorizationstringRequired
Body

Extended search model used for searching products or variants in PIM with support for paging and sorting

Pageinteger · int32Optional
PageSizeinteger · int32 | nullableOptional
FieldUidsstring[] | nullableOptional
SortByFieldUidstring | nullableOptional
SortDescendingboolean | nullableOptional
IncludeArchivedbooleanOptional

Include archived items in result

Responses
200

OK

application/json
post
/v1/variants/search/paged
200

OK

Get all available query fields in the PIM installation

get
Authorizations
AuthorizationstringRequired
Responses
200

OK

application/json
get
/v1/variants/queryfields
200

OK

Get Enrichment Insights for a variant

get

#Available from v.3.5.0

Authorizations
AuthorizationstringRequired
Path parameters
idinteger · int32Required

Id of variant to get insights for

Responses
200

OK

application/json
get
/v1/variants/{id}/enrichmentinsights
200

OK

Get Enrichment Insights for a batch of variants

post

#Available from v.3.5.0

Authorizations
AuthorizationstringRequired
Bodyinteger · int32[]
integer · int32[]Optional
Responses
200

OK

application/json
post
/v1/variants/batch/enrichmentinsights
200

OK

Get insights for a batch of variants and a specific Enrichment Insight

post

#Available from v.3.5.0

Authorizations
AuthorizationstringRequired
Path parameters
enrichmentInsightUidstring · uuidRequired

Uid of enrichment insight to get for batch of variants

Bodyinteger · int32[]
integer · int32[]Optional
Responses
200

OK

application/json
Responseinteger · int32
post
/v1/variants/batch/enrichmentinsights/{enrichmentInsightUid}
200

OK

Enable or disable an enrichment insight for a variant

patch

#Available from v.3.5.0

Authorizations
AuthorizationstringRequired
Path parameters
idinteger · int32Required

Id of variant

enrichmentInsightSetupUidstring · uuidRequired

Uid of enrichment insight to toggle ignore for

ignorebooleanRequired

Indicate whether to ignore the insight for the given enrichment insight and variant

Responses
200

OK

No content

patch
/v1/variants/{id}/enrichmentinsights/{enrichmentInsightSetupUid}/{ignore}
200

OK

No content

Enable or disable an enrichment insight for a batch of variants

patch

#Available from v.3.5.0

Authorizations
AuthorizationstringRequired
Path parameters
enrichmentInsightSetupUidstring · uuidRequired

Uid of enrichment insight to toggle ignore for

ignorebooleanRequired

Indicate whether to ignore the insight for the given enrichment insight and variants

Bodyinteger · int32[]
integer · int32[]Optional
Responses
200

OK

No content

patch
/v1/variants/batch/enrichmentinsights/{enrichmentInsightSetupUid}/{ignore}
200

OK

No content

Get attributes which values are inherited from the product

post

A maximum of 1000 products can be requested in one request

Authorizations
AuthorizationstringRequired
Body

Request model for getting inheritedAttributes for a list of products

ProductIdsinteger · int32[] | nullableOptional

The product ids to get inherited attributes for

InheritedAttributesstring · uuid[] | nullableOptional

The attribute uids to get inherited attributes for

Responses
200

OK

application/json
post
/v1/variants/inheritedAttributeValues
200

OK

Last updated