将产品添加到目录并更改有关它们的信息
方法适用于模式:FBY, FBS, Express 和 DBS.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- offers-and-cards-management — 商品和卡片管理
- all-methods — 全面管理账户
将产品添加到目录并传输:
- 他们的叶子类别 关于市场和分类特征;
- 主要特点;
- 商品在橱柜的价格。
它还结合卡上的产品,编辑和删除有关已添加产品的信息,包括机柜和产品类别中的价格。
您可以使用请求获取市场类别列表。 POST v2/categories/tree,以及按类别使用的产品特性 POST v2/category/{categoryId}/parameters.
添加新产品
使用以前从未在文件夹中使用过的新ID传输它。
请务必指定参数: offerId, name, marketCategoryId, pictures, vendor, description.
尝试一次传达尽可能多的信息 — 市场将需要它来选择合适的卡或创建一个新的。
如果您知道市场上的哪张卡对应的产品,您可以立即指定此卡的ID(SKU 在市场上)在现场 marketSKU.
对于Yandex Go市场的卖家:
将产品添加到目录时,请指定参数值 name 和 description 用俄语。 要在展柜上以不同的语言显示它们,请再次提出请求。 POST v2/businesses/{businessId}/offer-mappings/update 在哪里指定:
- 参数中的语言
language; - 参数值
name和description在指定的语言。
不需要重新传输剩余的产品特性。
更改产品信息
通过指定in发送新数据 offerId SKU 产品在您的系统中。
可以省略任何更改的字段。
删除以前传输的产品参数
在 deleteParameters 指定要删除的参数的值。 您可以一次传递多个值。
对于具有类型的参数 string 您也可以传递空值。
参数 offerId (SKU 系统中的产品)必须是 独特的 对于您转移的所有产品。
使用规则 SKU
-
对于每个产品 SKU 一定有一个。
-
已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。
SKU 产品可以在市场上的卖方帐户中更改。 阅读有关如何做到这一点。 在市场对卖家的帮助.
目录中的数据不会立即更新
最多需要几分钟。
| ⚙️ 限制: 每分钟10,000个产品,每个请求不超过100个产品 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/businesses/{businessId}/offer-mappings/update
Path parameters
|
Name |
Description |
|
businessId |
Type: integer 内阁ID。 要找到答案,请使用请求 GET v2/campaigns. Min value: |
Query parameters
|
Name |
Description |
|
language |
Type: string 接受和返回参数中的值的语言 默认值: 语言:
Enum: |
Body
application/json
{
"offerMappings": [
{
"offer": {
"offerId": "example",
"name": "Ударная дрель Makita HP1630, 710 Вт",
"marketCategoryId": 0,
"category": "example",
"pictures": [
null
],
"videos": [
null
],
"manuals": [
null
],
"vendor": "LEVENHUK",
"barcodes": [
null
],
"description": "example",
"manufacturerCountries": [
null
],
"weightDimensions": {},
"vendorCode": "VNDR-0005A",
"tags": [
null
],
"shelfLife": {},
"lifeTime": {},
"guaranteePeriod": {},
"customsCommodityCode": "8517610008",
"commodityCodes": [
null
],
"certificates": [
null
],
"boxCount": 1,
"condition": {},
"type": "DEFAULT",
"downloadable": true,
"adult": true,
"age": {},
"params": [
null
],
"parameterValues": [
null
],
"basicPrice": {},
"purchasePrice": {},
"additionalExpenses": {},
"firstVideoAsCover": true,
"deleteParameters": [
null
]
},
"mapping": {
"marketSku": 1
}
}
],
"onlyPartnerMediaContent": true
}
|
Name |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
offerMappings |
Type: object[]
需要添加或更新的产品列表。 我们将很快减少每个请求的最大产品数量. 现在不要发送超过100。 Min items: Max items: Example
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
onlyPartnerMediaContent |
Type: boolean 是否只会使用您提供的产品数据。 默认值: |
Responses
200 OK
请求已正确执行,并且数据已被处理。
回答 200 就其本身而言,它并不意味着传递的值是正确的。
请务必查看响应的详细信息。: status,以及错误列表(results.errors)和评论(results.warnings),如果有的话。
- 如果至少有一个产品返回错误(
results.errors),场status=ERROR. 不会应用对所有转移项目的更改。 - 如果没有错误,但至少有一个产品返回了注释(
results.warnings),场status=OK,并将应用更改。
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
错误和警告的类型:
UNKNOWN_CATEGORY— 指定了未知类别。INVALID_CATEGORY— 指定了非叶类别。 指定没有子类别的类别。EMPTY_MARKET_CATEGORY— 在传送类别特征时不指定市场类别。UNKNOWN_PARAMETER— 已经传输了不属于该类别特征的特征。UNEXPECTED_BOOLEAN_VALUE— 传递其他内容而不是布尔值。NUMBER_FORMAT— 传递的字符串不代表数字,而不是数字。INVALID_UNIT_ID— 特性不可接受的测量单位已经通过。INVALID_GROUP_ID_LENGTH— 名称中超出允许的字符值 — 255.INVALID_GROUP_ID_CHARACTERS— 通过无效字符.INVALID_PICKER_URL— 已传输到缩略图图像的链接,该链接不包括在传输到产品图像的链接中。LOCKED_DIMENSIONS— 包装的尺寸已转移,无法更改。INVALID_COMMODITY_CODE— 传送了不正确的产品代码。
您可以检查哪些类别特征可用于给定类别,并使用请求获取其设置。 POST v2/category/{categoryId}/parameters.
Enum:
UNKNOWN_CATEGORY,INVALID_CATEGORY,EMPTY_MARKET_CATEGORY,UNKNOWN_PARAMETER,UNEXPECTED_BOOLEAN_VALUE,NUMBER_FORMAT,INVALID_UNIT_ID,INVALID_GROUP_ID_LENGTH,INVALID_GROUP_ID_CHARACTERS,INVALID_PICKER_URL,LOCKED_DIMENSIONS,INVALID_COMMODITY_CODEparameterId
Type: integer
与错误或警告相关联的功能的ID。
错误。
如果至少有一个产品出现错误,目录中的信息将不会更新所有传输的产品。
Min items:
1Example
[ { "type": "UNKNOWN_CATEGORY", "parameterId": 0, "message": "example" } ]warnings
Type: object[]
message
Type: string
错误或警告的文本。
Example:
exampletype
Type: string
错误和警告的类型:
UNKNOWN_CATEGORY— 指定了未知类别。INVALID_CATEGORY— 指定了非叶类别。 指定没有子类别的类别。EMPTY_MARKET_CATEGORY— 在传送类别特征时不指定市场类别。UNKNOWN_PARAMETER— 已经传输了不属于该类别特征的特征。UNEXPECTED_BOOLEAN_VALUE— 传递其他内容而不是布尔值。NUMBER_FORMAT— 传递的字符串不代表数字,而不是数字。INVALID_UNIT_ID— 特性不可接受的测量单位已经通过。INVALID_GROUP_ID_LENGTH— 名称中超出允许的字符值 — 255.INVALID_GROUP_ID_CHARACTERS— 通过无效字符.INVALID_PICKER_URL— 已传输到缩略图图像的链接,该链接不包括在传输到产品图像的链接中。LOCKED_DIMENSIONS— 包装的尺寸已转移,无法更改。INVALID_COMMODITY_CODE— 传送了不正确的产品代码。
您可以检查哪些类别特征可用于给定类别,并使用请求获取其设置。 POST v2/category/{categoryId}/parameters.
Enum:
UNKNOWN_CATEGORY,INVALID_CATEGORY,EMPTY_MARKET_CATEGORY,UNKNOWN_PARAMETER,UNEXPECTED_BOOLEAN_VALUE,NUMBER_FORMAT,INVALID_UNIT_ID,INVALID_GROUP_ID_LENGTH,INVALID_GROUP_ID_CHARACTERS,INVALID_PICKER_URL,LOCKED_DIMENSIONS,INVALID_COMMODITY_CODEparameterId
Type: integer
与错误或警告相关联的功能的ID。
警告。
目录中的信息将被更新。
Min items:
1Example
[ { "type": "UNKNOWN_CATEGORY", "parameterId": 0, "message": "example" } ]处理特征列表时出现的错误和警告。 列表中的每个项目对应一个产品。
如果没有错误或警告,则不传递该字段。
Min items:
1Example
[ { "offerId": "example", "errors": [ { "type": "UNKNOWN_CATEGORY", "parameterId": 0, "message": "example" } ], "warnings": [ { "type": "UNKNOWN_CATEGORY", "parameterId": 0, "message": "example" } ] } ]Example
{ "results": [ { "offerId": "example", "errors": [ { "type": "UNKNOWN_CATEGORY", "parameterId": 0, "message": "example" } ], "warnings": [ { "type": "UNKNOWN_CATEGORY", "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.
什么是GTIN?
[医]GTIN — 这是在单个国际数据库中分配给产品的唯一编号。 GS1. 此编号生成EAN、UPC或ISBN条形码。
如何确保产品在数据库中
你可以在 验证页面 在GS1协会的网站上。 如果未找到产品,请向供应商索取GTIN代码。
如何为您的产品获取GTIN
要接收GTIN代码,制造商需要加入GS1协会并注册产品。
ASCII字符0到31(9除外)和127被禁止。 从表.
没有孩子的类别。
