编辑产品类别特征
方法适用于模式:FBY, FBS, Express 和 DBS.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- offers-and-cards-management — 商品和卡片管理
- all-methods — 全面管理账户
编辑特定于其所属类别的产品特征。
这里只是属于特定类别的内容。
如果您需要更改产品的主要参数(名称,描述,图像,视频,制造商,条形码),请使用请求 POST v2/businesses/{businessId}/offer-mappings/update.
若要删除类型的参数中设置的特征 string,传递一个空值。
目录中的数据不会立即更新
最多需要几分钟。
| ⚙️ 限制: 每分钟10,000件物品 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/businesses/{businessId}/offer-cards/update
Path parameters
|
Name |
Description |
|
businessId |
Type: integer 内阁ID。 要找到答案,请使用请求 GET v2/campaigns. Min value: |
Body
application/json
{
"offersContent": [
{
"offerId": "example",
"categoryId": 0,
"parameterValues": [
{
"parameterId": 1,
"unitId": 0,
"valueId": 0,
"value": "example"
}
]
}
]
}
|
Name |
Description |
||||||||||||||
|
offersContent |
Type: object[]
具有指定特性的产品列表。 Min items: Max items: Example
|
Responses
200 OK
请求已正确执行,并且数据已被处理。
回答 200 就其本身而言,它并不意味着传递的值是正确的。
请务必查看响应的详细信息。: status,以及错误列表(results.errors)和评论(results.warnings),如果有的话。
- 如果至少有一个产品返回错误(
results.errors),场status=ERROR. 不会应用对所有转移项目的更改。 - 如果没有错误,但至少有一个产品返回了注释(
results.warnings),场status=OK,并将应用更改。
如果在 status 回来了 ERROR,确保:
- 所有要求的规格都填写完毕。
- 特征实际存在于指定的类别中;
- 值对应于特征;
- 您自己的值具有所需的数据类型。
字段将帮助您发现问题 errors 和 warnings.
Body
application/json
{
"status": "OK",
"results": [
{
"offerId": "example",
"errors": [
{}
],
"warnings": [
{}
]
}
]
}
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
results
Type: object[]
offerId
Type: string
你的 SKU — 系统中的产品ID。
使用规则 SKU:
-
对于每个产品 SKU 一定有一个。
-
已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。
SKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 在市场对卖家的帮助.
重要
值开头和结尾的空格会自动删除。 例如,
" SKU123 "和"SKU123"它们将被视为相同的值。Min length:
1Max length:
255Pattern:
^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$Example:
exampleerrors
Type: object[]
message
Type: string
错误或警告的文本。
Example:
exampletype
Type: string
错误和警告的类型:
OFFER_NOT_FOUND— 目录中没有这样的产品。UNKNOWN_CATEGORY— 指定了未知类别。INVALID_CATEGORY— 指定了非叶类别。 指定没有子类别的类别。UNKNOWN_PARAMETER— 已经传输了不属于该类别特征的特征。UNEXPECTED_BOOLEAN_VALUE— 传递其他内容而不是布尔值。NUMBER_FORMAT— 传递的字符串不代表数字,而不是数字。INVALID_UNIT_ID— 特性不可接受的测量单位已经通过。INVALID_GROUP_ID_LENGTH— 名称中超出允许的字符值 — 255.INVALID_GROUP_ID_CHARACTERS— 通过无效字符.
您可以检查哪些类别特征可用于给定类别,并使用请求获取其设置。 POST v2/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_CHARACTERSparameterId
Type: integer
与错误或警告相关联的功能的ID。
错误。
如果至少有一个产品出现错误,目录中的信息将不会更新所有传输的产品。
Min items:
1Example
[ { "type": "OFFER_NOT_FOUND", "parameterId": 0, "message": "example" } ]warnings
Type: object[]
message
Type: string
错误或警告的文本。
Example:
exampletype
Type: string
错误和警告的类型:
OFFER_NOT_FOUND— 目录中没有这样的产品。UNKNOWN_CATEGORY— 指定了未知类别。INVALID_CATEGORY— 指定了非叶类别。 指定没有子类别的类别。UNKNOWN_PARAMETER— 已经传输了不属于该类别特征的特征。UNEXPECTED_BOOLEAN_VALUE— 传递其他内容而不是布尔值。NUMBER_FORMAT— 传递的字符串不代表数字,而不是数字。INVALID_UNIT_ID— 特性不可接受的测量单位已经通过。INVALID_GROUP_ID_LENGTH— 名称中超出允许的字符值 — 255.INVALID_GROUP_ID_CHARACTERS— 通过无效字符.
您可以检查哪些类别特征可用于给定类别,并使用请求获取其设置。 POST v2/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_CHARACTERSparameterId
Type: integer
与错误或警告相关联的功能的ID。
警告。
目录中的信息将被更新。
Min items:
1Example
[ { "type": "OFFER_NOT_FOUND", "parameterId": 0, "message": "example" } ]处理传输值时出现的错误和警告。 列表中的每个项目对应一个产品。
如果没有错误或警告,则不传递该字段。
Min items:
1Example
[ { "offerId": "example", "errors": [ { "type": "OFFER_NOT_FOUND", "parameterId": 0, "message": "example" } ], "warnings": [ { "type": "OFFER_NOT_FOUND", "parameterId": 0, "message": "example" } ] } ]Example
{ "results": [ { "offerId": "example", "errors": [ { "type": "OFFER_NOT_FOUND", "parameterId": 0, "message": "example" } ], "warnings": [ { "type": "OFFER_NOT_FOUND", "parameterId": 0, "message": "example" } ] } ] } -
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
404 Not Found
找不到请求的资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
423 Locked
指定的方法不能应用于资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
500 Internal Server Error
Yandex中的内部错误。 市场。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
Enum:
OK,ERROR服务器响应的标准包装器。
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
的错误代码。
Example:
examplemessage
Type: string
错误的描述。
Example:
example错误列表。
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
服务器错误的标准包装器。
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
No longer supported, please use an alternative and newer version.
ASCII字符0到31(9除外)和127被禁止。 从表.