Create product type

Create a new product type in an Ecwid store.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Request body

A JSON object of type 'ProductClass' with the following fields:

ProductClass

FieldTypeDescription
namestringProduct type name. Ecwid will try to find a Google taxonomy that matches the name you submit here. If it finds, the taxonomy will be assigned to the new type.
attributesArray<Attribute>Product type attributes

Attribute

FieldTypeDescription
namestringAttribute title
nameTranslated<Translations>Available translations for product attribute name
typestringAttribute type. There are user-defined attributes, general attributes and special 'price per unit' attributes. The 'type' field contains one of the following: CUSTOM, UPC, BRAND, GENDER, AGE_GROUP, COLOR, SIZE, PRICE_PER_UNIT, UNITS_IN_PRODUCT
showstringDefines if an attribute is visible on a product page. Supported values: NOTSHOW, DESCR, PRICE. The value PRICE = DESCR.

Response

A JSON object of type 'CreateStatus' with the following fields:

CreateStatus

FieldTypeDescription
idnumberThe internal ID of the just created product type

Errors

In case of error, Ecwid responds with an error HTTP status code and, optionally, a JSON-formatted body containing error description.

HTTP codes

HTTP StatusResponse JSONDescription
400Request parameters are malformed
409The type/class with the given name already exists
415Unsupported content-type: expected application/json or text/json
500The request failed because of an error on the server

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language