> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Locations

> This endpoint describes locations accessible for the provided client ID. If a merchant_id is provided the locations will be further filtered.

<Note>
  Please review proper request headers [here](/consumer/usage/headers).
</Note>

### Parameters

<ParamField query="merchant_id" type="string">
  Only return locations for this merchant
</ParamField>

<Snippet file="pagination/params.mdx" />

### Response

<ResponseField name="id" type="string">
  Location ID
</ResponseField>

<ResponseField name="merchant_id" type="string">
  Merchant ID
</ResponseField>

<ResponseField name="street" type="string">
  Location's street address
</ResponseField>

<ResponseField name="city" type="string">
  Location's city
</ResponseField>

<ResponseField name="state" type="string">
  Location's state
</ResponseField>

<ResponseField name="zip" type="string">
  Location's zip code
</ResponseField>

<ResponseField name="name" type="string">
  The name of the location if it has one
</ResponseField>

<ResponseField name="phone" type="string">
  The phone number of the location
</ResponseField>

<ResponseField name="loyalty_redemption_type" type="string">
  Redemption type setup at the location (`direct`, `indirect`, `none`)

  | Type       | Description                                        | Codes                            |
  | ---------- | -------------------------------------------------- | -------------------------------- |
  | `direct`   | Thanx has an API integration built with the POS    | Custom Thanx codes: Alphanumeric |
  | `indirect` | POS partner has built an integration to Thanx      | Custom Thanx codes: 5-digits     |
  | `none`     | There is no integration between Thanx and the POS. | Merchant managed codes           |
</ResponseField>

<Snippet file="pagination/response.mdx" />

<RequestExample>
  ```bash Get Locations theme={null}
  curl https://api.thanxsandbox.com/locations \
    -X GET \
    -H "Content-Type: application/json"  \
    -H "Accept-Version: v4.0" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer ${token}" \
    -H "X-ClientId: ${client_id}" 
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "locations": [
      {
        "id": "92b7b0dac4",
        "merchant_id": "9a1f0772c9ac",
        "street": "123 Pizza Lane",
        "city": "Smalltown",
        "state": "CA",
        "zip": "12345",
        "name": "Pizza Town Co",
        "phone": "(415) 555-3728",
        "loyalty_redemption_type": "direct"
      }
    ],
    "pagination": {
      "total_page": 1,
      "per_page": 10,
      "current_page": 1
    }
  }
  ```
</ResponseExample>
