---
title: "查询库存地址"
description: "查询指定店铺下的地点信息"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/order/shipping-and-fulfillment/query-inventory-address'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/order/shipping-and-fulfillment/query-inventory-address.md'
---
# 查询库存地址

查询指定店铺下的地点信息

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_shipping`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /locations.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `read_shipping`

## Request

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `locations`

  array<object>

  地点

  * `zip`

    string

    邮政编码

  * `id`

    string

    地点ID

  * `country`

    string

    国家/地区名称

  * `address1`

    string

    街道地址

  * `name`

    string

    地点名称

  * `town`

    string

    镇/街道

  * `address2`

    string

    街道地址的可选第二行

  * `updated_at`

    string

    地点更新时间

  * `is_default`

    string

    是否默认地点

  * `country_code`

    string

    国家/地区码(ISO 3166-1 alpha-2)

  * `active`

    boolean

    是否可用

  * `phone`

    string

    地点的电话号码

  * `province_code`

    string

    省、州或地区代码

  * `created_at`

    string

    地点创建时间

  * `province`

    string

    省、州或地区

  * `city`

    string

    城市

  * `district`

    string

    区/县


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "description": "查询指定店铺下的地点信息",
  "externalDocs": {
    "description": "接口使用的权限点: `read_shipping` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "yF523leW",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。请参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "locations": {
                "name": "locations",
                "description": "地点",
                "type": "array",
                "items": {
                  "name": "locations",
                  "description": "地点",
                  "type": "object",
                  "properties": {
                    "zip": {
                      "name": "zip",
                      "description": "邮政编码",
                      "type": "string",
                      "example": "21000"
                    },
                    "id": {
                      "name": "id",
                      "description": "地点ID",
                      "type": "string",
                      "example": "5668167071852661850"
                    },
                    "country": {
                      "name": "country",
                      "description": "国家/地区名称",
                      "type": "string",
                      "example": "加拿大"
                    },
                    "address1": {
                      "name": "address1",
                      "description": "街道地址",
                      "type": "string",
                      "example": "南村万博"
                    },
                    "name": {
                      "name": "name",
                      "description": "地点名称",
                      "type": "string",
                      "example": "Ottawa Store"
                    },
                    "town": {
                      "name": "town",
                      "description": "镇/街道",
                      "type": "string",
                      "example": "Ottawa "
                    },
                    "address2": {
                      "name": "address2",
                      "description": "街道地址的可选第二行",
                      "type": "string",
                      "example": "万达广场"
                    },
                    "updated_at": {
                      "name": "updated_at",
                      "description": "地点更新时间",
                      "type": "string",
                      "example": "2021-08-16T08:27:57+00:00"
                    },
                    "is_default": {
                      "name": "is_default",
                      "description": "是否默认地点",
                      "type": "string",
                      "example": "true"
                    },
                    "country_code": {
                      "name": "country_code",
                      "description": "国家/地区码(ISO 3166-1 alpha-2)",
                      "type": "string",
                      "example": "CA"
                    },
                    "active": {
                      "name": "active",
                      "description": "是否可用",
                      "type": "boolean",
                      "example": true
                    },
                    "phone": {
                      "name": "phone",
                      "description": "地点的电话号码",
                      "type": "string",
                      "example": "18883290139"
                    },
                    "province_code": {
                      "name": "province_code",
                      "description": "省、州或地区代码",
                      "type": "string",
                      "example": "2400011"
                    },
                    "created_at": {
                      "name": "created_at",
                      "description": "地点创建时间",
                      "type": "string",
                      "example": "2021-08-16T08:27:57+00:00"
                    },
                    "province": {
                      "name": "province",
                      "description": "省、州或地区",
                      "type": "string",
                      "example": "Ontario"
                    },
                    "city": {
                      "name": "city",
                      "description": "城市",
                      "type": "string",
                      "example": "Ottawa"
                    },
                    "district": {
                      "name": "district",
                      "description": "区/县",
                      "type": "string",
                      "example": "Ottawa"
                    }
                  },
                  "example": {
                    "district": "Ottawa",
                    "active": true,
                    "country": "加拿大",
                    "id": "5668167071852661850",
                    "zip": "21000",
                    "updated_at": "2021-08-16T08:27:57+00:00",
                    "name": "Ottawa Store",
                    "city": "Ottawa",
                    "province_code": "2400011",
                    "country_code": "CA",
                    "address1": "南村万博",
                    "address2": "万达广场",
                    "province": "Ontario",
                    "phone": "18883290139",
                    "is_default": "true",
                    "created_at": "2021-08-16T08:27:57+00:00",
                    "town": "Ottawa "
                  }
                },
                "example": [
                  {
                    "province": "Ontario",
                    "district": "Ottawa",
                    "id": "5668167071852661850",
                    "active": true,
                    "city": "Ottawa",
                    "phone": "18883290139",
                    "zip": "21000",
                    "created_at": "2021-08-16T08:27:57+00:00",
                    "country": "加拿大",
                    "name": "Ottawa Store",
                    "province_code": "2400011",
                    "address1": "南村万博",
                    "is_default": "true",
                    "address2": "万达广场",
                    "updated_at": "2021-08-16T08:27:57+00:00",
                    "country_code": "CA",
                    "town": "Ottawa "
                  }
                ]
              }
            },
            "example": {
              "locations": [
                {
                  "active": true,
                  "id": "5668167071852661850",
                  "created_at": "2021-08-16T08:27:57+00:00",
                  "province": "Ontario",
                  "address1": "南村万博",
                  "town": "Ottawa ",
                  "province_code": "2400011",
                  "is_default": "true",
                  "name": "Ottawa Store",
                  "phone": "18883290139",
                  "updated_at": "2021-08-16T08:27:57+00:00",
                  "country_code": "CA",
                  "city": "Ottawa",
                  "address2": "万达广场",
                  "zip": "21000",
                  "country": "加拿大",
                  "district": "Ottawa"
                }
              ]
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/locations.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "查询库存地址",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_shipping"
  ]
}
```