Add dictionary attribute to product

How to add dictionary attribute to product using Management API

This article explains the dictionary attribute only. See main page for general information about adding product attributes. 

Add attribute to product

URL

POST https://api.bluestonepim.com/pim/products/{id}/attributes/dictionary

Request body

{
"definitionId": "{attribute id}"
}

Response

If successful, this will result in a 201 - Created response. This means the attribute has been added to the product with an empty value.

Try it in readme.io

Set values for attribute on product

Product id and dictionary attribute id is passed as parameters in the path.

URL

POST
https://api.bluestonepim.com/pim/products/{id}/attributes/dictionary/{definitionId}/values

Request body

{
   "valueIds":["5f59cf80d60180000cb8c29d","5f59cf80d60180000cb8c29c"]
}

One or more option id's must be passed in the body. See this article for how to find the dictionary option id's.

Response

If successful, this will result in a 201 - Created response. This means the attribute has been added to the product with an empty value.

Try it in readme.io