# Product groups
POST /GetProductGroupIds
{
"FilterPairs": [
{
"FieldAlias": "string",
"FilterValue": "string"
}
]
}
[
0,
1,
2
]
Request
Body parameters: Filter
Filter | ||
---|---|---|
Property name | Type | Description |
FilterPairs | FilterPairs[] | Array of filter key value pair |
FilterPairs | ||
Property name | Type | Description |
FieldAlias | string | Unique alias of any custom attribute or system attribute |
FilterValue | string | Value to filter on |
Response status OK (200)
Return value: none
Property name | Type | Description |
---|---|---|
ProductGroupIds | int[] | Array of product group Ids |
GET /GetAllHiearchyNodes
This Endpoint return all hierarchy nodes, meaning the all product groups categorized as hierarchies.
[
{
"Id": 00000,
"Alias": "String",
"ExternalRef": "String",
"Created": "2018-01-21T20:42:31.9149209+01:00",
"LastModified": "2018-01-21T20:43:15.7958667+01:00"
},
{
"Id": 00001,
"Alias": "String",
"Created": "2018-06-21T12:15:28.5478662+02:00",
"LastModified": "2018-06-27T13:24:39.5331636+02:00"
}
]
Request
Parameters: none
Response status OK (200)
Return value: HierarchyDTO[]
HierarchyDTO | ||
---|---|---|
Property name | Type | Description |
Id | int | Identifier of product group, |
Alias | string | Alias of product group |
ExternalRef | string | External reference of product group |
Created | DateTimeOffset | Datetime string including offset of when the product group was created |
LastModified | DateTimeOffset | Datetime string including offset of when the product group was last modified |
POST /GetInternalProductGroupIdToExternalRefMap
{
"ExternalRefs": [
"string"
]
}
[
{
"Key": "00000000000000",
"Value": 00000
}
]
Request
Body parameters: ExternalRefListModel
ExternalRefListModel | ||
---|---|---|
Property name | Type | Description |
ExternalRefs | string[] |
Response status OK (200)
Return value: InternalProductGroupIdToExternalRefMap
InternalProductGroupIdToExternalRefMap | ||
---|---|---|
Property name | Type | Description |
Key | string | External reference of product group is given as key |
Value | int | Product group id is given as value |
GET /GetProductGroupsByParentId
{
"ProductGroups": [
{
"Id": 21743,
"ExternalRef": "String",
"Alias": "String",
"Name": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": "String"
},
{
"LanguageId": 2,
"LocalizedVal": "String"
}
]
},
"Level": 3,
"SortOrder": 2,
"ParentId": 21739,
"Values": {
"name": {
"Uid": "3170836e-db86-47c5-a921-3c839d28cf93",
"AttributeUid": "56548347-db5d-406a-8340-34a53281a7c0",
"AttributeValueType": "LocalizedTextAttributeValue",
"LocalizedText": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": "String"
},
{
"LanguageId": 2,
"LocalizedVal": "String"
}
]
},
"IsLocalized": true,
"AttributeAlias": "String"
},
"Filters": {
"Uid": "fa465f1c-61f0-4263-95c1-ae1513766a13",
"AttributeUid": "68097eee-56e0-4e6a-b757-040e5e9c67da",
"AttributeValueType": "ComplexAttributeValue",
"SubAttributeValues": [],
"IsLocalized": false,
"AttributeAlias": "Filters"
},
"Icon": {
"Uid": "1ea03ea8-9bc2-4f79-8835-1f44dc3c9ef1",
"AttributeUid": "392608cc-eff4-43d4-bfc5-0f4f12ec00f5",
"AttributeValueType": "MediaAttributeValue",
"MediaIds": [],
"IsLocalized": false,
"AttributeAlias": "Icon"
},
"Logo": {
"Uid": "981fbd76-a810-484c-9268-f1b01d42a1f9",
"AttributeUid": "f9ba2e5e-d8de-4f27-8b92-202fb149d35a",
"AttributeValueType": "MediaAttributeValue",
"MediaIds": [],
"IsLocalized": false,
"AttributeAlias": "Logo"
}
},
"SpecificationAttributes": [],
"RenderedValues": {}
}
],
"Attributes": {
"0e9af3f0-467b-400f-a3bf-b9700aa4588f": {
"Uid": "0e9af3f0-467b-400f-a3bf-b9700aa4588f",
"Alias": "NameOfAttribute",
"Name": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": "String"
},
{
"LanguageId": 2,
"LocalizedVal": "String"
}
]
}
}
}
}
Request
Query parameters:
Property name | Type | Description |
---|---|---|
Ids | int | Id of parent group to query for |
Response status OK (200)
Return value: ProductGroupResult
ProductGroupResult | ||
---|---|---|
Property name | Type | Description |
ProductGroups | ProductGroupDTO | Array of product group objects |
Attributes | Attributes | Object of all relevant attributes as object |
ProductDTO | ||
Property name | Type | Description |
Id | int | unique id of product group |
ExternalRef | string | External reference for the product group |
Alias | string | Alias of product group |
Name | string | Localized name for the product group |
Level | int | Indicates the depth of the product group in it's hierarchy |
SortOrder | int | If the product group has been assigned a specific sorting, this key indicates it's number in the sorting |
ParentId | int | Parent product group id to the product group |
Values | AttributeValue[] | Array of different attribute values from the product |
SpecificationAttributes | AttributeValue[] | Array of different specification attribute values from the product |
RenderedValues | RenderedAttributeValue[] | See Attribute section for more info |
Attributes | ||
Property name | Type | Description |
Key | guid | Guid of attribute used as key |
Value | Attribute | See Attribute section for more info |
AttributeValue | ||
Property name | Type | Description |
Uid | guid | Unique identifier for value |
AttributeUid | guid | Unique identifier for attribute |
AttributeValueType | string | Type of value as string |
SortOrder | int | Sort order of value |
AttributeAlias | string | Alias of the attribute. Properties for the AttributeValue will depend on this |
IsTrue | bool | If value is true |
CalculatedValue | string | Caluclated value if value can be calculated |
LocalizedCalculatedValue | TranslatedValue<string> | localized value if the value is translateable |
SubAttributeValues | AttributeValue[] | Array of sub attributes (ComplexAttributeValue) |
DateTime | DateTimeOffset | Datetime value with timezone offset (DateTimeAttributeValue) |
ReferencedAttributeValueUids | guid[] | Array of guids refering to another globallist attributevalues (FixedListAttributeValue) |
ReferencedAttributeValues | AttributeValue[] | Array of attributevalues from another globallist (FixedListAttributeValue) |
LocalizedImageId | TranslatedValue<int> | Localized value for image |
ItemReferences | ProductReference[] | Array of productreferences (ProductAttributeValue) |
LocalizedX | TranslatedValue<decimal> | translated decimal value. AttributeValueType: (LocalizedAreaAttributeValue, LocalizedRangeAttributeValue) |
LocalizedY | TranslatedValue<decimal> | translated decimal value AttributeValueType: (LocalizedAreaAttributeValue, LocalizedRangeAttributeValue) |
LocalizedZ | TranslatedValue<decimal> | translated decimal value AttributeValueType: (LocalizedAreaAttributeValue, LocalizedRangeAttributeValue) |
LocalizedFrom | TranslatedValue<decimal> | translated decimal value |
LocalizedTo | TranslatedValue<decimal> | translated decimal value |
LocalizedMediaIds | TranslatedValue<int[]> | translated list of media ids |
LocalizedContentIds | TranslatedValue<int[]> | translated list of content ids |
From | decimal | |
To | decimal | |
LocalizedText | TranslatedValue<string> | Translated string values |
Text | string | |
X | decimal | AttributeValueType: (VolumeAttributeValue, AreaAttributeValue) |
RenderedAttributeValue | ||
Property name | Type | Description |
Value | TranslatedValue<string> | Translated value as string |
SortOrder | int | If attribute has been sorted, an integer will be included depicting it's sortorder |
ProductReference | ||
Property name | Type | Description |
ItemId | string | Unique item id of referenced product |
ItemName | string | Name of referenced product |
ReferenceType | int | Reference type derived from Enum (ProductGroup = 10, Product = 20, Variant = 30, Collection = 40) |
TranslatedValue<type> | ||
Property name | Type | Description |
LocalizedValues | LocalizedValue[] | List of translated names with language ids |
LocalizedValue | ||
Property name | Type | Description |
LanguageId | int | Unique id of language |
LocalizedVal | type | Value of variable type |
POST /GetProductGroupIdsByParentIds
{
"Ids": [
0,
1
]
}
{
"21739": [
21743,
21744,
21745,
21746
]
}
Request
Body parameters: IdsRequestModel
Property name | Type | Description |
---|---|---|
Ids | int[] | Array of product group parent ids |
Response status OK (200)
Return value: ProductGroupidsByParentId[]
ProductGroupidsByParentId | ||
---|---|---|
Property name | Type | Description |
ParentId | int | Id of the parent of the product group |
ProductGroupIds | int[] | Ids of the product groups contained in the product group |
POST /GetProductGroupsByIds
{
"Ids": [
0
],
"AttributeAliases": [
"string"
],
"SpecificationAttributeAliases": [
"string"
],
"IncludeRenderedValues": true
}
{
"ProductGroups": [
{
"Id": 21743,
"ExternalRef": "String",
"Alias": "String",
"Name": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": "String"
},
{
"LanguageId": 2,
"LocalizedVal": "String"
}
]
},
"Level": 3,
"SortOrder": 2,
"ParentId": 21739,
"Values": {
"name": {
"Uid": "3170836e-db86-47c5-a921-3c839d28cf93",
"AttributeUid": "56548347-db5d-406a-8340-34a53281a7c0",
"AttributeValueType": "LocalizedTextAttributeValue",
"LocalizedText": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": "String"
},
{
"LanguageId": 2,
"LocalizedVal": "String"
}
]
},
"IsLocalized": true,
"AttributeAlias": "String"
},
"Filters": {
"Uid": "fa465f1c-61f0-4263-95c1-ae1513766a13",
"AttributeUid": "68097eee-56e0-4e6a-b757-040e5e9c67da",
"AttributeValueType": "ComplexAttributeValue",
"SubAttributeValues": [],
"IsLocalized": false,
"AttributeAlias": "Filters"
},
"Icon": {
"Uid": "1ea03ea8-9bc2-4f79-8835-1f44dc3c9ef1",
"AttributeUid": "392608cc-eff4-43d4-bfc5-0f4f12ec00f5",
"AttributeValueType": "MediaAttributeValue",
"MediaIds": [],
"IsLocalized": false,
"AttributeAlias": "Icon"
},
"Logo": {
"Uid": "981fbd76-a810-484c-9268-f1b01d42a1f9",
"AttributeUid": "f9ba2e5e-d8de-4f27-8b92-202fb149d35a",
"AttributeValueType": "MediaAttributeValue",
"MediaIds": [],
"IsLocalized": false,
"AttributeAlias": "Logo"
}
},
"SpecificationAttributes": [],
"RenderedValues": {}
}
],
"Attributes": {
"0e9af3f0-467b-400f-a3bf-b9700aa4588f": {
"Uid": "0e9af3f0-467b-400f-a3bf-b9700aa4588f",
"Alias": "NameOfAttribute",
"Name": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": "String"
},
{
"LanguageId": 2,
"LocalizedVal": "String"
}
]
}
}
}
}
Request
Body parameters: IdsRequestModel
IdsRequestModel | ||
---|---|---|
Property name | Type | Description |
Ids | int[] | Array of product ids for the request |
AttributeAliases | string[] | Specify attributes to return, if none are specified, all will be returned |
SpecificationAttributeAliases | string[] | Specify specificationattributes to return, if none are specified, all will be returned |
IncludeRenderedValues | boolean | If rendered values for specified attributes should be returned |
Response status OK (200)
Return value: ProductGroupResult
ProductGroupResult | ||
---|---|---|
Property name | Type | Description |
ProductGroups | ProductGroupDTO | Array of product group objects |
Attributes | Attributes | Object of all relevant attributes as object |
ProductDTO | ||
Property name | Type | Description |
Id | int | unique id of product group |
ExternalRef | string | External reference for the product group |
Alias | string | Alias of product group |
Name | string | Localized name for the product group |
Level | int | Indicates the depth of the product group in it's hierarchy |
SortOrder | int | If the product group has been assigned a specific sorting, this key indicates it's number in the sorting |
ParentId | int | Parent product group id to the product group |
Values | AttributeValue[] | Array of different attribute values from the product |
SpecificationAttributes | AttributeValue[] | Array of different specification attribute values from the product |
RenderedValues | RenderedAttributeValue[] | See Attribute section for more info |
Attributes | ||
Property name | Type | Description |
Key | guid | Guid of attribute used as key |
Value | Attribute | See Attribute section for more info |
AttributeValue | ||
Property name | Type | Description |
Uid | guid | Unique identifier for value |
AttributeUid | guid | Unique identifier for attribute |
AttributeValueType | string | Type of value as string |
SortOrder | int | Sort order of value |
AttributeAlias | string | Alias of the attribute. Properties for the AttributeValue will depend on this |
IsTrue | bool | If value is true |
CalculatedValue | string | Caluclated value if value can be calculated |
LocalizedCalculatedValue | TranslatedValue<string> | localized value if the value is translateable |
SubAttributeValues | AttributeValue[] | Array of sub attributes (ComplexAttributeValue) |
DateTime | DateTimeOffset | Datetime value with timezone offset (DateTimeAttributeValue) |
ReferencedAttributeValueUids | guid[] | Array of guids refering to another globallist attributevalues (FixedListAttributeValue) |
ReferencedAttributeValues | AttributeValue[] | Array of attributevalues from another globallist (FixedListAttributeValue) |
LocalizedImageId | TranslatedValue<int> | Localized value for image |
ItemReferences | ProductReference[] | Array of productreferences (ProductAttributeValue) |
LocalizedX | TranslatedValue<decimal> | translated decimal value. AttributeValueType: (LocalizedAreaAttributeValue, LocalizedRangeAttributeValue) |
LocalizedY | TranslatedValue<decimal> | translated decimal value AttributeValueType: (LocalizedAreaAttributeValue, LocalizedRangeAttributeValue) |
LocalizedZ | TranslatedValue<decimal> | translated decimal value AttributeValueType: (LocalizedAreaAttributeValue, LocalizedRangeAttributeValue) |
LocalizedFrom | TranslatedValue<decimal> | translated decimal value |
LocalizedTo | TranslatedValue<decimal> | translated decimal value |
LocalizedMediaIds | TranslatedValue<int[]> | translated list of media ids |
LocalizedContentIds | TranslatedValue<int[]> | translated list of content ids |
From | decimal | |
To | decimal | |
LocalizedText | TranslatedValue<string> | Translated string values |
Text | string | |
X | decimal | AttributeValueType: (VolumeAttributeValue, AreaAttributeValue) |
RenderedAttributeValue | ||
Property name | Type | Description |
Value | TranslatedValue<string> | Translated value as string |
SortOrder | int | If attribute has been sorted, an integer will be included depicting it's sortorder |
ProductReference | ||
Property name | Type | Description |
ItemId | string | Unique item id of referenced product |
ItemName | string | Name of referenced product |
ReferenceType | int | Reference type derived from Enum (ProductGroup = 10, Product = 20, Variant = 30, Collection = 40) |
TranslatedValue<type> | ||
Property name | Type | Description |
LocalizedValues | LocalizedValue[] | List of translated names with language ids |
LocalizedValue | ||
Property name | Type | Description |
LanguageId | int | Unique id of language |
LocalizedVal | type | Value of variable type |
POST /SetAttributesOnProductGroups
[
{
"ProductGroupId": 0,
"AttributeUid": "00000000-0000-0000-0000-000000000000",
"Reference": "string"
}
]
Request
Body parameters: AttributeAttachment[]
AttributeAttachment | ||
---|---|---|
Property name | Type | Description |
ProductGroupId | int | Id of the target product group |
AttributeUid | guid | Unique identifier of the target attribute |
Reference | string | String reference to declare how this attribute was created/changed |
Response status OK (200)
Return value: none
POST /RemoveAttributesFromProductGroup
{
"AttributeUids": [
"00000000-0000-0000-0000-000000000000"
],
"ProductGroupId": 0
}
Request
Body parameters: RemoveAttributesFromProductGroupModel
RemoveAttributesFromProductGroupModel | ||
---|---|---|
Property name | Type | Description |
AttributeUids | guid[] | Array of guids with the specific attributes to delete |
ProductGroupId | int | Id of the product group where the attributes should be removed from |
Response status OK (200)
Return value: none
POST /CreateOrUpdateProductGroups
[
{
"ExternalRef": "string",
"Alias": "string",
"ApiWriteObjects": [
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
]
}
]
Request
Body parameters: ProductGroupApiObject[]
ProductGroupApiObject | ||
---|---|---|
Property name | Type | Description |
ExternalRef | string | External reference of the product group |
Alias | string | Unique alias of the product group |
ApiWriteObjects | ApiWriteObjects | Write object for any attribute value to assign to the group |
ApiWriteObject | ||
Property name | Type | Description |
IsKey | boolean | If the value is the key for determining if there is a value that should be updated |
IsParentKey | boolean | If object is a key of a parent |
Alias | string | Alias to identify what field the value is representing |
Value | object | The value itself, the API accepts object that match the setup of the global list |
KeyHash | string |
Response status OK (200)
Return value: none
POST /DeleteProductGroups
[
{
"ExternalRef": "string",
"Alias": "string",
"ApiWriteObjects": [
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
]
}
]
Request
Body parameters: ProductGroupApiObject[]
ProductGroupApiObject | ||
---|---|---|
Property name | Type | Description |
ExternalRef | string | External reference of the product group |
Alias | string | Unique alias of the product group |
ApiWriteObjects | ApiWriteObjects | Write object for any attribute value to assign to the group |
ApiWriteObject | ||
Property name | Type | Description |
IsKey | boolean | If the value is the key for determining if there is a value that should be updated |
IsParentKey | boolean | If object is a key of a parent |
Alias | string | Alias to identify what field the value is representing |
Value | object | The value itself, the API accepts object that match the setup of the global list |
KeyHash | string |
Response status OK (200)
Return value: none
POST /DeleteProductGroupsNotInList
This endpoint also takes a required query parameter in form of a Hierarchy alias as string. The request will delete all product groups within the specified hierarchy that are not specified in the body parameter.
[
{
"ExternalRef": "string",
"Alias": "string",
"ApiWriteObjects": [
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
]
}
]
Request
Body parameters: ProductGroupApiObject
ProductGroupApiObject | ||
---|---|---|
Property name | Type | Description |
ExternalRef | string | External reference of the product group |
Alias | string | Unique alias of the product group |
ApiWriteObjects | ApiWriteObjects | Write object for any attribute value to assign to the group |
ApiWriteObject | ||
Property name | Type | Description |
IsKey | boolean | If the value is the key for determining if there is a value that should be updated |
IsParentKey | boolean | If object is a key of a parent |
Alias | string | Alias to identify what field the value is representing |
Value | object | The value itself, the API accepts object that match the setup of the global list |
KeyHash | string |
Response status OK (200)
Return value: none
Previous
Next article