---
title: "Get Location By ID"
method: GET
path: "/v1/locations/{locationId}"
tags: ["Locations"]
---

# Get Location By ID

`GET /v1/locations/{locationId}`

## Request

- Base URL: `https://api.bouncie.dev`
- URL: `https://api.bouncie.dev/v1/locations/{locationId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/bouncie/apis/bouncie-api/docs/v1/locations/:locationId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `locationId` string, required

## Headers

- `Authorization` string: User access token
- `Content-Type` 'application/json'

## Response `200`

Returns a location

- object
  - `location` union, required: A [GeoJSON feature](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) representation of the location which can either be a polygon or a point with a radius representing a circle
    - object
      - `type` 'Feature', required: Type must be "Feature"
      - `geometry` object, required: The geometry representing the polygon
        - `type` 'Polygon', required: Type must be "Polygon" for polygon representations
        - `coordinates` array[], required: An array containing a single linear ring representing the boundaries of the polygon (see [GeoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6))
          - array[]
            - number[]: Array with [longitude, latitude] _in that specific order_
    - object
      - `type` 'Feature', required: The type must be "Feature"
      - `geometry` object, required: A point representing the center of the circle
        - `type` 'Point', required: The type must be "Point" to represent the center of the circle
        - `coordinates` number[], required: Array with [longitude, latitude] _in that specific order_
      - `properties` object, required: Properties of the circle
        - `subType` 'Circle', required: The subType must be "Circle" for circles
        - `radius` number, required: The radius of the circle in meters
  - `name` string, required: Name of the location
  - `id` string, required: Unique identifier of the location

## Other responses

- `404`: Responds with a status code of 404 if a location could not be found

---

[API](https://skmtc.dev/bouncie/apis/bouncie-api.md) - [All operations](https://skmtc.dev/bouncie/apis/bouncie-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bouncie/apis/bouncie-api/revisions/7b4fc4cc0eb9?raw)
