Working with warehouses

The Yandex.Market API allows you to get information about warehouses, as well as disable them to temporarily hide goods from the showcase, and turn them back on.

Find out warehouse statuses

Make a request POST businesses/{businessId}/warehouses where to specify:

  • campaign IDs — campaignIds;
  • The warehouse property is a parameter components with the value STATUS.

Find out the groups of warehouses for transferring leftovers

If the warehouses are grouped, you need to transfer the leftovers only for any one warehouse — information for the other warehouses in this group will be updated automatically. What are warehouse groups and why are they needed?

To find out which warehouses are grouped, get information about all warehouses. To do this, make a request POST businesses/{businessId}/warehouses where to specify the campaign IDs — campaignIds. Parameter components You don't need to transmit it.

If the warehouse's response is:

  • There is no parameter groupInfo — he is not in the group. Transfer the leftovers by specifying the campaign ID of the store that is associated with the warehouse.
  • The parameter returned groupInfo — the warehouse is grouped together. Warehouses with the same name id in WarehouseGroupInfoDTO they belong to the same group. Transfer the leftovers by specifying the campaign ID of any store in this group.

How to transfer leftovers

Disable or enable storage

If you want to temporarily remove goods from the showcase, disconnect the warehouse where they are located. To do this, make a request POST campaigns/{campaignId}/warehouse/status, where pass the parameter enabled with the value false. The goods will be hidden from the showcase in 15 minutes.

To enable the warehouse, make the same request, but the parameter enabled must take the value true. After switching on, the goods will return to the showcase in 15 minutes, and if the warehouse has been turned off for 30 days or longer — after 4 hours.