Editing product category characteristics

The method is available for all models.

If you are using an API Key token, one of the accesses in the list is required to call the method

Edits product characteristics that are specific to the category it belongs to.

Here is only what belongs to a specific category.

If you need to change the main parameters of the product (name, description, images, video, manufacturer, barcode), use the request POST businesses/{businessId}/offer-mappings/update.

To remove the characteristics that are set in the parameters with the type string, pass an empty value.

The data in the catalog is not updated instantly

It takes up to a few minutes.

, Limit: 10,000 items per minute

Request

POST

https://api.partner.market.yandex.ru/businesses/{businessId}/offer-cards/update

Path parameters

Name

Description

businessId*

Type: integer<int64>

Cabinet ID. To find out the ID, use the request GET campaigns.

ℹ️ What is a cabinet and a store on the Market?

Min value: 1

Body

application/json
{
    "offersContent": [
        {
            "offerId": "string",
            "categoryId": 0,
            "parameterValues": [
                {
                    "parameterId": 0,
                    "unitId": 0,
                    "valueId": 0,
                    "value": "string"
                }
            ]
        }
    ]
}

Name

Description

offersContent*

Type: OfferContentDTO[]

A list of products with the specified characteristics.
An item with the specified characteristics.

Min items: 1

Max items: 100

OfferContentDTO

An item with the specified characteristics.

Name

Description

categoryId*

Type: integer<int32>

The ID of the category on the Market.

When changing the category, make sure that the product characteristics and their values in the parameter parameterValues you are submitting for a new category.

You can get a list of Market categories using a request. POST categories/tree.

Min value: 1

offerId*

Type: string

Your SKU is the product identifier in your system.

SKU Usage Rules:

  • Each product must have its own SKU.

  • An already set SKU cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.

The SKU of the product can be changed in the seller's account on the Market. Read about how to do this. in the Help of the Market for sellers.

What is a SKU and how to assign it

Min length: 1

Max length: 255

Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

parameterValues*

Type: ParameterValueDTO[]

A list of characteristics with their values.

With parameterValues be sure to send categoryId — the identifier of the category on the Market to which the specified product characteristics belong.

By change pass only those characteristics whose value needs to be updated. If in categoryId you are changing the category, the values of the common characteristics for the old and new categories will remain, and you do not need to transfer them.

To delete the value of the specified characteristic, pass it on parameterId with an empty value.
The value of the characteristic.

You can specify multiple values of the same characteristic, provided that:

To do this, in parameterValues pass each value separately — multiple objects with parameters parameterId, valueId and value. Parameter parameterId it must be the same.

Min items: 1

Max items: 300

ParameterValueDTO

The value of the characteristic.

You can specify multiple values of the same characteristic, provided that:

To do this, in parameterValues pass each value separately — multiple objects with parameters parameterId, valueId and value. Parameter parameterId it must be the same.

Name

Description

parameterId*

Type: integer<int64>

The identifier of the characteristic.

Min value: 1

unitId

Type: integer<int64>

ID of the unit of measurement. If you did not pass the parameter unitId, the default unit of measurement is used.

value

Type: string

Meaning.

valueId

Type: integer<int64>

ID of the value.

Be sure to specify the identifier if you are transmitting a value from the list of acceptable values received from the Market.

Only for type characteristics ENUM.

Responses

200 OK

The request was executed correctly, and the data has been processed.

The answer 200 by itself does not mean that the transmitted values are correct.

Be sure to look at the details of the response.: status and a list of errors, if any.

Even if an error is made in the characteristics of just one product, no changes from the request will be included in the catalog.

If in status It's back ERROR, make sure that:

  • All required specifications are filled in.
  • the characteristics actually exist in the specified categories;
  • the values correspond to the characteristics;
  • your own values have the desired data type.

Fields will help you find problems. errors and warnings.

Body

application/json
{
    "status": "OK",
    "results": [
        {
            "offerId": "string",
            "errors": [
                {
                    "type": "OFFER_NOT_FOUND",
                    "parameterId": 0,
                    "message": "string"
                }
            ],
            "warnings": [
                {
                    "type": "OFFER_NOT_FOUND",
                    "parameterId": 0,
                    "message": "string"
                }
            ]
        }
    ]
}

Name

Description

results

Type: UpdateOfferContentResultDTO[]

Errors and warnings that appeared when processing the transmitted values. Each item in the list corresponds to one product.

If there are no errors or warnings, the field is not passed.
Errors and warnings that appeared due to the transmitted characteristics.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

UpdateOfferContentResultDTO

Errors and warnings that appeared due to the transmitted characteristics.

Name

Description

offerId*

Type: string

Your SKU is the product identifier in your system.

SKU Usage Rules:

  • Each product must have its own SKU.

  • An already set SKU cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.

The SKU of the product can be changed in the seller's account on the Market. Read about how to do this. in the Help of the Market for sellers.

What is a SKU and how to assign it

Min length: 1

Max length: 255

Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

errors

Type: OfferContentErrorDTO[]

Mistakes.

If there is an error for at least one product, the information in the catalog will not be updated for all transferred products.
The text of the error or warning.

Min items: 1

warnings

Type: OfferContentErrorDTO[]

Warnings.

The information in the catalog will be updated.
The text of the error or warning.

Min items: 1

ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Type

Description

ApiResponseStatusType

Enum: OK, ERROR

OfferContentErrorDTO

The text of the error or warning.

Name

Description

message*

Type: string

The text of the error or warning.

type*

Type: OfferContentErrorType

Types of errors and warnings:

  • OFFER_NOT_FOUND — there is no such product in the catalog.
  • UNKNOWN_CATEGORY — an unknown category is specified.
  • INVALID_CATEGORY — a non-leaf category is specified. Specify the one that has no child categories.
  • UNKNOWN_PARAMETER — a characteristic has been transmitted that is not among the characteristics of the category.
  • UNEXPECTED_BOOLEAN_VALUE — something else is passed instead of the boolean value.
  • NUMBER_FORMAT — a string was passed that does not represent a number, instead of a number.
  • INVALID_UNIT_ID — a unit of measurement that is unacceptable for the characteristic has been passed.
  • INVALID_GROUP_ID_LENGTH — the name exceeds the allowed character value of 255.
  • INVALID_GROUP_ID_CHARACTERS — transferred invalid characters.

You can check which category characteristics are available for a given category and get their settings using a request. POST category/{categoryId}/parameters.

Enum: OFFER_NOT_FOUND, UNKNOWN_CATEGORY, INVALID_CATEGORY, UNKNOWN_PARAMETER, UNEXPECTED_BOOLEAN_VALUE, NUMBER_FORMAT, INVALID_UNIT_ID, INVALID_GROUP_ID_LENGTH, INVALID_GROUP_ID_CHARACTERS

parameterId

Type: integer<int64>

ID of the characteristic that the error or warning is associated with.

OfferContentErrorType

Types of errors and warnings:

  • OFFER_NOT_FOUND — there is no such product in the catalog.
  • UNKNOWN_CATEGORY — an unknown category is specified.
  • INVALID_CATEGORY — a non-leaf category is specified. Specify the one that has no child categories.
  • UNKNOWN_PARAMETER — a characteristic has been transmitted that is not among the characteristics of the category.
  • UNEXPECTED_BOOLEAN_VALUE — something else is passed instead of the boolean value.
  • NUMBER_FORMAT — a string was passed that does not represent a number, instead of a number.
  • INVALID_UNIT_ID — a unit of measurement that is unacceptable for the characteristic has been passed.
  • INVALID_GROUP_ID_LENGTH — the name exceeds the allowed character value of 255.
  • INVALID_GROUP_ID_CHARACTERS — transferred invalid characters.

You can check which category characteristics are available for a given category and get their settings using a request. POST category/{categoryId}/parameters.

Type

Description

OfferContentErrorType

Enum: OFFER_NOT_FOUND, UNKNOWN_CATEGORY, INVALID_CATEGORY, UNKNOWN_PARAMETER, UNEXPECTED_BOOLEAN_VALUE, NUMBER_FORMAT, INVALID_UNIT_ID, INVALID_GROUP_ID_LENGTH, INVALID_GROUP_ID_CHARACTERS

400 Bad Request

The request contains incorrect data.

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

ApiErrorDTO

The general error format.

Name

Description

code*

Type: string

The error code.

message

Type: string

Description of the error.

401 Unauthorized

The authorization data is not specified in the request.

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

403 Forbidden

The authorization data is incorrect or access to the resource is prohibited.

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

404 Not Found

The requested resource was not found.

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

420 Method Failure

The resource access limit has been exceeded.

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

423 Locked

The specified method cannot be applied to the resource.

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

500 Internal Server Error

Internal server error.

Body

application/json
{
    "status": "OK",
    "errors": [
        {
            "code": "string",
            "message": "string"
        }
    ]
}

Name

Description

errors

Type: ApiErrorDTO[]

A list of errors.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR