/Products Get attributes ID

Hi,
We are going to use you API of integrating product from Treo PIM to SFCC.
We use GET /Products interface to retrieve product and in the response body for configurable products there is an array with attributes and ID for global channel and custom attributes array for SFCC channel.
“attributes”: [
{
“id”: “5d5b47c4ad1999e78”,
“value”: “Size B (B)”
},
{
“id”: “5d5b47c4b4bf5e437”,
“value”: “Standard-Height Range (2)”
},
{
“id”: “5d5b47c4a3ae2bd61”,
“value”: “Tilt Limiter & Seat Angle (3)”
},
{
“id”: “5d5b47c48c81cde88”,
“value”: “Fully Adjustable Arms (D)”
},
{
“id”: “5d5b4bb7a4f6eb0e6”,
“value”: “Non-Upholstered Arms (W)”
},
{
“id”: “5d5b47c45a115760e”,
“value”: “Adjustable PostureFit SL (ZB)”
},
{
“id”: “5d5b47c46da7633ff”,
“value”: “Graphite (G1)”
},
{
“id”: “5d5b47c466168b8f1”,
“value”: “Graphite (G1)”
},
{
“id”: “5d5b47c47dad71990”,
“value”: “Graphite (G1)”
},
{
“id”: “5d5b47c4852093b26”,
“value”: “2½” Hard Caster, Carpet (BB)"
},
{
“id”: “5d5b47c4757914e12”,
“value”: “Black (BK)”
},
{
“id”: “5d5b47c49470aa49b”,
“value”: “Graphite (23103)”
}
],
“customFields”: [
“mpn”,
“externalId”
],
“customAttributes”: [
“5d5b6c492dc419869”,
“5d5b6c4927f5f9933”,
“5d5b6c4921fb88269”,
“5d5b6c491c935e2c7”,
“5d5b6c4916d0f8890”,
“5d89c3e05fc246cfe”,
“5d89c3e0591e16f2c”,
“5d89c3e056ce49f5c”,
“5d89c3e0556196627”,
“5d89c3e0468d65284”
],

We found out that IDs in the response are not actual attribute IDs but ID of records with attribute value for the respective product and to get the ID and value we have to make one extra call for every such attribute GET /ProductAttributeValue to create the right attribute ID and generate variation product in SFCC.

Is more understanding is right?
Maybe your API provides easier way to handle with our issue?

Hi DmitryP,

You can send GET request to /api/v1/ProductAttributeValue and specify ID of attribute values as parameters, so that you get the ID of attributes in the answer.

For example:

where[0][type]: in
where[0][attribute]: id
where[0][value][]: attributeID1
where[0][value][]: attributeID2

Thanks, for the answer.
Could you please tell me how we can request several attribute values in one api/v1/ProductAttributeValue request. I’ve tried /api/v1/ProductAttributeValue?id=5d5b6c48d3984449c,5d5b47c45a115760e where
5d5b6c48d3984449c,5d5b47c45a115760e are product ids but it returns all the values not filtered by these ids.

This is the request:

/api/v1/ProductAttributeValue?select=attributeId&maxSize=20&offset=0&sortBy=id&asc=&where%5B0%5D%5Btype%5D=in&where%5B0%5D%5Battribute%5D=id&where%5B0%5D%5Bvalue%5D%5B%5D=5d93185c700f8a292&where%5B0%5D%5Bvalue%5D%5B%5D=5d92f6a2637598b36

Thanks for the answer. But in the response we get:
“total”: 5,
“list”: [
{
“id”: “5d89c3e05fc246cfe”,
“isCustom”: true,
“attributeType”: “enum”,
“attributeId”: “5d5b56b62b0f15e3f”,
“createdById”: “1”,
“assignedUserId”: “1”
While the /api/v1/ProductAttributeValue/5d89c3e0556196627 returns next:
{
“id”: “5d89c3e0556196627”,
“name”: null,
“deleted”: false,
“isRequired”: false,
“value”: “Graphite”,
“data”: null,
“scope”: “Channel”,
“isCustom”: false,
“attributeType”: “enum”,
“createdAt”: “2019-09-24 07:21:04”,
“modifiedAt”: “2019-09-24 09:55:01”,
“productId”: “5d5b6c48d3984449c”,
“productName”: “Aeron Chair Remastered, Knockdown (AER2), Size B (B), Standard-Height Range (2), Tilt Limiter & Seat Angle (3), Fully Adjustable Arms (D), Non-Upholstered Arms (W), Adjustable PostureFit SL (ZB), Graphite (G1), Graphite (G1), Graphite (G1), 2½” Hard Caster, Carpet (BB), Black (BK), Graphite (23103)",
“attributeId”: “5d5b5718d77761064”,
“attributeName”: “Base”,
“productFamilyAttributeId”: “5d89c3e03d7d79904”,
“productFamilyAttributeName”: null,
“channelsIds”: [
“5d5b2b02d97292a1f”
],
“channelsNames”: {
“5d5b2b02d97292a1f”: “Commerce Cloud”
},
“createdById”: “1”,
“createdByName”: “Admin”,
“modifiedById”: “1”,
“modifiedByName”: “Admin”,
“ownerUserId”: “1”,
“ownerUserName”: “Admin”,
“assignedUserId”: “1”,
“assignedUserName”: “Admin”,
“teamsIds”: [],
“teamsNames”: {},
“parentConfigurableId”: “5d89c3e04c689a9b9”,
“parentConfigurableName”: null,
“typeValue”: [
“Graphite”,
“Satin Carbon”,
“Mineral”,
“Polished Aluminum”
]
}

Is it possible to get all these fields as per /ProductAttributeValue/5d89c3e0556196627 but for several entities in one request?

Yes, it is possible. Delete the parameter “select” in your request or add the names of needed fields there.