# Products

The Filter parameter is used when querying for products.

This property allows for easily achieved specific product lookups. It's possible to use the filter property on any attribute on the products.

A FilterPair always consists of a "FieldAlias"(string) that defines what PIM attribute should be used for filtering and a "FilterValue"(string) defining what value should be filtered on.

In Addition the API comes with several system attributes that are usable through the filter. These are listed below:

  • PIM.IsArchived
  • PIM.ArchiveReason
  • PIM.ProductConfiguration
  • PIM.DefiningAttributeStatus
  • PIM.ExternalRef
  • PIM.ItemId
  • PIM.Name_ + language Id
  • PIM.NumVariants
  • PIM.PrimaryProductGroup
  • PIM.ProductGroupId
  • PIM.ProductGroupCount
  • PIM.ProductGroupPlacements
  • PIM.HierarchyPlacement. + hierarchy Id
  • PIM.HierarchyPlacementNum. + hierarchy Id
  • PIM.ProductType
  • PIM.VariantProductId

POST /GetProductIds

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
ProductIds int[] Array of productIds

POST /GetUpdatedProductIds

This endpoint return all product ids of products that were updated within a specified query.

Request

Body parameters: UpdatedIdsRequestModel
UpdatedIdsRequestModel
Property name Type Description
Since DateTimeOffset DateTime string with offset included
Filter Filter Filter for querying specific products
ConsiderFields string[] Alias of specific fields to be checked to determine if products had been updated (optional)
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: UpdatedProductsDTO
UpdatedProductsDTO
Property name Type Description
SystemTime DateTimeOffset Displays the system time for the time of the request
ProductIds int[] Array of product ids

GET /GetProductIdsByProductGroupId

Request

Query parameters:
Property name Type Description
id int Id of chosen product group

Response status OK (200)

Return value: none
Property name Type Description
ProductIds int[] Array of productIds

POST /GetProductIdsByProductGroupIds

This endpoint enables product lookup in multiple product groups.

Request

Body parameters: IdsRequestModel
Property name Type Description
Ids int[] Array of product group ids

Response status OK (200)

Return value: ProductidsByProductGroupId[]
ProductidsByProductGroupId
Property name Type Description
ProductGroupId int Id of the productGroup
ProductIds int[] Ids of the products contained in the product group

POST /GetProducts

This endpoint returns product data based on product ids. In addition it's possible to specify exactly which attributes to return and if they should be returned as rendered values.

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
IncludeRenderedSpecificationValues boolean If rendered specification values for specified attributes should be returned
UnfoldRenditionOfAttributesWithAliases string[]
UnfoldRenditionOfSpecificationAttributesWithAliases string[]

Response status OK (200)

Return value: ProductResult
ProductResult
Property name Type Description
Products ProductDTO[] Array of products including metadata and values depending on request
Attributes Attributes Object of all relevant attributes as object
ProductDTO
Property name Type Description
Id int unique id of product
ConfigurationAlias string Alias of the products product configuration
ProductTypeAlias string Alias of the products product type
ExternalRef string External reference for the product
Name string Localized name for the product
Created DateTimeOffset Datetime string including offset of when the product was created
LastModified DateTimeOffset Datetime string including offset of when the product was last modified
PrimaryGroupId int
ProductGroupIds int[]
ProductGroupSortings KeyValuePair If product groups are sorted, their sorting will be listed with group id as key and sort number as value
Values AttributeValue[] Array of different attribute values from the product
SpecificationAttributes AttributeValue[] Array of different specification attribute values from the product
RenderedSpecificationValues RenderedAttributeValue[] See Attribute section for more info
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 /GetInternalProductIdToExternalRefMap

Request

Body parameters: ExternalRefListModel
ExternalRefListModel
Property name Type Description
ExternalRefs string[]

Response status OK (200)

Return value: InternalProductIdToExternalRefMap
InternalProductIdToExternalRefMap
Property name Type Description
Key string External reference of product is given as key
Value int Product id is given as value

POST /GetConfigurationAliasByProductExternalRef

Request

Body parameters: ExternalRefListModel
ExternalRefListModel
Property name Type Description
ExternalRefs string[]

Response status OK (200)

Return value: ConfigurationAliasByProductExternalRef

POST /CreateOrUpdateProducts

Request

Body parameters: ProductApiObject[]
Product
Property name Type Description
ExternalRef string External reference for the product
AttributeValues ApiWriteObject[] Array of attribute values to create or update including meta data of the values
SpecificationAttributeValues ApiWriteObject[] Array of specification attribute values to create or update including meta data of the values
DeleteNonPresentProductGroupsWithRefKey boolean
ConfigurationAlias string Alias of products configuration
ProductTypeAlias string Alias of products type
RefKey string Sets a reference string to show which references was made during the this endpoint call
ProductGroups InlineModel[] Array of product groups as objects
PrimaryProductGroup ApiWriteObject Array of product groups as objects
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 /DeleteProducts

Request

Body parameters: ApiWriteObject[]
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.