Creating a product list

Creates a product list.

Sample request body
--data '{
        "attributes": [],
        "items": [
            {
                "name": "pear",
                "humanized": "Pear"
            },
            {
                "name": "cherry",
                "humanized": "Cherry"
            },
            {
                "name": "apple",
                "humanized": "Apple"
            },
            {
                "name": "tomato",
                "humanized": "Tomato"
            }
        ]
    }'

Request

POST

https://api-metrica.yandex.net/cdp/api/v1/counter/{counterId}/schema/products

Path parameters

Name

Description

counterId*

Type: integer<int32>

Counter ID.
Example: 2215573

Body

application/json
{
    "attributes": [
        {
            "name": "string",
            "type_name": "string",
            "type_group": "string",
            "type_humanized": "string",
            "multivalued": false,
            "humanized": "string"
        }
    ],
    "items": [
        {
            "name": "string",
            "humanized": "string"
        }
    ]
}

Name

Description

attributes*

Type: Attribute[]

List attributes.
Description of the Attribute object.

Min items: 0

Max items: 160000

items

Type: ListItem[]

List items.
Description of the ListItem object.

Min items: 0

Max items: 160000

Attribute

Description of the Attribute object.

Name

Description

multivalued*

Type: boolean

Determines whether the attribute can have multiple values.

name*

Type: string

Attribute ID.

Min length: 1

Max length: 255

Pattern: ^[\w-:]+$

humanized

Type: string

Attribute name.

Min length: 0

Max length: 4096

type_group

Type: string

Attribute type group. Possible values:

  • PREDEFINED: Scalar attribute type. Examples of type_name values: numeric, date, datetime, email, and text.
  • CUSTOM_LIST: Arbitrary attribute type.
  • SYSTEM_LIST: Product list, type_name: product.

type_humanized

Type: string

Attribute type name.

type_name

Type: string

Attribute type ID.

ListItem

Description of the ListItem object.

Name

Description

name*

Type: string

List item ID.

Min length: 1

Max length: 255

Pattern: ^[\w-:]+$

humanized

Type: string

List item name.

Min length: 0

Max length: 4096

Responses

200 OK

OK

Body

application/json
{
    "success": true
}

Name

Description

success

Type: boolean

Result of performing the action.

Default: true