Создание списка товаров
Создает список товаров.
Пример тела запроса
--data '{
"attributes": [],
"items": [
{
"name": "pear",
"humanized": "Груша"
},
{
"name": "cherry",
"humanized": "Вишня"
},
{
"name": "apple",
"humanized": "Яблоко"
},
{
"name": "tomato",
"humanized": "Томат"
}
]
}'
Request
POST
https://api-metrika.yandex.net/cdp/api/v1/counter/{counterId}/schema/products
Path parameters
|
Name |
Description |
|
counterId |
Type: integer Идентификатор счетчика. |
Body
application/json
{
"type": "example",
"attributes": [
{
"name": "example",
"type_name": "example",
"type_group": "example",
"type_humanized": "example",
"multivalued": true,
"humanized": "example"
}
],
"items": [
{
"name": "example",
"humanized": "example"
}
]
}
|
Name |
Description |
|
attributes |
Type: Attribute[] Атрибуты списка. Min items: Max items: Example
|
|
items |
Type: ListItem[] Элементы списка. Min items: Max items: Example
|
Attribute
Описание объекта Attribute.
|
Name |
Description |
|
multivalued |
Type: boolean Определяет, может ли атрибут иметь несколько значений. |
|
name |
Type: string Идентификатор атрибута. Min length: Max length: Pattern: Example: |
|
humanized |
Type: string Название атрибута. Min length: Max length: Example: |
|
type_group |
Type: string Группа типа атрибута. Возможные значения:
Example: |
|
type_humanized |
Type: string Название типа атрибута. Example: |
|
type_name |
Type: string Идентификатор типа атрибута. Example: |
Example
{
"name": "example",
"type_name": "example",
"type_group": "example",
"type_humanized": "example",
"multivalued": true,
"humanized": "example"
}
ListItem
Описание объекта ListItem.
|
Name |
Description |
|
name |
Type: string Идентификатор элемента списка. Min length: Max length: Pattern: Example: |
|
humanized |
Type: string Название элемента списка. Min length: Max length: Example: |
Example
{
"name": "example",
"humanized": "example"
}
Responses
200 OK
OK
Body
application/json
{
"success": true
}
|
Name |
Description |
|
success |
Type: boolean Результат выполнения операции. Default: |
No longer supported, please use an alternative and newer version.