## Get location data

**get** `/v3/chats/{chatId}/location`

Retrieve the current location for contacts sharing with you in a chat.

Returns a [GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946) `FeatureCollection`
with a `Feature` for each participant actively sharing their location.

Works for both 1:1 and group chats. In group chats, returns a separate feature for
each participant who is sharing. Each feature's `properties.handle` identifies the user.

Returns an empty `features` array if no one is sharing or no location data is available yet.

### Path Parameters

- `chatId: string`

### Returns

- `GetChatLocationResponse object { data, success }`

  - `data: object { features, type }`

    - `features: array of object { geometry, properties, type }`

      - `geometry: object { coordinates, type }`

        - `coordinates: array of number`

          [longitude, latitude] or [longitude, latitude, altitude]

        - `type: "Point"`

          - `"Point"`

      - `properties: object { handle, address, locality, updated_at }`

        - `handle: string`

          Phone number or email of the person sharing their location

        - `address: optional string`

          Full street address

        - `locality: optional string`

          City or locality name

        - `updated_at: optional string`

          When the location was last updated

      - `type: "Feature"`

        - `"Feature"`

    - `type: "FeatureCollection"`

      - `"FeatureCollection"`

  - `success: boolean`

### Example

```http
curl https://api.linqapp.com/api/partner/v3/chats/$CHAT_ID/location \
    -H "Authorization: Bearer $LINQ_API_V3_API_KEY"
```

#### Response

```json
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format",
    "doc_url": "https://docs.linqapp.com/error/codes/1xxx/1002/"
  },
  "success": false
}
```
