Transfer of balances via API

In order for the Market to receive up-to-date information about balances, use one of the following methods:

What are warehouse groups and why are they needed?.

What needs to be ready before you get started

Before setting up order processing via the API, you need to add products to the Market and set up assortment updates. You don't have to do this through the API. — choose any method that is convenient for you. All the necessary instructions are available in Yandex.Market Help for sellers.

How does the transfer of leftovers work?

It is important for Yandex.Market to know how many items are left in the store's warehouse. — otherwise, it may turn out that the buyer places an order, but the product does not turn out to be there. Exception — models FBY and LaaS, because the goods are stored in the Market's warehouse and he can count them himself.

To transfer the leftovers correctly, be sure to read an article in the Help of the Market for sellers. All the general rules for transferring balances apply to the API too.

Можно ли использовать одновременно API и другие способы передачи остатков?

Yes, you can transfer balances according to these instructions using the API and in the cabinet via YML or via Excel files.

Integration development

If there are no warehouse groups in the cabinet

  1. Get the warehouse IDs — POST v3/businesses/{businessId}/warehouses.
  2. Transfer the leftovers — POST v3/businesses/{businessId}/offers/stocks/update. In the request, specify your SKU, the warehouse ID and the value of the leftovers.
  3. Check the current balances if necessary. — POST v3/businesses/{businessId}/offers/stocks.

If there are warehouse groups in the cabinet

Using a request PUT v2/campaigns/{campaignId}/offers/stocks You can transfer leftovers at any time.

Each entry includes:

  • Your SKU the product for which you need to update the balance.
  • Date and time — the moment when the new value is relevant.
  • The value of the leftovers itself.

How to check the functionality of the integration

  1. Hide the items using POST v2/campaigns/{campaignId}/hidden-offers.
  2. Make a request to transfer the remaining funds — POST v3/businesses/{businessId}/offers/stocks/update or PUT v2/campaigns/{campaignId}/offers/stocks.
  3. Resume showing hidden goods — POST v2/campaigns/{campaignId}/hidden-offers/delete.

What number should I send

Remaining product — This is the number of units, available for ordering on the Market.

When a customer places an order, the number of available items decreases., — therefore, the leftovers too. For example, if there were 20 and someone ordered 2 units, the remainder would be 18.

Учитываются продажи и на Маркете, и вне Маркета

It doesn't matter where the product was purchased: on the Market or, for example, directly in an offline store. In any case, immediately reduce the remaining product.

For example:

Event

Changing balances

10 units of new goods were brought to the warehouse

0 → 10

The buyer ordered 2 units on the Market

10 → 8

The supplier brought 10 more pieces.

8 → 18

Visitor offline stores I bought 3 pieces

18 → 15

How to transfer leftovers for a group of warehouses

Transfer leftovers only for one of any warehouse. Information for the rest of the warehouses in this group will be updated automatically.

It is assumed that the offline store sells with The same warehouse, the same as the store on the Market.