List of warehouses
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
- inventory-and-order-processing — Order processing and inventory
- inventory-and-order-processing:read-only — View order information
- all-methods — Full account management
- all-methods:read-only — View all data
Returns a list of warehouses and information about them.
Restriction for the parameter limit
Do not transmit a value greater than 25.
, Limit: 1,000 requests per hour |
---|
Request
POST
https://api.partner.market.yandex.ru/businesses/{businessId}/warehouses
Path parameters
Name |
Description |
businessId* |
Type: integer<int64> Cabinet ID. To find out, use the request GET campaigns. ℹ️ What is a cabinet and a store on the Market?
Min value: |
Query parameters
Name |
Description |
limit |
Type: integer<int32> The number of values per page.
|
page_token |
Type: string ID of the results page. If the parameter is omitted, the first page is returned. We recommend transmitting the value of the output parameter If set |
Body
application/json
{
"components": [
"ADDRESS"
],
"campaignIds": [
0
]
}
Name |
Description |
campaignIds |
Type: integer<int64>[] A list of campaign IDs of those stores whose warehouses need to be returned. You can find them using a query. GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
Do not use store IDs instead, which are listed in the seller's account on the Market next to the store name and in some reports.
Min value: Min items: Max items: Unique items |
components |
Type: WarehouseComponentType[] Properties of warehouses that need to be returned. If some parameter value is omitted, this information will not be included in the response. Pass the parameter only if you need the information it returns. You can pass multiple values at once.
Enum: Min items: Unique items |
WarehouseComponentType
Properties of warehouses that need to be returned:
ADDRESS
— the address of the warehouse.STATUS
— warehouse status.
Type |
Description |
Enum: |
Responses
200 OK
The list of warehouses and their properties that you requested.
Body
application/json
{
"status": "OK",
"result": {
"warehouses": [
{
"id": 0,
"name": "string",
"campaignId": 0,
"express": false,
"groupInfo": {
"name": "string",
"id": 0
},
"address": {
"city": "string",
"street": "string",
"number": "string",
"building": "string",
"block": "string",
"gps": {
"latitude": 0,
"longitude": 0
}
},
"status": {
"status": "DISABLED_MANUALLY"
}
}
],
"paging": {
"nextPageToken": "string"
}
}
}
Name |
Description |
result |
Type: PagedWarehousesDTO Information about warehouses in the cabinet. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
PagedWarehousesDTO
Information about warehouses in the cabinet.
Name |
Description |
warehouses* |
Type: WarehouseDetailsDTO[] List of warehouses. |
paging |
Type: ForwardScrollingPagerDTO The ID of the next page. |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
WarehouseDetailsDTO
Information about the warehouse.
Name |
Description |
campaignId* |
Type: integer<int64> The campaign ID of the store that is associated with the warehouse. You can find it using a query GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
Do not send the store ID instead, which is indicated in the seller's account on the Market next to the store name and in some reports. |
express* |
Type: boolean Is delivery possible for the Express model? |
id* |
Type: integer<int64> The warehouse ID. |
name* |
Type: string The name of the warehouse. |
address |
Type: WarehouseAddressDTO Warehouse address. Returned only if the parameter is specified in the request |
groupInfo |
Type: WarehouseGroupInfoDTO Information about the group to which the warehouse belongs. It is returned only for warehouses in groups. |
status |
Type: WarehouseStatusDTO The status of the warehouse. Returned only if the parameter is specified in the request The status of the warehouse received via the API may not match the status in the cabinet. For example, first the Market disabled the warehouse, and then you use the method POST campaigns/{campaignId}/warehouse/status. Status in the cabinet — Disabled by Yandex.Market, and it will return via the API DISABLED_MANUALLY (disabled by you). |
ForwardScrollingPagerDTO
The ID of the next page.
Name |
Description |
nextPageToken |
Type: string ID of the next results page. |
WarehouseAddressDTO
Warehouse address.
Name |
Description |
city* |
Type: string City. Max length: |
gps* |
Type: GpsDTO GPS coordinates of latitude and longitude. |
block |
Type: string Building number. Max length: |
building |
Type: string Building number. Max length: |
number |
Type: string The house number. Max length: |
street |
Type: string Street. Max length: |
WarehouseGroupInfoDTO
Information about the group to which the warehouse belongs.
It is returned only for warehouses in groups.
What are warehouse groups and why are they needed?
Name |
Description |
id* |
Type: integer<int64> ID of the warehouse group. |
name* |
Type: string The name of the group that the warehouse belongs to. |
WarehouseStatusDTO
Information about the status of the warehouse.
Name |
Description |
status* |
Type: WarehouseStatusType Warehouse status:
Enum: |
GpsDTO
GPS coordinates of latitude and longitude.
Name |
Description |
latitude* |
Type: number<decimal> Width. |
longitude* |
Type: number<decimal> Longitude. |
WarehouseStatusType
Warehouse status:
DISABLED_MANUALLY
– disabled by you.OTHER
– different status. For example, a warehouse is enabled or disabled by Yandex. Market.
Type |
Description |
Enum: |
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiErrorDTO
The general error format.
Name |
Description |
code* |
Type: string The error code. |
message |
Type: string Description of the error. |
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.