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

# Get Location

> Returns a single location by ID.



## OpenAPI

````yaml api-reference/v01.12.00/openapi-v01.12.00.json GET /locations/{id}
openapi: 3.0.0
info:
  title: Roosted
  version: 0.1.12
  contact:
    name: Support
    url: https://support.roostedhr.com/support/home
    email: support@roostedhr.com
  description: |-
    Enterprise API

    Sandbox keys and Production keys are requested from support
servers:
  - url: https://api.roostedhr.com/api/1_12
  - url: https://sandbox.roostedhr.com/api/1_12
security:
  - X-API-KEY: []
tags:
  - name: Announcements
  - name: Areas
  - name: Clients
  - name: Company
  - name: Configuration
  - name: Events
  - name: Locations
  - name: Payroll Groups
  - name: Rate Cards
  - name: Shifts
  - name: Skillsets
  - name: Time Tracking
  - name: Wage Rules
  - name: Workers
paths:
  /locations/{id}:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Location ID
    get:
      tags:
        - Locations
      summary: Get Location
      description: Returns a single location by ID.
      operationId: get-location
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Location name is required:
                  value:
                    code: LOC-100
                    error: Location name is required
                Address is required:
                  value:
                    code: LOC-200
                    error: Address is required
                City is required:
                  value:
                    code: LOC-300
                    error: City is required
                ZIP code is required:
                  value:
                    code: LOC-400
                    error: ZIP code is required
                Invalid timezone ID:
                  value:
                    code: LOC-600
                    error: Invalid timezone ID
                Invalid client ID:
                  value:
                    code: LOC-700
                    error: Invalid client ID
                Invalid area ID:
                  value:
                    code: LOC-800
                    error: Invalid area ID
                Invalid color format:
                  value:
                    code: LOC-900
                    error: Invalid color format
                Location name exceeds maximum length:
                  value:
                    code: LOC-1000
                    error: Location name exceeds maximum length
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Invalid or missing API key:
                  value:
                    code: ATH-100
                    error: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Insufficient permissions to manage locations:
                  value:
                    code: LOC-1200
                    error: Insufficient permissions to manage locations
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Location not found:
                  value:
                    code: LOC-1100
                    error: Location not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                An unexpected error occurred:
                  value:
                    code: LOC-1300
                    error: An unexpected error occurred
components:
  schemas:
    Location:
      title: Location
      type: object
      properties:
        id:
          type: string
          description: Location identifier
        location:
          type: string
          description: Location name
        addy_street_number:
          type: string
          description: Street address
        addy_city:
          type: string
          description: City
        addy_zip:
          type: string
          description: ZIP/postal code
        location_comments:
          type: string
          nullable: true
          description: Additional comments
        default:
          type: integer
          nullable: true
          minimum: 0
          maximum: 1
          description: Whether this is the default location (0 or 1)
        saved:
          type: integer
          nullable: true
          minimum: 0
          maximum: 1
          description: Whether the location is saved (0 or 1)
        color:
          type: string
          nullable: true
          description: Hex color code
          example: '#DC136C'
        timezone:
          type: object
          description: Location timezone
          properties:
            id:
              type: integer
              nullable: true
              description: Timezone identifier
            name:
              type: string
              nullable: true
              description: Timezone name
            offset:
              type: string
              nullable: true
              description: UTC offset
        companies_payroll_rulesets_id:
          type: string
          nullable: true
          description: Associated payroll ruleset ID
        payroll_rule_display:
          type: string
          nullable: true
          description: Payroll rule display name
        latitude:
          type: string
          nullable: true
          description: GPS latitude coordinate
        longitude:
          type: string
          nullable: true
          description: GPS longitude coordinate
        default_clients_id:
          type: string
          nullable: true
          description: Default client hashed ID
        default_areas:
          type: array
          description: Default area IDs
          items:
            type: string
  securitySchemes:
    X-API-KEY:
      name: X-API-KEY
      type: apiKey
      in: header

````