在目录中添加和编辑产品
方法适用于所有模式.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- offers-and-cards-management — 商品和卡片管理
- all-methods — 全面管理账户
我应该使用哪种方法而不是过时的方法?
将请求中指定的产品添加到产品目录并编辑现有产品。
有关产品的信息必须在体内传递 POST-请求。
每个产品必须有您的 SKU — 用于识别产品的唯一代码:
- 要向目录中添加新产品,请在参数中指定
shopSku你的 SKU,这是尚未在目录中。 - 若要编辑目录中的项,请在参数中指定
shopSku你的 SKU 这种产品在目录中.
在这两种情况下,您都需要在请求中提供完整的产品描述,即使您只想更改一些特征。
如果您知道市场上的哪种产品卡对应于您的产品,请指定其ID(SKU 在市场上)在输入参数 mapping. 接收 SKU 您可以通过您的帐户访问市场上的推荐产品卡。 如果 SKU 它没有上市,市场工作人员会自己选择或创建一个合适的产品卡,或者它会有一个地位 NEED_CONTENT (您需要找到卡或自己创建它)在请求输出中 POST v2/businesses/{businessId}/offer-mappings.
产品在出版前经过审核. 如果在其中一个已发送的项目中发现错误,则对请求的响应将具有HTTP代码。 400 Bad Request,并且没有任何产品将提交审核。 但是,如果您没有传递任何产品的所有必需参数,它将具有审核后的状态。 NEED_INFO (产品描述中没有足够的信息)在请求输出中 POST v2/businesses/{businessId}/offer-mappings.
每个请求最多可以添加500个产品。
目录中的数据不会立即更新
最多需要几分钟。
| ⚙️ 限制: 每分钟5,000件物品 |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/offer-mapping-entries/updates
Path parameters
|
Name |
Description |
|
campaignId* |
Type: integer<int64> 活动ID。 您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到 — 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:
⚠️ 不要发送商店ID,这是在市场上的卖家帐户旁边的商店名称和一些报告。
Min value: |
Body
application/json
{
"offerMappingEntries": [
{
"offer": {
"name": "Ударная дрель Makita HP1630, 710 Вт",
"shopSku": "string",
"category": "string",
"vendor": "LEVENHUK",
"vendorCode": "VNDR-0005A",
"description": "string",
"id": "string",
"feedId": 0,
"barcodes": [
"46012300000000"
],
"urls": [
"string"
],
"pictures": [
"string"
],
"manufacturer": "string",
"manufacturerCountries": [
"string"
],
"minShipment": 0,
"transportUnitSize": 0,
"quantumOfSupply": 0,
"deliveryDurationDays": 0,
"boxCount": 0,
"customsCommodityCodes": [
"string"
],
"weightDimensions": {
"length": 65.55,
"width": 50.7,
"height": 20,
"weight": 1.001
},
"supplyScheduleDays": [
"MONDAY"
],
"shelfLifeDays": 0,
"lifeTimeDays": 0,
"guaranteePeriodDays": 0,
"processingState": {
"status": "UNKNOWN",
"notes": [
{
"type": "ASSORTMENT",
"payload": "string"
}
]
},
"availability": "ACTIVE",
"shelfLife": {
"timePeriod": 0,
"timeUnit": "HOUR",
"comment": "string"
},
"lifeTime": {
"timePeriod": 0,
"timeUnit": "HOUR",
"comment": "string"
},
"guaranteePeriod": {
"timePeriod": 0,
"timeUnit": "HOUR",
"comment": "string"
},
"certificate": "string"
},
"mapping": {
"marketSku": 0,
"modelId": 0,
"categoryId": 0
},
"awaitingModerationMapping": {
"marketSku": 0,
"modelId": 0,
"categoryId": 0
},
"rejectedMapping": {
"marketSku": 0,
"modelId": 0,
"categoryId": 0
}
}
]
}
|
Name |
Description |
|
offerMappingEntries* |
Type: object[] 目录中有关产品的信息。 Min items: Max items: |
Responses
200 OK
操作的状态。
Body
application/json
{
"status": "OK"
}
|
Name |
Description |
|
status* |
Type: string 响应的类型。 可能的值:
Enum: |
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
404 Not Found
找不到请求的资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
423 Locked
指定的方法不能应用于资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
500 Internal Server Error
市场的内部错误。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: object[] 错误列表。 Min items: |
|
status |
Type: string 响应的类型。 可能的值:
Enum: |
No longer supported, please use an alternative and newer version.
什么是GTIN?
[医]GTIN — 这是在单个国际数据库中分配给产品的唯一编号。 GS1. 此编号生成EAN、UPC或ISBN条形码。
如何确保产品在数据库中
你可以在 验证页面 在GS1协会的网站上。 如果未找到产品,请向供应商索取GTIN代码。
如何为您的产品获取GTIN
要接收GTIN代码,制造商需要加入GS1协会并注册产品。