在促销活动中添加产品或更改其价格

方法适用于所有模式.

目前不适用于卖家Market Yandex Go.

如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一

将产品添加到促销或更改参与促销的产品的价格。

这些变化在4-6小时内开始生效。 要确定它们是否已应用,请使用参数 processing 在方法的响应 POST v2/businesses/{businessId}/promos.

⚙️ 限制: 每小时10,000次请求

Request

POST

https://api.partner.market.yandex.ru/v2/businesses/{businessId}/promos/offers/update

Path parameters

Name

Description

businessId

Type: integer

内阁ID。 要找到答案,请使用请求 GET v2/campaigns.

ℹ️ 什么是市场上的橱柜和商店?

Min value: 1

Body

application/json
{
  "promoId": "example",
  "offers": [
    {
      "offerId": "example",
      "params": {
        "discountParams": {
          "price": 1,
          "promoPrice": 1
        }
      }
    }
  ]
}

Name

Description

offers

Type: object[]

offerId

Type: string

你的 SKU — 系统中的产品ID。

使用规则 SKU:

  • 对于每个产品 SKU 一定有一个。

  • 已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。

SKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 在市场对卖家的帮助.

重要

值开头和结尾的空格会自动删除。 例如, " SKU123 ""SKU123" 它们将被视为相同的值。

什么是 SKU 以及如何分配它

Min length: 1

Max length: 255

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

Example: example

params

Type: object

discountParams

Type: object

price

Type: integer

划掉的价格 — 促销前产品销售的价格。

以卢布表示。

数字必须是整数。

Min value: 1

promoPrice

Type: integer

股票价格 — 你想卖产品的那个。

以卢布表示。

数字必须是整数。

Min value: 1

促销中的产品参数与类型 DIRECT_DISCOUNTBLUE_FLASH.

具有这些类型的股票的必需参数。

Example
{
  "price": 1,
  "promoPrice": 1
}

参与促销的产品的参数。

Example
{
  "discountParams": {
    "price": 1,
    "promoPrice": 1
  }
}

需要添加到促销或其价格需要更改的产品。

Min items: 1

Max items: 500

Example
[
  {
    "offerId": "example",
    "params": {
      "discountParams": {
        "price": 1,
        "promoPrice": 1
      }
    }
  }
]

promoId

Type: string

促销的ID。

Example: example

Responses

200 OK

将产品添加到促销或更新其价格的结果。

Body

application/json
{
  "status": "OK",
  "result": {
    "rejectedOffers": [
      {
        "offerId": "example",
        "reason": "OFFER_DOES_NOT_EXIST"
      }
    ],
    "warningOffers": [
      {
        "offerId": "example",
        "warnings": [
          null
        ]
      }
    ]
  }
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    响应的类型。 可能的值:

    • OK — 没有错误。
    • ERROR — 处理请求时出错。

    Enum: OK, ERROR

    服务器响应的标准包装器。

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    result

    Type: object

    rejectedOffers

    Type: object[]

    offerId

    Type: string

    你的 SKU — 系统中的产品ID。

    使用规则 SKU:

    • 对于每个产品 SKU 一定有一个。

    • 已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。

    SKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 在市场对卖家的帮助.

    重要

    值开头和结尾的空格会自动删除。 例如, " SKU123 ""SKU123" 它们将被视为相同的值。

    什么是 SKU 以及如何分配它

    Min length: 1

    Max length: 255

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

    Example: example

    reason

    Type: string

    拒绝更改的原因:

    • OFFER_DOES_NOT_EXIST — 这个柜子里没有产品 SKU.

    • OFFER_DUPLICATION — 同样的产品已经转移了好几次。

    • OFFER_NOT_ELIGIBLE_FOR_PROMO — 产品不符合促销条款。

    • OFFER_PROMOS_MAX_BYTE_SIZE_EXCEEDED — 由于技术原因,该产品未添加到促销中。

    • DEADLINE_FOR_FOCUS_PROMOS_EXCEEDED — 在促销活动中添加产品的截止日期已过期。

    • EMPTY_OLD_PRICE — 未注明划掉的价格。

    • EMPTY_PROMO_PRICE — 促销的价格没有指定。

    • MAX_PROMO_PRICE_EXCEEDED — 股价超过参与促销的最高可能价格。

    • PROMO_PRICE_BIGGER_THAN_MAX — 股价超过划掉价格的95%。

    • PROMO_PRICE_SMALLER_THAN_MIN — 股价低于划线价格的1%。

    • PRICE_TOO_BIG — 股价太高了。

    • OLD_PRICE_TOO_BIG — 划掉的价格太大了。

    Enum: OFFER_DOES_NOT_EXIST, OFFER_DUPLICATION, OFFER_NOT_ELIGIBLE_FOR_PROMO, OFFER_PROMOS_MAX_BYTE_SIZE_EXCEEDED, DEADLINE_FOR_FOCUS_PROMOS_EXCEEDED, EMPTY_OLD_PRICE, EMPTY_PROMO_PRICE, MAX_PROMO_PRICE_EXCEEDED, PROMO_PRICE_BIGGER_THAN_MAX, PROMO_PRICE_SMALLER_THAN_MIN, PRICE_TOO_BIG, OLD_PRICE_TOO_BIG

    被拒绝的更改。

    只有在有拒绝的更改时才返回。

    Min items: 1

    Example
    [
      {
        "offerId": "example",
        "reason": "OFFER_DOES_NOT_EXIST"
      }
    ]
    

    warningOffers

    Type: object[]

    offerId

    Type: string

    你的 SKU — 系统中的产品ID。

    使用规则 SKU:

    • 对于每个产品 SKU 一定有一个。

    • 已经设置 SKU 它不能被释放并重新用于另一个产品。 每个产品都应该收到一个以前从未在目录中使用过的新标识符。

    SKU 产品可以在市场上的卖方帐户中更改。 阅读如何做到这一点。 在市场对卖家的帮助.

    重要

    值开头和结尾的空格会自动删除。 例如, " SKU123 ""SKU123" 它们将被视为相同的值。

    什么是 SKU 以及如何分配它

    Min length: 1

    Max length: 255

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

    Example: example

    warnings

    Type: object[]

    code

    Type: string

    添加产品时出现的警告:

    • DEEP_DISCOUNT_OFFER — 与目录中的价格有很大差异。 检查是否有错误。

    • CATALOG_PRICE_IS_LOWER_THAN_PROMO — 在所有商店都有效的价格低于促销的价格。 促销活动不会显示产品价格。

    • SHOP_PRICES_ARE_LOWER_THAN_PROMO — 单独商店的价格低于促销的价格。 促销中的产品将在商店中显示价格。 促销价格适用于所有其他商店。

    • SHOP_OFFER_NOT_ELIGIBLE_FOR_PROMO — 单独商店的产品不符合促销条款。

    Enum: DEEP_DISCOUNT_OFFER, CATALOG_PRICE_IS_LOWER_THAN_PROMO, SHOP_PRICES_ARE_LOWER_THAN_PROMO, SHOP_OFFER_NOT_ELIGIBLE_FOR_PROMO

    campaignIds

    Type: integer[] | null

    收到警告的商店的活动Id。

    如果警告对橱柜中的所有商店都有效,则不予退款。

    Min items: 1

    Unique items: true

    Example
    [
      1
    ]
    

    向促销添加商品或更改其价格时出现的警告。

    Example
    [
      {
        "code": "DEEP_DISCOUNT_OFFER",
        "campaignIds": [
          1
        ]
      }
    ]
    

    有警告的更改。 他们会告诉你可能出现的问题。 产品信息将被更新。

    只有在有警告时才返回。

    Min items: 1

    Example
    [
      {
        "offerId": "example",
        "warnings": [
          {
            "code": "DEEP_DISCOUNT_OFFER",
            "campaignIds": [
              1
            ]
          }
        ]
      }
    ]
    

    向促销添加产品时出现的错误和警告。

    Example
    {
      "rejectedOffers": [
        {
          "offerId": "example",
          "reason": "OFFER_DOES_NOT_EXIST"
        }
      ],
      "warningOffers": [
        {
          "offerId": "example",
          "warnings": [
            {
              "code": "DEEP_DISCOUNT_OFFER",
              "campaignIds": [
                null
              ]
            }
          ]
        }
      ]
    }
    
    Example
    {
      "result": {
        "rejectedOffers": [
          {
            "offerId": "example",
            "reason": "OFFER_DOES_NOT_EXIST"
          }
        ],
        "warningOffers": [
          {
            "offerId": "example",
            "warnings": [
              {}
            ]
          }
        ]
      }
    }
    

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: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "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: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "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: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "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: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "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: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "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: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "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.

Цена, которая действует во всех магазинах.