Basic information
PATCH /{shopId}/producttypes/{productTypeId}
Updates information for a single product type with partial data according to RFC 6902. You can either add or remove certain attributes.
Supported JSON-PATCH operations
- add (sets an attribute)
- remove (unsets an attribute)
Attribute paths that allow updates via PATCH
- /attribute¹
- /attributevalues²
¹ supports remove only
² Attribute will be created if it does not exist yet.
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
|
productTypeId |
string |
Required:
true
|
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-patch+json
[ { "op": "add", "path": "/attributevalues", "value": { "name": "Connectivity", "visible": true, "preDefAttribute": true, "values": [ { "value": "True Wireless", "name": "True Wireless" } ] } }, { "op": "add", "path": "/attributevalues", "value": { "name": "Usage", "values": [ { "name": "Studio recording" }, { "name": "TV" }, { "name": "Drumming" }, { "name": "Gaming" } ] } }, { "op": "remove", "path": "/attribute", "value": { "name": "Type" } } ]
Response attributes
Name | Type | Description |
---|---|---|
|
object of productType |
Response
HTTP 200
Media type application/json
{ "name": "Headphones", "productTypeId": "64180BCB-5AEF-4E69-4A92-AC150003B611", "attributes": [ { "visible": true, "name": "Connectivity", "values": [ { "value": "Bluetooth", "name": "Bluetooth" }, { "value": "Wired", "name": "Wired" }, { "value": "True Wireless", "name": "True Wireless" } ], "preDefAttribute": true }, { "visible": false, "name": "Usage", "values": [ { "value": "Studio recording", "name": "Studio recording" }, { "value": "TV", "name": "TV" } { "value": "Drumming", "name": "Drumming" }, { "value": "Gaming", "name": "Gaming" } ], "preDefAttribute": true } ], "alias": "Headphones" }