仓库一览表

方法适用于模式:FBS, Express 和 DBS.

如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一

返回机柜仓库列表及其相关信息。

为每个仓库返回工作模型列表(FBS, DBS, Express)和每个模型的API可用性。

Метод подходит, только если в кабинете нет групп складов

该方法只返回单个仓库,不返回仓库组。 如果机柜中有仓库组,则使用方法 POST v2/businesses/{businessId}/warehouses. 什么是仓库组,为什么需要它们?.

⚙️ 限额: 100 请求 每小时

Request

POST

https://api.partner.market.yandex.ru/v3/businesses/{businessId}/warehouses

Path parameters

Name

Description

businessId

Type: integer

内阁ID。

Min value: 1

Query parameters

Name

Description

limit

Type: integer

每页的值数。

Default: 15

Min value: 1

Max value: 30

pageToken

Type: string

结果页面的ID。

如果省略该参数,则返回第一页。

传递输出参数的值 nextPageToken,在最后一次请求期间接收。

Example: ``

Body

application/json
{
  "warehouseIds": [
    1
  ],
  "components": [
    "ADDRESS"
  ]
}

Name

Description

components

Type: string[] | null

需要返回的仓库的属性。 如果省略了某些参数值,则此信息将不包含在响应中。

仅当您需要它返回的信息时才传递参数。

Min items: 1

Unique items: true

Example
[
  "example"
]

warehouseIds

Type: integer[] | null

需要返回的仓库Id列表。

如果省略此参数,则返回所有机柜仓库。

Min items: 1

Unique items: true

Example
[
  1
]

Responses

200 OK

您请求的仓库及其属性的列表。

Body

application/json
{
  "status": "OK",
  "result": {
    "warehouses": [
      {
        "id": 1,
        "name": "example",
        "models": [
          null
        ],
        "address": {}
      }
    ],
    "paging": {
      "nextPageToken": "example"
    }
  }
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    响应的类型。 可能的值:

    • OK — 没有错误。
    • ERROR — 处理请求时出错。

    Enum: OK, ERROR

    服务器响应的标准包装器。

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    result

    Type: object

    warehouses

    Type: object[]

    id

    Type: integer

    仓库ID。

    Min value: 1

    models

    Type: object[]

    apiAvailability

    Type: string

    使用API的能力:

    • AVAILABLE — API方法可用于执行请求。
    • DISABLED_BY_INACTIVITY — API方法不可用,因为商店没有在展柜中放置产品超过90天。
    • DISABLED_BY_NO_ACTIVE_CONTRACT — 由于缺乏与Yandex的有效合同,API方法不可用。市场。
    • MANUALLY_DISABLED — API方法不可用,因为手动禁用了集成。
    • DISABLED_BY_NO_PLACEMENT_TYPE — API方法不可用,因为商店未连接到放置程序。

    恢复访问的详细说明

    Enum: AVAILABLE, DISABLED_BY_INACTIVITY, DISABLED_BY_NO_ACTIVE_CONTRACT, MANUALLY_DISABLED, DISABLED_BY_NO_PLACEMENT_TYPE

    placementType

    Type: string

    工作模式:

    • FBS — FBS.
    • DBS — DBS.
    • EXPRESS — Express.

    Enum: FBS, DBS, EXPRESS

    仓库可用的工作模型。

    Example
    [
      {
        "placementType": "FBS",
        "apiAvailability": "AVAILABLE"
      }
    ]
    

    name

    Type: string

    仓库的名称。

    Example: example

    address

    Type: object

    city

    Type: string

    城市。

    Max length: 200

    Example: example

    gps

    Type: object

    latitude

    Type: number

    宽度。

    longitude

    Type: number

    经度。

    纬度和经度的GPS坐标。

    Example
    {
      "latitude": 0.5,
      "longitude": 0.5
    }
    

    block

    Type: string

    建筑物编号。

    Max length: 16

    Example: example

    building

    Type: string

    建筑物编号。

    Max length: 16

    Example: example

    number

    Type: string

    门牌号。

    Max length: 256

    Example: example

    street

    Type: string

    街道。

    Max length: 512

    Example: example

    仓库地址。

    Example
    {
      "city": "example",
      "street": "example",
      "number": "example",
      "building": "example",
      "block": "example",
      "gps": {
        "latitude": 0.5,
        "longitude": 0.5
      }
    }
    

    仓库列表。

    Example
    [
      {
        "id": 1,
        "name": "example",
        "models": [
          {
            "placementType": "FBS",
            "apiAvailability": "AVAILABLE"
          }
        ],
        "address": {
          "city": "example",
          "street": "example",
          "number": "example",
          "building": "example",
          "block": "example",
          "gps": {
            "latitude": 0.5,
            "longitude": 0.5
          }
        }
      }
    ]
    

    paging

    Type: object

    nextPageToken

    Type: string

    下一个结果页面的ID。

    Example: example

    下一页的ID。

    Example
    {
      "nextPageToken": "example"
    }
    

    关于内阁仓库的信息。

    Example
    {
      "warehouses": [
        {
          "id": 1,
          "name": "example",
          "models": [
            {
              "placementType": "FBS",
              "apiAvailability": "AVAILABLE"
            }
          ],
          "address": {
            "city": "example",
            "street": "example",
            "number": "example",
            "building": "example",
            "block": "example",
            "gps": {
              "latitude": 0.5,
              "longitude": 0.5
            }
          }
        }
      ],
      "paging": {
        "nextPageToken": "example"
      }
    }
    
    Example
    {
      "result": {
        "warehouses": [
          {
            "id": 1,
            "name": "example",
            "models": [
              {}
            ],
            "address": {
              "city": "example",
              "street": "example",
              "number": "example",
              "building": "example",
              "block": "example",
              "gps": {}
            }
          }
        ],
        "paging": {
          "nextPageToken": "example"
        }
      }
    }
    

400 Bad Request

请求包含不正确的数据。 有关错误的更多信息

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

401 Unauthorized

请求中未指定授权数据。 有关错误的更多信息

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

403 Forbidden

授权数据不正确或禁止访问资源。 有关错误的更多信息

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

420 Method Failure

已超出资源访问限制。 有关错误的更多信息

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

500 Internal Server Error

Yandex的内部错误。 市场。 有关错误的更多信息

Body

application/json
{
  "status": "OK",
  "errors": [
    {
      "code": "example",
      "message": "example"
    }
  ]
}

Type: object

All of 1 type
  • Type: object

    All of 2 types
    • Type: object

      status

      Type: string

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }