---
title: "Query inventory address"

doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/order/shipping-and-fulfillment/query-inventory-address'
  md: 'https://developer.shopline.com/docs/admin-rest-api/order/shipping-and-fulfillment/query-inventory-address.md'
---
# Query inventory address

- **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` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `read_shipping`

## Request

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `locations`

  array<object>

  Location

  * `zip`

    string

    Zip code

  * `town`

    string

    Town / street

  * `district`

    string

    District/County

  * `country`

    string

    Country name

  * `city`

    string

    City

  * `address1`

    string

    Street address

  * `active`

    boolean

    Available or not

  * `province_code`

    string

    Province , state or region code

  * `id`

    string

    Location id

  * `address2`

    string

    Optional second line of street address

  * `created_at`

    string

    Location created time

  * `is_default`

    string

    Default location

  * `province`

    string

    Province , state or region

  * `updated_at`

    string

    Location update time

  * `country_code`

    string

    Country ( ISO 3166-1 alpha-2 )

  * `phone`

    string

    Phone number for location

  * `name`

    string

    Location name


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "externalDocs": {
    "description": "Permission point used by the interface is `read_shipping` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "yF523leW",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `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": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "locations": {
                "name": "locations",
                "description": "Location",
                "type": "array",
                "items": {
                  "name": "locations",
                  "description": "Location",
                  "type": "object",
                  "properties": {
                    "zip": {
                      "name": "zip",
                      "description": "Zip code",
                      "type": "string",
                      "example": "21000"
                    },
                    "town": {
                      "name": "town",
                      "description": "Town / street",
                      "type": "string",
                      "example": "Ottawa"
                    },
                    "district": {
                      "name": "district",
                      "description": "District/County",
                      "type": "string",
                      "example": "Ottawa"
                    },
                    "country": {
                      "name": "country",
                      "description": "Country name",
                      "type": "string",
                      "example": "Canada"
                    },
                    "city": {
                      "name": "city",
                      "description": "City",
                      "type": "string",
                      "example": "Ottawa"
                    },
                    "address1": {
                      "name": "address1",
                      "description": "Street address",
                      "type": "string",
                      "example": "126 York Street"
                    },
                    "active": {
                      "name": "active",
                      "description": "Available or not",
                      "type": "boolean",
                      "example": true
                    },
                    "province_code": {
                      "name": "province_code",
                      "description": "Province , state or region code",
                      "type": "string",
                      "example": "2400011"
                    },
                    "id": {
                      "name": "id",
                      "description": "Location id",
                      "type": "string",
                      "example": "5668167071852661850"
                    },
                    "address2": {
                      "name": "address2",
                      "description": "Optional second line of street address",
                      "type": "string",
                      "example": "Unit 42"
                    },
                    "created_at": {
                      "name": "created_at",
                      "description": "Location created time",
                      "type": "string",
                      "example": "2021-08-16T08:27:57+00:00"
                    },
                    "is_default": {
                      "name": "is_default",
                      "description": "Default location",
                      "type": "string",
                      "example": "true"
                    },
                    "province": {
                      "name": "province",
                      "description": "Province , state or region",
                      "type": "string",
                      "example": "Ontario"
                    },
                    "updated_at": {
                      "name": "updated_at",
                      "description": "Location update time",
                      "type": "string",
                      "example": "2021-08-16T08:27:57+00:00"
                    },
                    "country_code": {
                      "name": "country_code",
                      "description": "Country ( ISO 3166-1 alpha-2 )",
                      "type": "string",
                      "example": "CA"
                    },
                    "phone": {
                      "name": "phone",
                      "description": "Phone number for location",
                      "type": "string",
                      "example": "18883290139"
                    },
                    "name": {
                      "name": "name",
                      "description": "Location name",
                      "type": "string",
                      "example": "Ottawa Store"
                    }
                  },
                  "example": {
                    "town": "Ottawa",
                    "active": true,
                    "created_at": "2021-08-16T08:27:57+00:00",
                    "address1": "126 York Street",
                    "updated_at": "2021-08-16T08:27:57+00:00",
                    "name": "Ottawa Store",
                    "is_default": "true",
                    "id": "5668167071852661850",
                    "city": "Ottawa",
                    "zip": "21000",
                    "district": "Ottawa",
                    "country": "Canada",
                    "country_code": "CA",
                    "province_code": "2400011",
                    "phone": "18883290139",
                    "province": "Ontario",
                    "address2": "Unit 42"
                  }
                },
                "example": [
                  {
                    "is_default": "true",
                    "province_code": "2400011",
                    "updated_at": "2021-08-16T08:27:57+00:00",
                    "address2": "Unit 42",
                    "zip": "21000",
                    "province": "Ontario",
                    "id": "5668167071852661850",
                    "phone": "18883290139",
                    "country_code": "CA",
                    "town": "Ottawa",
                    "name": "Ottawa Store",
                    "city": "Ottawa",
                    "district": "Ottawa",
                    "active": true,
                    "address1": "126 York Street",
                    "created_at": "2021-08-16T08:27:57+00:00",
                    "country": "Canada"
                  }
                ]
              }
            },
            "example": {
              "locations": [
                {
                  "name": "Ottawa Store",
                  "province": "Ontario",
                  "active": true,
                  "city": "Ottawa",
                  "id": "5668167071852661850",
                  "country_code": "CA",
                  "district": "Ottawa",
                  "zip": "21000",
                  "phone": "18883290139",
                  "address2": "Unit 42",
                  "country": "Canada",
                  "province_code": "2400011",
                  "address1": "126 York Street",
                  "created_at": "2021-08-16T08:27:57+00:00",
                  "town": "Ottawa",
                  "is_default": "true",
                  "updated_at": "2021-08-16T08:27:57+00:00"
                }
              ]
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "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` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Query inventory address",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_shipping"
  ]
}
```