Basic information
POST /{shopId}/producttypes
Creates a product type.
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
|
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 |
---|---|---|
|
object of productType (create request) |
Request body
Media type application/json
{ "name": "Headphones", "attributes": [ { "visible": true, "name": "Connectivity", "values": [ { "value": "Bluetooth", "name": "Bluetooth" }, { "value": "Wired", "name": "Wired" } ], "preDefAttribute": true }, { "visible": false, "name": "Type", "values": [ { "value": "In-ear", "name": "In-ear" }, { "value": "On-ear", "name": "On-ear" }, { "value": "Over-ear", "name": "Over-ear" } ] } ], "alias": "Headphones" }
Response attributes
Name | Type | Description |
---|---|---|
|
object of productType |
Response
HTTP 201
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" } ], "preDefAttribute": true }, { "visible": false, "name": "Type", "values": [ { "value": "In-ear", "name": "In-ear" }, { "value": "On-ear", "name": "On-ear" } ], "preDefAttribute": true } ], "alias": "Headphones" }