# 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 /variants Get basic models for variants
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
{
"Variants": [
{
"Id": 2011,
"Name": {
"en-GB": "Apple Iphone - Red/256GB",
"da-DK": "Apple Iphone - Rød/256GB"
},
"ProductId": 3922,
"SortOrder": 3,
"Created": "2024-07-16T23:33:27.2266595+02:00",
"CreatedBy": "Struct",
"LastModified": "2024-07-16T23:33:27.2266595+02:00",
"LastModifiedBy": "Struct",
"IsArchived": false,
"ProductStructureUid": "9b50e88a-c65c-48bd-816d-977445ccca53",
"DefiningAttributes": [
"cf0b1b48-bf9a-44c4-9a1d-f89368169f69",
"464828c7-c6d7-461c-96b5-bf19ef897715"
]
},
{
"Id": 2012,
"Name": {
"en-GB": "Apple Iphone - Red/512GB",
"da-DK": "Apple Iphone - Rød/512GB"
},
"ProductId": 3922,
"SortOrder": 2,
"Created": "2024-04-07T23:33:27.2266595+02:00",
"CreatedBy": "Struct",
"LastModified": "2024-02-17T22:33:27.2266595+01:00",
"LastModifiedBy": "Struct",
"IsArchived": false,
"ProductStructureUid": "9b50e88a-c65c-48bd-816d-977445ccca53",
"DefiningAttributes": [
"cf0b1b48-bf9a-44c4-9a1d-f89368169f69",
"464828c7-c6d7-461c-96b5-bf19ef897715"
]
},
{
"Id": 2013,
"Name": {
"en-GB": "Samsung TV - 55 inch",
"da-DK": "Samsung TV - 55 tommer"
},
"ProductId": 4443,
"SortOrder": 1,
"Created": "2024-01-23T22:33:27.2266595+01:00",
"CreatedBy": "Struct",
"LastModified": "2024-01-23T22:33:27.2266595+01:00",
"LastModifiedBy": "Struct",
"IsArchived": false,
"ProductStructureUid": "9b50e88a-c65c-48bd-816d-977445ccca53",
"DefiningAttributes": [
"c9dc6767-e374-472d-84ac-82e6a0216c51"
]
}
],
"Total": 20102,
"Remaining": 20100,
"LastId": 20
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
includeArchived | query | boolean | |
limit | query | integer | |
afterId | query | integer |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Variants | array : VariantModel |
Variants in result set |
Total | integer |
The total number of items |
Remaining | integer |
The remaining items that lie after the last id of the item in this result set |
LastId | integer |
The id of the last item in this result set |
Property name | Data type | Description |
---|---|---|
Id | integer |
Id of variant |
Name | object |
Display name of variant (Dictionary of ISO culture code and name) Note: Available from 3.7.0 |
ProductId | integer |
Id of product to which variant is attached |
SortOrder | integer |
#Available from v.3.2.0 The sort order of the variant compared to other variants of this product |
VariantGroupId | integer |
#Available from v.3.11.0 The variant group this variant is connected to, if any |
VariantGroupSortOrder | integer |
#Available from v.3.11.0 The sortorder relative to other variants connected to the same variant group |
Created | string |
Timestamp of variant creation |
CreatedBy | string |
Username of the user who created the variant |
LastModified | string |
Timestamp of the last variant update |
LastModifiedBy | string |
Username of the user who made the last change to the variant |
IsArchived | boolean |
Indicates whether the variant is archived |
ArchiveReason | string |
The uid of the archive reason selected when the variant was archived |
ProductStructureUid | string |
The product structure used by this variant |
DefiningAttributes | array |
The unique ids of the attributes acting as defining attributes for this variant |
WorkflowStateUid | string |
The uid of the workflow state of the variant |
POST /variants Create new variants
A maximum of 5000 variants can be created in one request
[
{
"ProductId": 3699,
"Values": {
"EAN": "5796359512359",
"Size": "L",
"Color": [
{
"CultureCode": "en-GB",
"Data": "Red"
},
{
"CultureCode": "da-DK",
"Data": "Rød"
}
]
}
},
{
"ProductId": 3699,
"Values": {
"EAN": "5756962549623",
"Size": "M",
"Color": [
{
"CultureCode": "en-GB",
"Data": "Red"
},
{
"CultureCode": "da-DK",
"Data": "Rød"
}
]
}
}
]
[
10024,
10025,
10026
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
variants | body | array : CreateVariantModel |
Variants |
Property name | Data type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ProductId | integer |
Id of product to attach variant to |
||||||||||||||||||||||||||||
SortOrder | integer |
Sort order of variant compared to other variants of the product (when null, variant is placed after existing variants) |
||||||||||||||||||||||||||||
VariantGroupSortOrder | integer |
Sort order of variant compared to other variants in same variant group |
||||||||||||||||||||||||||||
WorkflowStateUid | string |
Workflow state to set on the variant |
||||||||||||||||||||||||||||
Values | object |
Dictionary of attribute alias and the corresponding attribute value as an object representation The table below shows how different attributes translates to this value model.
|
Response status OK (200)
DELETE /variants Delete multiple variants
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
variantIds | body | array : integer |
Ids of variants to delete |
Response status OK (200)
PATCH /variants Update multiple variants
[
{
"VariantId": 23556,
"UpdateModel": {
"Values": {
"Size": "L"
}
}
},
{
"VariantId": 20111,
"UpdateModel": {
"IsArchived": true,
"ArchiveReason": "acdca09a-0652-4675-b791-bba85666bb4f"
}
},
{
"VariantId": 56843,
"UpdateModel": {
"ProductId": 30211,
"SortOrder": 32,
"Values": {
"EAN": "5796359512359",
"Size": "M"
}
}
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
variants | body | array : BatchUpdateVariantModel |
Update model |
Property name | Data type | Description |
---|---|---|
VariantId | integer |
Id of variant to update |
UpdateModel | object : UpdateVariantModel |
Model containing updates to make on variant (properties with null values are ignored and does not cause an update) |
Property name | Data type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ProductId | integer |
Id of product to move variant to #Available from 3.2.0 |
||||||||||||||||||||||||||||
IsArchived | boolean |
Indicate whether the product shall be archived or un-archived |
||||||||||||||||||||||||||||
ArchiveReason | string |
Reference to the archive reason when archiving variant (if IsArchived is true) |
||||||||||||||||||||||||||||
SortOrder | integer |
Sort order of variant compared to other variants of the product |
||||||||||||||||||||||||||||
VariantGroupSortOrder | integer |
Sort order of variant compared to other variants in same variant group |
||||||||||||||||||||||||||||
WorkflowStateUid | string |
Workflow state to set on the variant |
||||||||||||||||||||||||||||
Values | object |
Dictionary of attribute alias and the corresponding attribute value as an object representation The table below shows how different attributes translates to this value model.
|
Response status OK (200)
GET /variants/{id} Get basic model for a variant
{
"Id": 2011,
"Name": {
"en-GB": "Apple Iphone - Red/256GB",
"da-DK": "Apple Iphone - Rød/256GB"
},
"ProductId": 3922,
"SortOrder": 3,
"Created": "2024-07-16T23:33:27.2226341+02:00",
"CreatedBy": "Struct",
"LastModified": "2024-07-16T23:33:27.2226341+02:00",
"LastModifiedBy": "Struct",
"IsArchived": false,
"ProductStructureUid": "77bbc30b-1e8f-469a-92d3-412943130c04",
"DefiningAttributes": [
"cb365142-ae8d-4afb-a08b-dd789d1d779c",
"175cc4e9-221c-4c22-a506-32a2d0f23770"
]
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Id of variant |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Id | integer |
Id of variant |
Name | object |
Display name of variant (Dictionary of ISO culture code and name) Note: Available from 3.7.0 |
ProductId | integer |
Id of product to which variant is attached |
SortOrder | integer |
#Available from v.3.2.0 The sort order of the variant compared to other variants of this product |
VariantGroupId | integer |
#Available from v.3.11.0 The variant group this variant is connected to, if any |
VariantGroupSortOrder | integer |
#Available from v.3.11.0 The sortorder relative to other variants connected to the same variant group |
Created | string |
Timestamp of variant creation |
CreatedBy | string |
Username of the user who created the variant |
LastModified | string |
Timestamp of the last variant update |
LastModifiedBy | string |
Username of the user who made the last change to the variant |
IsArchived | boolean |
Indicates whether the variant is archived |
ArchiveReason | string |
The uid of the archive reason selected when the variant was archived |
ProductStructureUid | string |
The product structure used by this variant |
DefiningAttributes | array |
The unique ids of the attributes acting as defining attributes for this variant |
WorkflowStateUid | string |
The uid of the workflow state of the variant |
DELETE /variants/{id} Delete a variant
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Id of variant to delete |
Response status OK (200)
PATCH /variants/{id} Update a variant
{
"Values": {
"EAN": "5796359512359",
"Size": "L",
"Color": [
{
"CultureCode": "en-GB",
"Data": "Red"
},
{
"CultureCode": "da-DK",
"Data": "Rød"
}
]
}
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Id of variant |
model | body | object : UpdateVariantModel |
Update model |
Property name | Data type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ProductId | integer |
Id of product to move variant to #Available from 3.2.0 |
||||||||||||||||||||||||||||
IsArchived | boolean |
Indicate whether the product shall be archived or un-archived |
||||||||||||||||||||||||||||
ArchiveReason | string |
Reference to the archive reason when archiving variant (if IsArchived is true) |
||||||||||||||||||||||||||||
SortOrder | integer |
Sort order of variant compared to other variants of the product |
||||||||||||||||||||||||||||
VariantGroupSortOrder | integer |
Sort order of variant compared to other variants in same variant group |
||||||||||||||||||||||||||||
WorkflowStateUid | string |
Workflow state to set on the variant |
||||||||||||||||||||||||||||
Values | object |
Dictionary of attribute alias and the corresponding attribute value as an object representation The table below shows how different attributes translates to this value model.
|
Response status OK (200)
GET /variants/{id}/attributevalues Get attribute values for a variant
{
"VariantId": 56687,
"Values": {
"EAN": "5796359512359",
"Size": "L",
"Color": [
{
"CultureCode": "en-GB",
"Data": "Red"
},
{
"CultureCode": "da-DK",
"Data": "Rød"
}
]
}
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Id of variant |
globalListValueReferencesOnly | query | boolean |
Indicate if only uids of referenced to global list values shall be returned instead of the materialized values |
Response status OK (200)
Property name | Data type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
VariantId | integer |
Id of variant |
||||||||||||||||||||||||||||
Values | object |
Dictionary of attribute alias and the corresponding attribute value as an object representation The table below shows how different attributes translates to this value model.
|
GET /variants/{id}/enrichmentinsights Get Enrichment Insights for a variant
#Available from v.3.5.0
[
{
"EnrichmentInsightSetupUid": "b9ab083f-d622-4eba-b273-4a9bf26a3a03",
"EntityId": 1974035,
"Completeness": 50,
"MissingData": [
{
"Type": "AttributeInsightsDataReference",
"DataReference": "f9a52541-5712-406b-b4b6-04a94399e00f_9_NA"
}
],
"Ignored": false
},
{
"EnrichmentInsightSetupUid": "731a399b-f61c-48d4-b1c0-251a20d7125a",
"EntityId": 1974035,
"Completeness": 100,
"MissingData": [],
"Ignored": false
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Id of variant to get insights for |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
EnrichmentInsightSetupUid | string |
Uid of enrichment insight |
EntityId | integer |
Id of entity |
Completeness | integer |
Completeness in percentage (0 - 100). Is null, if ignored is true |
MissingData | array : InsightDataReference |
List of missing data for this entity to reach 100% completeness for this enrichment insight |
Ignored | boolean |
Indicates whether the completeness is ignored for this entity and this enrichment insight |
Property name | Data type | Description |
---|---|---|
Type | string |
Type of data reference |
DataReference | string |
The data reference itself |
PATCH /variants/{id}/enrichmentinsights/{enrichmentInsightSetupUid}/{ignore} Enable or disable an enrichment insight for a variant
#Available from v.3.5.0
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Id of variant |
enrichmentInsightSetupUid | path | string |
Uid of enrichment insight to toggle ignore for |
ignore | path | boolean |
Indicate whether to ignore the insight for the given enrichment insight and variant |
Response status OK (200)
GET /variants/{id}/references Get references to a variant
#Available from v.3.5.0
[
{
"VariantId": 12,
"ReferencingCategories": [
{
"EntityId": 100,
"AttributeUid": "aee552ea-2d06-4024-a437-5ddede4336fb"
},
{
"EntityId": 101,
"AttributeUid": "aee552ea-2d06-4024-a437-5ddede4336fb"
}
],
"ReferencingProducts": [
{
"EntityId": 100010,
"AttributeUid": "62008f05-a6dc-4473-841c-d386ffb98418"
},
{
"EntityId": 100011,
"AttributeUid": "62008f05-a6dc-4473-841c-d386ffb98418"
},
{
"EntityId": 102354,
"AttributeUid": "28ec562e-f2c7-4821-86c2-cb836ff197ef"
}
],
"ReferencingVariantGroups": [],
"ReferencingVariants": [
{
"EntityId": 100,
"AttributeUid": "62008f05-a6dc-4473-841c-d386ffb98418"
}
],
"ReferencingGlobalListValues": [
"4498338d-0790-4bcd-bbfe-9db24216b16d",
"fc8c52f9-48e4-4b1b-8cbc-a18eb15b9504"
]
},
{
"VariantId": 20,
"ReferencingCategories": [
{
"EntityId": 100,
"AttributeUid": "aee552ea-2d06-4024-a437-5ddede4336fb"
}
],
"ReferencingProducts": [
{
"EntityId": 23553,
"AttributeUid": "62008f05-a6dc-4473-841c-d386ffb98418"
},
{
"EntityId": 5656,
"AttributeUid": "62008f05-a6dc-4473-841c-d386ffb98418"
}
],
"ReferencingVariantGroups": [],
"ReferencingVariants": [
{
"EntityId": 568323,
"AttributeUid": "28ec562e-f2c7-4821-86c2-cb836ff197ef"
}
],
"ReferencingGlobalListValues": [
"6a3edbaa-b0ab-4052-8e1d-2508e62463f0",
"84f36a79-ec03-493a-9ef4-bf8d6dbea23f"
]
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
id | path | integer |
Id of variant |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
VariantId | integer |
Id of the referenced variant |
ReferencingCategories | array : EntityReferenceDetail |
List of categories referencing this variant |
ReferencingProducts | array : EntityReferenceDetail |
List of products referencing this variant |
ReferencingVariantGroups | array : EntityReferenceDetail |
List of variant groups referencing this variant |
ReferencingVariants | array : EntityReferenceDetail |
List of variants referencing this variant |
ReferencingGlobalListValues | array |
List of global list values referencing this variant |
Property name | Data type | Description |
---|---|---|
EntityId | integer |
The id of the referencing entity |
AttributeUid | string |
The attribute on the referencing entity that holds the reference |
POST /variants/batch Get basic model for a range of variants
[
{
"Id": 2011,
"Name": {
"en-GB": "Apple Iphone - Red/256GB",
"da-DK": "Apple Iphone - Rød/256GB"
},
"ProductId": 3922,
"SortOrder": 3,
"Created": "2024-07-16T23:33:27.2256602+02:00",
"CreatedBy": "Struct",
"LastModified": "2024-07-16T23:33:27.2256602+02:00",
"LastModifiedBy": "Struct",
"IsArchived": false,
"ProductStructureUid": "6ea894e1-1af2-408e-acc6-4f6d2b19a93a",
"DefiningAttributes": [
"976dbce4-02f3-46fb-aa6b-397891b336fd",
"089802bd-2157-46a6-9053-cf21179937f3"
]
},
{
"Id": 2012,
"Name": {
"en-GB": "Apple Iphone - Red/512GB",
"da-DK": "Apple Iphone - Rød/512GB"
},
"ProductId": 3922,
"SortOrder": 2,
"Created": "2024-04-07T23:33:27.2256602+02:00",
"CreatedBy": "Struct",
"LastModified": "2024-02-17T22:33:27.2256602+01:00",
"LastModifiedBy": "Struct",
"IsArchived": false,
"ProductStructureUid": "6ea894e1-1af2-408e-acc6-4f6d2b19a93a",
"DefiningAttributes": [
"976dbce4-02f3-46fb-aa6b-397891b336fd",
"089802bd-2157-46a6-9053-cf21179937f3"
]
},
{
"Id": 2013,
"Name": {
"en-GB": "Samsung TV - 55 inch",
"da-DK": "Samsung TV - 55 tommer"
},
"ProductId": 4443,
"SortOrder": 1,
"Created": "2024-01-23T22:33:27.2256602+01:00",
"CreatedBy": "Struct",
"LastModified": "2024-01-23T22:33:27.2256602+01:00",
"LastModifiedBy": "Struct",
"IsArchived": false,
"ProductStructureUid": "6ea894e1-1af2-408e-acc6-4f6d2b19a93a",
"DefiningAttributes": [
"4b97f207-862d-4651-ad7b-3d861d52f3a4"
]
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
ids | body | array : integer |
Ids of variants to get models for |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Id | integer |
Id of variant |
Name | object |
Display name of variant (Dictionary of ISO culture code and name) Note: Available from 3.7.0 |
ProductId | integer |
Id of product to which variant is attached |
SortOrder | integer |
#Available from v.3.2.0 The sort order of the variant compared to other variants of this product |
VariantGroupId | integer |
#Available from v.3.11.0 The variant group this variant is connected to, if any |
VariantGroupSortOrder | integer |
#Available from v.3.11.0 The sortorder relative to other variants connected to the same variant group |
Created | string |
Timestamp of variant creation |
CreatedBy | string |
Username of the user who created the variant |
LastModified | string |
Timestamp of the last variant update |
LastModifiedBy | string |
Username of the user who made the last change to the variant |
IsArchived | boolean |
Indicates whether the variant is archived |
ArchiveReason | string |
The uid of the archive reason selected when the variant was archived |
ProductStructureUid | string |
The product structure used by this variant |
DefiningAttributes | array |
The unique ids of the attributes acting as defining attributes for this variant |
WorkflowStateUid | string |
The uid of the workflow state of the variant |
POST /variants/batch/attributevalues Get attribute values for multiple variants
No more than 5000 variants can be requested at a time.
[
{
"VariantId": 56687,
"Values": {
"EAN": "5796359512359",
"Size": "L",
"Color": [
{
"CultureCode": "en-GB",
"Data": "Red"
},
{
"CultureCode": "da-DK",
"Data": "Rød"
}
]
}
},
{
"VariantId": 56297,
"Values": {
"EAN": "5756962549623",
"Size": "M",
"Color": [
{
"CultureCode": "en-GB",
"Data": "Red"
},
{
"CultureCode": "da-DK",
"Data": "Rød"
}
]
}
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : VariantValuesRequestModel |
Request model |
Property name | Data type | Description |
---|---|---|
VariantIds | array |
Ids of products to return |
IncludeValues | string |
Select if any source of values shall be returned |
Scopes | array |
If IncludeValues is Scopes, define which scopes to return values for here |
Aliases | array |
If IncludeValues is Aliases, define aliases of the attributes to include values for |
Uids | array |
If IncludeValues is Uids, define uids of the attributes to include values for |
LimitToCultureCodes | array |
Only return values for specific languages |
LimitToSegments | array |
Only return values for specific dimension segments |
GlobalListValueReferencesOnly | boolean |
Indicate if only uids of referenced to global list values shall be returned instead of the materialized values |
FromTimestamp | string |
Get attribute values back in time |
Response status OK (200)
Property name | Data type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
VariantId | integer |
Id of variant |
||||||||||||||||||||||||||||
Values | object |
Dictionary of attribute alias and the corresponding attribute value as an object representation The table below shows how different attributes translates to this value model.
|
POST /variants/batch/enrichmentinsights Get Enrichment Insights for a batch of variants
#Available from v.3.5.0
[
{
"EnrichmentInsightSetupUid": "fa4dbb57-04a5-4fdb-b945-d8cb3739d39d",
"EntityId": 1974035,
"Completeness": 50,
"MissingData": [
{
"Type": "AttributeInsightsDataReference",
"DataReference": "f9a52541-5712-406b-b4b6-04a94399e00f_9_NA"
}
],
"Ignored": false
},
{
"EnrichmentInsightSetupUid": "fa4dbb57-04a5-4fdb-b945-d8cb3739d39d",
"EntityId": 1974043,
"Completeness": 100,
"MissingData": [],
"Ignored": false
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
variantIds | body | array : integer |
Ids of variants to get insights for |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
EnrichmentInsightSetupUid | string |
Uid of enrichment insight |
EntityId | integer |
Id of entity |
Completeness | integer |
Completeness in percentage (0 - 100). Is null, if ignored is true |
MissingData | array : InsightDataReference |
List of missing data for this entity to reach 100% completeness for this enrichment insight |
Ignored | boolean |
Indicates whether the completeness is ignored for this entity and this enrichment insight |
Property name | Data type | Description |
---|---|---|
Type | string |
Type of data reference |
DataReference | string |
The data reference itself |
PATCH /variants/batch/enrichmentinsights/{enrichmentInsightSetupUid}/{ignore} Enable or disable an enrichment insight for a batch of variants
#Available from v.3.5.0
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
variantIds | body | array : integer |
Ids of variants to toggle ignore for |
enrichmentInsightSetupUid | path | string |
Uid of enrichment insight to toggle ignore for |
ignore | path | boolean |
Indicate whether to ignore the insight for the given enrichment insight and variants |
Response status OK (200)
POST /variants/batch/enrichmentinsights/{enrichmentInsightUid} Get insights for a batch of variants and a specific Enrichment Insight
#Available from v.3.5.0
[
{
"EnrichmentInsightSetupUid": "75f02f73-ad51-429e-a16b-761837f9915f",
"EntityId": 1974035,
"Completeness": 50,
"MissingData": [
{
"Type": "AttributeInsightsDataReference",
"DataReference": "f9a52541-5712-406b-b4b6-04a94399e00f_9_NA"
}
],
"Ignored": false
},
{
"EnrichmentInsightSetupUid": "75f02f73-ad51-429e-a16b-761837f9915f",
"EntityId": 1974043,
"Completeness": 100,
"MissingData": [],
"Ignored": false
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
variantIds | body | array : integer |
Ids of variants to get insights for |
enrichmentInsightUid | path | string |
Uid of enrichment insight to get for batch of variants |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
EnrichmentInsightSetupUid | string |
Uid of enrichment insight |
EntityId | integer |
Id of entity |
Completeness | integer |
Completeness in percentage (0 - 100). Is null, if ignored is true |
MissingData | array : InsightDataReference |
List of missing data for this entity to reach 100% completeness for this enrichment insight |
Ignored | boolean |
Indicates whether the completeness is ignored for this entity and this enrichment insight |
Property name | Data type | Description |
---|---|---|
Type | string |
Type of data reference |
DataReference | string |
The data reference itself |
POST /variants/batch/identifiers Get internal ids of multiple variants from their identifier
{
"5796359512359": 10000,
"5756525697563": 11012,
"5756326985442": 15133,
"5799645384354": null
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : IdentifierBatchModel |
Specify alias of identifier type and the identifiers to return internal ids for |
Property name | Data type | Description |
---|---|---|
IdentifierAlias | string |
The alias of the identifier |
Identifiers | array |
Array of identifiers to return internal ids for |
Response status OK (200)
POST /variants/batch/references Get references to a batch of variants
#Available from v.3.5.0 No more than 5000 values can be requested at a time.
[
{
"VariantId": 12,
"ReferencingCategories": [
{
"EntityId": 100,
"AttributeUid": "c8b25a21-b371-4ff9-98c8-4c85d7732d4d"
},
{
"EntityId": 101,
"AttributeUid": "c8b25a21-b371-4ff9-98c8-4c85d7732d4d"
}
],
"ReferencingProducts": [
{
"EntityId": 100010,
"AttributeUid": "d071969c-7bce-4bca-9345-d6b5f5b58c8d"
},
{
"EntityId": 100011,
"AttributeUid": "d071969c-7bce-4bca-9345-d6b5f5b58c8d"
},
{
"EntityId": 102354,
"AttributeUid": "335841a1-1aab-4b74-9ad6-a58d91d80b7f"
}
],
"ReferencingVariantGroups": [],
"ReferencingVariants": [
{
"EntityId": 100,
"AttributeUid": "d071969c-7bce-4bca-9345-d6b5f5b58c8d"
}
],
"ReferencingGlobalListValues": [
"e84c97a3-e3f8-4020-8b63-ece8a27b2c7d",
"dd0d3809-5e92-48bb-814f-db1169b3000b"
]
},
{
"VariantId": 20,
"ReferencingCategories": [
{
"EntityId": 100,
"AttributeUid": "c8b25a21-b371-4ff9-98c8-4c85d7732d4d"
}
],
"ReferencingProducts": [
{
"EntityId": 23553,
"AttributeUid": "d071969c-7bce-4bca-9345-d6b5f5b58c8d"
},
{
"EntityId": 5656,
"AttributeUid": "d071969c-7bce-4bca-9345-d6b5f5b58c8d"
}
],
"ReferencingVariantGroups": [],
"ReferencingVariants": [
{
"EntityId": 568323,
"AttributeUid": "335841a1-1aab-4b74-9ad6-a58d91d80b7f"
}
],
"ReferencingGlobalListValues": [
"fcd0436f-afb4-43de-acba-ce3f361f7375",
"ef8fb494-0459-4d09-b62a-283f43860178"
]
}
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
ids | body | array : integer |
Ids of variants |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
VariantId | integer |
Id of the referenced variant |
ReferencingCategories | array : EntityReferenceDetail |
List of categories referencing this variant |
ReferencingProducts | array : EntityReferenceDetail |
List of products referencing this variant |
ReferencingVariantGroups | array : EntityReferenceDetail |
List of variant groups referencing this variant |
ReferencingVariants | array : EntityReferenceDetail |
List of variants referencing this variant |
ReferencingGlobalListValues | array |
List of global list values referencing this variant |
Property name | Data type | Description |
---|---|---|
EntityId | integer |
The id of the referencing entity |
AttributeUid | string |
The attribute on the referencing entity that holds the reference |
GET /variants/identifiers/{identifierAlias} Get all identifiers and their internal ids for a specific identifier type
{
"5796359512359": 10000,
"5756525697563": 11012,
"5756326985442": 15133
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
identifierAlias | path | string |
Alias of identifier type |
Response status OK (200)
GET /variants/identifiers/{identifierAlias}/{identifier} Get the internal id of a variant based on its identifier
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
identifierAlias | path | string |
Alias of identifier type |
identifier | path | string |
Identifier value |
Response status OK (200)
GET /variants/ids Get ids of all variants in the system
By default, ids for archived variants are not returned
[
56165,
65332,
1565313,
41633,
5613,
23536,
56332
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
includeArchived | query | boolean |
Include archived variants |
Response status OK (200)
GET /variants/queryfields Get all available query fields in the PIM installation
[
{
"Uid": "PIM_CategoryIds",
"Name": "CategoryIds",
"SupportsSorting": false
},
{
"Uid": "Name_en-GB",
"Name": "Name (en-GB)",
"SupportsSorting": false
},
{
"Uid": "Name_da-DK",
"Name": "Name (da-DK)",
"SupportsSorting": false
},
{
"Uid": "Description_en-GB",
"Name": "Description (en-GB)",
"SupportsSorting": false
},
{
"Uid": "Description_da-DK",
"Name": "Description (da-DK)",
"SupportsSorting": false
}
]
Response status OK (200)
Property name | Data type | Description |
---|---|---|
Uid | string |
Unique id of field in PIM |
Name | string |
The display name of the field |
SupportsSorting | boolean |
If true field can be used for sorting |
POST /variants/search Get ids of variants matching certain criteria
{
"IncludeArchived": false,
"QueryModel": {
"SubQueries": [
{
"Filters": [
{
"FieldUid": "ReleasedInCountries_NA_NA",
"QueryOperator": 0,
"FilterValue": "DK"
}
],
"BooleanOperator": 0,
"QueryModelType": "SimpleQueryModel"
},
{
"Filters": [
{
"FieldUid": "Color.BaseColor.Name_en-GB_NA",
"QueryOperator": 0,
"FilterValue": "red"
},
{
"FieldUid": "Color.BaseColor.Name_en-GB_NA",
"QueryOperator": 0,
"FilterValue": "blue"
}
],
"BooleanOperator": 1,
"QueryModelType": "SimpleQueryModel"
}
],
"BooleanOperator": 0,
"QueryModelType": "BooleanQueryModel"
}
}
[
10021,
20311,
234032,
23134,
53451,
32433,
23481
]
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : SearchModel |
Query model |
Property name | Data type | Description |
---|---|---|
IncludeArchived | boolean |
Include archived items in result |
QueryModel | object : QueryModel |
The actual query to get result for |
Property name | Data type | Description |
---|---|---|
Filters | array : FieldFilterModel |
List of filter conditions |
BooleanOperator | string |
The operator of the query. Can be any of:
|
QueryModelType | string |
The type of query model. Name matches exact name of concrete model implementation |
Property name | Data type | Description |
---|---|---|
SubQueries | array : QueryModel |
Sub queries to execute |
BooleanOperator | string |
The operator of the query. Can be any of:
|
QueryModelType | string |
The type of query model. Name matches exact name of concrete model implementation |
Property name | Data type | Description |
---|---|---|
FieldUid | string |
Uid of field to query |
QueryOperator | string |
Operator to use for query. Can be any of:
|
FilterValue | object |
Value to filter for using the QueryOperator. When QueryOperator is "InList", FilterValue must be an array of values to query for |
Response status OK (200)
POST /variants/search/paged Get paged result of variants matching certain criteria. Result mapped with headers and item results
{
"Page": 1,
"PageSize": 10,
"FieldUids": [
"Id",
"Color.BaseColor.Name_en-GB_NA"
],
"SortByFieldUid": "Color.BaseColor.Name_en-GB_NA",
"SortDescending": true,
"IncludeArchived": false,
"QueryModel": {
"SubQueries": [
{
"Filters": [
{
"FieldUid": "ReleasedInCountries_NA_NA",
"QueryOperator": 0,
"FilterValue": "DK"
}
],
"BooleanOperator": 0,
"QueryModelType": "SimpleQueryModel"
},
{
"Filters": [
{
"FieldUid": "Color.BaseColor.Name_en-GB_NA",
"QueryOperator": 0,
"FilterValue": "red"
},
{
"FieldUid": "Color.BaseColor.Name_en-GB_NA",
"QueryOperator": 0,
"FilterValue": "blue"
}
],
"BooleanOperator": 1,
"QueryModelType": "SimpleQueryModel"
}
],
"BooleanOperator": 0,
"QueryModelType": "BooleanQueryModel"
}
}
{
"TotalHits": 33,
"Page": 1,
"PageSize": 3,
"TotalPages": 11,
"ItemListHeaders": [
{
"FieldUid": "Id",
"FieldName": "Internal Id",
"FieldType": "tableStringRenderer",
"SupportsSearching": true,
"SupportsSorting": true
},
{
"FieldUid": "Color.BaseColor.Name_en-GB_NA",
"FieldName": "Color.Base Color.Name",
"FieldType": "tableStringRenderer",
"SupportsSearching": true,
"SupportsSorting": true
}
],
"ListItems": [
{
"Id": 10021
},
{
"Id": 20311
},
{
"Id": 234032
}
]
}
Request parameters
Property name | Parameter type | Data type | Description |
---|---|---|---|
model | body | object : SearchPagedModel |
Query model |
Property name | Data type | Description |
---|---|---|
Page | integer | |
PageSize | integer | |
FieldUids | array | |
SortByFieldUid | string | |
SortDescending | boolean | |
IncludeArchived | boolean |
Include archived items in result |
QueryModel | object : QueryModel |
The actual query to get result for |
Property name | Data type | Description |
---|---|---|
Filters | array : FieldFilterModel |
List of filter conditions |
BooleanOperator | string |
The operator of the query. Can be any of:
|
QueryModelType | string |
The type of query model. Name matches exact name of concrete model implementation |
Property name | Data type | Description |
---|---|---|
SubQueries | array : QueryModel |
Sub queries to execute |
BooleanOperator | string |
The operator of the query. Can be any of:
|
QueryModelType | string |
The type of query model. Name matches exact name of concrete model implementation |
Property name | Data type | Description |
---|---|---|
FieldUid | string |
Uid of field to query |
QueryOperator | string |
Operator to use for query. Can be any of:
|
FilterValue | object |
Value to filter for using the QueryOperator. When QueryOperator is "InList", FilterValue must be an array of values to query for |
Response status OK (200)
Property name | Data type | Description |
---|---|---|
TotalHits | integer | |
Page | integer | |
PageSize | integer | |
TotalPages | integer | |
ItemListHeaders | array : ItemListHeader | |
ListItems | array : ListItem |
Property name | Data type | Description |
---|---|---|
FieldUid | string | |
FieldName | string | |
FieldType | string | |
SupportsSearching | boolean | |
SupportsSorting | boolean |
Property name | Data type | Description |
---|---|---|
Id | integer | |
ShownValues | array |