# Product groups

POST /GetProductGroupIds

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.

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

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

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

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

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

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

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

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

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.

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


© 2024 Struct - All rights reserved.