Transmitting information about balances

The method is available for models: FBS, Express and DBS.

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

Transmits data about the remaining goods in the showcase.

For a group of warehouses, transfer the leftovers only for one of any warehouse. The information for the other warehouses in this group will be updated automatically.

Be sure to specify SKU Exactly the way it is listed in the catalog. For example, 557722 and 0557722 — these are two different SKU.

The data in the catalog is not updated instantly

It takes up to a few minutes.

⚙️ Limit: 100,000 products per minute

Request

PUT

https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/offers/stocks

Path parameters

Name

Description

campaignId

Type: integer

The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction.

You can find it using a query GET v2/campaigns or find it in the seller's office on the Market. Click on your account icon → Settings and in the menu on the left, select APIs and modules:

  • block Campaign ID;
  • tab Query log → drop-down list in the block Show logs.

⚠️ Do not confuse it with:

  • the store's identifier, which is displayed in the merchant's personal account.
  • advertising campaigns.

Min value: 1

Body

application/json
{
  "skus": [
    {
      "sku": "example",
      "items": [
        {
          "count": 0,
          "updatedAt": "2025-01-01T00:00:00Z"
        }
      ]
    }
  ]
}

Name

Description

skus

Type: object[]

items

Type: object[]

count

Type: integer

The quantity of the available product.

Min value: 0

Max value: 2000000000

updatedAt

Type: string<date-time>

The date and time of the last update of the balance information.

If you did not pass the parameter updatedAt, the current time is used.

Date and time format: ISO 8601 with an offset relative to UTC. For example, 2017-11-21T00:42:42+03:00.

Example: 2025-01-01T00:00:00Z

Information about the remaining goods.

Min items: 1

Max items: 1

Example
[
  {
    "count": 0,
    "updatedAt": "2025-01-01T00:00:00Z"
  }
]

sku

Type: string

Your SKU — the product ID in your system.

Usage rules SKU:

  • For each product SKU there must be one.

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

SKU 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.

Warning

Spaces at the beginning and end of the value are automatically deleted. For example, " SKU123 " and "SKU123" they will be treated as identical values.

What is SKU and how to assign it

Min length: 1

Max length: 255

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

Example: example

Data on the remaining goods.

Within a single query, all values are sku they must be unique. It is not allowed to transfer two objects with the same name. sku.

Min items: 1

Max items: 2000

Example
[
  {
    "sku": "example",
    "items": [
      {
        "count": 0,
        "updatedAt": "2025-01-01T00:00:00Z"
      }
    ]
  }
]

Responses

200 OK

An empty answer.

Body

application/json
{
  "status": "OK"
}

Type: object

400 Bad Request

The request contains incorrect data. Learn more about errors when working with leftovers

Body

application/json
{
  "status": "OK"
}

Type: object

401 Unauthorized

The authorization data is not specified in the request. More information about the error

Body

application/json
{
  "status": "OK"
}

Type: object

403 Forbidden

The authorization data is incorrect or access to the resource is prohibited. More information about the error

Body

application/json
{
  "status": "OK"
}

Type: object

404 Not Found

The requested resource was not found. More information about the error

Body

application/json
{
  "status": "OK"
}

Type: object

420 Method Failure

The resource access limit has been exceeded. More information about the error

Body

application/json
{
  "status": "OK"
}

Type: object

500 Internal Server Error

Internal error of the Market. More information about the error

Body

application/json
{
  "status": "OK"
}

Type: object

pathParams:
  - description: "The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction.\n\nYou can find it using a query [GET\_v2/campaigns](../../reference/campaigns/getCampaigns.md) or find it in the seller's office on the Market. Click on your account icon → **Settings** and in the menu on the left, select **APIs and modules**:\n\n* block **Campaign ID**;\n* tab **Query log** → drop-down list in the block **Show logs**.\n\n⚠️ Do not confuse it with:\n- the store's identifier, which is displayed in the merchant's personal account.\n- advertising campaigns.\n"
    name: campaignId
    in: path
    required: true
    schema:
      type: integer
      format: int64
      minimum: 1
searchParams: []
headers: []
body: |-
  {
    "skus": [
      {
        "sku": "example",
        "items": [
          {
            "count": 0,
            "updatedAt": "2025-01-01T00:00:00Z"
          }
        ]
      }
    ]
  }
schema:
  description: Request to change information on the remaining items.
  type: object
  required:
    - skus
  properties:
    skus:
      description: >
        Data on the remaining goods.


        Within a single query, all values are `sku` they must be
        unique. It is not allowed to transfer two objects with the same name.
        `sku`.
      type: array
      minItems: 1
      maxItems: 2000
      items:
        description: Information about the remains of one product in one of the warehouses.
        type: object
        required:
          - sku
          - items
        properties:
          sku:
            description: "Your SKU —\_the product ID in your system.\n\nUsage rules SKU:\n\n* For each product SKU there must be one.\n\n* Already set SKU it cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.\n\nSKU 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](https://yandex.ru/support2/marketplace/ru/assortment/operations/edit-sku).\n\n{% note warning %}\n\nSpaces at the beginning and end of the value are automatically deleted. For example, `\"  SKU123  \"` and `\"SKU123\"` they will be treated as identical values.\n\n{% endnote %}\n\n[What is SKU and how to assign it](https://yandex.ru/support/marketplace/assortment/add/index.html#fields)\n"
            type: string
            pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$
            x-transform: trim
            minLength: 1
            maxLength: 255
          items:
            description: |
              Information about the remaining goods.
            type: array
            minItems: 1
            maxItems: 1
            items:
              description: |
                Information about the remaining goods.
              type: object
              required:
                - count
              properties:
                count:
                  description: |
                    The quantity of the available product.
                  format: int64
                  type: integer
                  minimum: 0
                  maximum: 2000000000
                updatedAt:
                  description: >
                    The date and time of the last update of the balance
                    information.

                    <br><br>

                    If you did not pass the parameter
                    `updatedAt`, the current time is used.

                    <br><br>

                    Date and time format: ISO 8601 with an offset
                    relative to UTC. For example,
                    `2017-11-21T00:42:42+03:00`.
                  type: string
                  format: date-time
bodyType: application/json
method: put
security:
  - type: apiKey
    name: 'Api-Key'
    in: header
  - type: oauth2
    x-inline: true
    flows:
      implicit:
        authorizationUrl: https://oauth.yandex.ru/authorize
        scopes:
          market:partner-api: API Яндекс.Маркета / Поиска по товарам для партнеров
path: v2/campaigns/{campaignId}/offers/stocks
host: https://api.partner.market.yandex.ru

No longer supported, please use an alternative and newer version.