Basic information
PATCH /{shopId}/products/{productId}/custom-attributes
Updates information on the custom attributes for a single product with partial data according to RFC 6902. You can either add or remove assignments.
Supported JSON-PATCH operations
- add (sets or replaces an attribute value)
- remove (unsets an attribute)
Authorisation
OAuth 2.0 Token required with scopes:
products_write
URI parameters
Name | Type | Description |
---|---|---|
shopId |
string |
The unique identifier of the shop. Required:
true
Example:
DemoShop
|
productId |
string |
The unique identifier of the product. Required:
true
Example:
52F221E0-36F6-DC4E-384A-AC1504050C04
|
Query parameters
Name | Type | Description |
---|---|---|
locale |
string |
Represents the language code according to ISO 639-1 and the country code according to ISO 3166-1. If not provided, the shop’s default language is used. We recommend to always send this parameter with your request. If the default language had been changed in the administration, it might take up to 1 day until this change affects the shop. Required:
false
Example:
en_US
|
Request attributes
Name | Type | Description |
---|---|---|
|
array of jsonPatch |
Request body
Media type application/json
[ { "op": "add", "path": "/", "value": { "key": "Color", "displayValue": "red" } }, { "op": "remove", "path": "/", "value": { "key": "Additional information" } } ]
Response attributes
Name | Type | Description |
---|---|---|
items |
array of customAttribute |
Information related to a product that can be assigned to describe it in more detail. This information can have a specific type, e.g. a decimal number, and can be set to be visible in the administration area of the shop so that it is displayed with the product. It can also be specified as an additional filter criterion in the shop. |
Response
HTTP 200
Media type application/json
{ "items": [ { "displayKey": "Additional information", "singleValue": true, "values": [ { "displayValue": "", "value": null } ], "type": "string", "key": "Additional information" }, { "displayKey": "Color", "singleValue": true, "values": [ { "displayValue": "red", "value": "red" } ], "type": "string", "key": "Color" } ] }