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

# List all locations



## OpenAPI

````yaml GET /locations
openapi: 3.1.0
info:
  title: Caspen
  version: 0.0.1
servers:
  - url: https://api.caspen.com/v1
    description: Production
security: []
paths:
  /locations:
    get:
      tags:
        - Location
      operationId: location.index
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Paginated set of `LocationResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LocationCollection'
                  links:
                    type: object
                    properties:
                      prev:
                        type:
                          - string
                          - 'null'
                      next:
                        type:
                          - string
                          - 'null'
                    required:
                      - prev
                      - next
                required:
                  - data
                  - links
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    LocationCollection:
      type: array
      items:
        $ref: '#/components/schemas/LocationResource'
      title: LocationCollection
    LocationResource:
      type: object
      properties:
        id:
          type: string
          description: The location's unique identifier.
          examples:
            - loc_01HQFQ9QWTNNPY58FZ8CB3FWWK
        name:
          type: string
          description: The location's name.
          examples:
            - Main Clinic
        description:
          type:
            - string
            - 'null'
          description: The location's description.
          examples:
            - Our primary healthcare facility offering comprehensive services.
        email:
          type:
            - string
            - 'null'
          description: The location's email address.
          examples:
            - reception@mainclinic.com
        phone:
          type:
            - string
            - 'null'
          description: The location's phone number.
          examples:
            - '+61400123456'
        timezone:
          type: string
          description: The location's timezone.
          examples:
            - Australia/Sydney
        online_appointment_booking:
          type:
            - boolean
            - 'null'
          description: Whether online appointment booking is enabled for this location.
          examples:
            - true
        online_class_booking:
          type:
            - boolean
            - 'null'
          description: Whether online class booking is enabled for this location.
          examples:
            - true
        tax_identifier:
          type:
            - string
            - 'null'
          description: >-
            The location's tax identifier (e.g. ABN, VAT number, GST number, Tax
            number).
          examples:
            - 12 345 678 901
        tax_identifier_label:
          type: string
          description: The label for the tax identifier based on the account's country.
          examples:
            - ABN
        ndis_number:
          type:
            - string
            - 'null'
          description: The location's NDIS number.
          examples:
            - '4050123456'
        logo_id:
          type:
            - string
            - 'null'
          description: The location's logo media ID.
          examples:
            - med_01HQFQ9QWTNNPY58FZ8CB3FWWK
        image_id:
          type:
            - string
            - 'null'
          description: The location's image media ID.
          examples:
            - med_01HQFQ9QWTNNPY58FZ8CB3FWWK
        service_ids:
          type: array
          description: The IDs of services available at this location.
          examples:
            - - ser_01HYHYQHA682J0K1RW7B2HVA9F
              - ser_01HYHYW37MTYJPMT5JV4RN99GK
          items:
            type: string
        practitioner_ids:
          type: array
          description: The IDs of practitioners working at this location.
          examples:
            - - pra_01HYHYQHA682J0K1RW7B2HVA9F
              - pra_01HYHYW37MTYJPMT5JV4RN99GK
          items:
            type: string
        opening_hours:
          type:
            - object
            - 'null'
          description: The location's opening hours for each day of the week.
          examples:
            - mon_active: true
              mon_opens_at: '09:00'
              mon_closes_at: '17:00'
              tue_active: true
              tue_opens_at: '09:00'
              tue_closes_at: '17:00'
          properties:
            mon_active:
              type:
                - boolean
                - 'null'
            mon_opens_at:
              type:
                - string
                - 'null'
            mon_closes_at:
              type:
                - string
                - 'null'
            tue_active:
              type:
                - boolean
                - 'null'
            tue_opens_at:
              type:
                - string
                - 'null'
            tue_closes_at:
              type:
                - string
                - 'null'
            wed_active:
              type:
                - boolean
                - 'null'
            wed_opens_at:
              type:
                - string
                - 'null'
            wed_closes_at:
              type:
                - string
                - 'null'
            thu_active:
              type:
                - boolean
                - 'null'
            thu_opens_at:
              type:
                - string
                - 'null'
            thu_closes_at:
              type:
                - string
                - 'null'
            fri_active:
              type:
                - boolean
                - 'null'
            fri_opens_at:
              type:
                - string
                - 'null'
            fri_closes_at:
              type:
                - string
                - 'null'
            sat_active:
              type:
                - boolean
                - 'null'
            sat_opens_at:
              type:
                - string
                - 'null'
            sat_closes_at:
              type:
                - string
                - 'null'
            sun_active:
              type:
                - boolean
                - 'null'
            sun_opens_at:
              type:
                - string
                - 'null'
            sun_closes_at:
              type:
                - string
                - 'null'
        address:
          type:
            - object
            - 'null'
          description: The location's address details.
          examples:
            - line1: 123 Health Street
              line2: Level 2
              city: Sydney
              state: NSW
              postal_code: '2000'
              country_code: AU
          properties:
            line1:
              type:
                - string
                - 'null'
            line2:
              type:
                - string
                - 'null'
            city:
              type:
                - string
                - 'null'
            state:
              type:
                - string
                - 'null'
            postal_code:
              type:
                - string
                - 'null'
            country_code:
              type:
                - string
                - 'null'
        created_at:
          type: string
          description: The timestamp when the location was created (ISO 8601).
          examples:
            - '2024-01-01T12:00:00Z'
      title: LocationResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````