Working with warehouses
Yandex Market API It allows you to get information about warehouses, as well as disable them or individual models of operation in order to temporarily hide goods from the showcase and turn them back on.
Get a list of warehouses
If there are no warehouse groups in the cabinet, make a request POST v3/businesses/{businessId}/warehouses.
The method will return a list of cabinet warehouses and work models (FBS, DBS, Express) and API availability for each model.
Метод подходит, только если в кабинете нет групп складов
If there are warehouse groups in the cabinet, use POST v2/businesses/{businessId}/warehouses. What are warehouse groups and why are they needed?.
Find out warehouse statuses
If there are warehouse groups in the cabinet, make a request POST v2/businesses/{businessId}/warehouses where to specify:
- campaign IDs —
campaignIds; - warehouse property — parameter
componentswith the valueSTATUS.
If there are no warehouse groups in the cabinet, you can get the statuses of the work models in the response of the method POST v3/businesses/{businessId}/warehouses.
Find out the groups of warehouses for transferring leftovers
If the warehouses are grouped, you only need to transfer the leftovers for any one warehouse. — The 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 v2/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 nameidinWarehouseGroupInfoDTOthey belong to the same group. Transfer the leftovers by specifying the campaign ID of any store in this group.
Disable or enable the warehouse operation model
If you need to hide or return to the showcase the goods of only one model of work (FBS, DBS or Express), make a request POST v3/businesses/{businessId}/warehouse/models/status.
In the request, send:
- warehouse ID —
partnerWarehouseId; - the work model —
model; - status —
enabledwith the valuefalseto disable, ortrueto enable it.
After disabling the model, the products that work on it in this warehouse disappear after 15 minutes. After switching on, they return to the showcase in 15 minutes, and if the model has been turned off for 30 days or longer. — after 4 hours.
Если модель отключил Маркет
You will not be able to turn it on manually using this method.