# 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
{
"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 |
---|---|---|
ProductIds | int[] | Array of productIds |
POST /GetUpdatedProductIds
This endpoint return all product ids of products that were updated within a specified query.
{
"Since": "2020-01-08T10:15:56.935Z",
"SearchOption": 0,
"Filter": {
"FilterPairs": [
{
"FieldAlias": "string",
"FilterValue": "string"
}
]
},
"ConsiderFields": [
"string"
]
}
{
"SystemTime": "2020-01-08T11:33:42.172857+01:00",
"ProductIds": [
0,
1,
2
]
}
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
[
0,
1,
2
]
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.
{
"Ids": [
0,
1
]
}
{
"21743": [
68065,
68083,
68233,
68258,
68261,
68264,
68266,
68285,
68286,
68287,
68288
]
}
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.
{
"Ids": [
0
],
"AttributeAliases": [
"string"
],
"SpecificationAttributeAliases": [
"string"
],
"IncludeRenderedValues": true,
"IncludeRenderedSpecificationValues": true,
"UnfoldRenditionOfAttributesWithAliases": [
"string"
],
"UnfoldRenditionOfSpecificationAttributesWithAliases": [
"string"
]
}
{
"Products": [
{
"Id": 0,
"ConfigurationAlias": "String",
"ProductTypeAlias": "String",
"ExternalRef": "00000000",
"Name": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": "String"
},
{
"LanguageId": 2,
"LocalizedVal": "String"
}
]
},
"Created": "2017-02-10T10:21:59.848468+01:00",
"LastModified": "2019-09-26T19:27:15.0708657+02:00",
"PrimaryGroupId": 23329,
"ProductGroupIds": [
21762,
23329,
23785,
25592
],
"ProductGroupSortings": {
"23329": 2
},
"Values": {
"NameOfAttribute": {
"Uid": "2d180ab1-9391-4d3f-b988-401b18520d25",
"AttributeUid": "9e259a33-24aa-4c2a-8b63-3339a9972d59",
"AttributeValueType": "BooleanAttributeValue",
"IsTrue": false,
"IsLocalized": false,
"AttributeAlias": "String"
}
},
"SpecificationAttributes": {
"NameOfAttribute": {
"Uid": "8b53edd6-3cdd-4f4f-8ab8-00cc2bb43ec9",
"AttributeUid": "955564d9-3ddf-4472-bc0a-3c445ff438bb",
"AttributeValueType": "NumberAttributeValue",
"X": 0,
"IsLocalized": false,
"AttributeAlias": "String"
}
},
"RenderedSpecificationValues": {
"NameOfAttribute": {
"Value": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": {
"Value": "0",
"Unit": "String"
}
},
{
"LanguageId": 2,
"LocalizedVal": {
"Value": "0",
"Unit": "String"
}
}
]
}
}
},
"RenderedValues": {
"NameOfAttribute": {
"Value": {
"LocalizedValues": [
{
"LanguageId": 1,
"LocalizedVal": {
"Value": "False"
}
},
{
"LanguageId": 2,
"LocalizedVal": {
"Value": "False"
}
}
]
}
}
}
}
],
"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 |
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
{
"ExternalRefs": [
"string"
]
}
[
{
"Key": "00000000000000",
"Value": 00000
}
]
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
{
"ExternalRefs": [
"string"
]
}
{
"0000000000000": "Configuration alias"
}
Request
Body parameters: ExternalRefListModel
ExternalRefListModel | ||
---|---|---|
Property name | Type | Description |
ExternalRefs | string[] |
Response status OK (200)
Return value: ConfigurationAliasByProductExternalRef
POST /CreateOrUpdateProducts
[
{
"ExternalRef": "string",
"AttributeValues": [
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
],
"SpecificationAttributeValues": [
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
],
"DeleteNonPresentProductGroupsWithRefKey": true,
"ConfigurationAlias": "string",
"ProductTypeAlias": "string",
"RefKey": "string",
"ProductGroups": [
[
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
]
],
"PrimaryProductGroup": [
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
]
}
]
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
[
{
"IsKey": true,
"IsParentKey": true,
"Alias": "string",
"Value": {},
"KeyHash": "string"
}
]
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 |