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

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: 1

Query parameters

Name

Description

limit

Type: integer<int32>

The number of values per page.
Example: 20

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 nextPageToken, received during the last request.

If set page_token and the request has parameters page and pageSize they are ignored.
Example: eyBuZXh0SWQ6IDIzNDIgfQ==

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:

  • Modules and APIs → block Sending data to Yandex.Market.
  • Query log → drop-down list in the block Show logs.

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: 1

Min items: 1

Max items: 25

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.
Properties of warehouses that need to be returned:

  • ADDRESS — the address of the warehouse.
  • STATUS — warehouse status.

Enum: ADDRESS, STATUS

Min items: 1

Unique items  

WarehouseComponentType

Properties of warehouses that need to be returned:

  • ADDRESS — the address of the warehouse.
  • STATUS — warehouse status.

Type

Description

WarehouseComponentType

Enum: ADDRESS, STATUS

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:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

PagedWarehousesDTO

Information about warehouses in the cabinet.

Name

Description

warehouses*

Type: WarehouseDetailsDTO[]

List of warehouses.
Information about the warehouse.

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

ApiResponseStatusType

Enum: OK, ERROR

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:

  • Modules and APIs → block Sending data to Yandex.Market.
  • Query log → drop-down list in the block Show logs.

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 components takes the value ADDRESS.

groupInfo

Type: 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?

status

Type: WarehouseStatusDTO

The status of the warehouse.

Returned only if the parameter is specified in the request components takes the value STATUS.

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: 200

gps*

Type: GpsDTO

GPS coordinates of latitude and longitude.

block

Type: string

Building number.

Max length: 16

building

Type: string

Building number.

Max length: 16

number

Type: string

The house number.

Max length: 256

street

Type: string

Street.

Max length: 512

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:

  • DISABLED_MANUALLY – disabled by you.
  • OTHER – different status. For example, a warehouse is enabled or disabled by Yandex. Market.

Enum: DISABLED_MANUALLY, OTHER

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

WarehouseStatusType

Enum: DISABLED_MANUALLY, OTHER

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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