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

# Get a property

> Retrieves a property by its ID.




## OpenAPI

````yaml openapi.yaml get /get-property/{propertyId}
openapi: 3.1.0
info:
  title: Housr API
  version: 1.0.0
  summary: Property management API with hourly-expiring bearer token authentication.
  description: >
    This API provides endpoints for managing properties in the Housr platform.
    It issues an hourly-expiring bearer token via HTTP Basic Auth for secure
    access. Unless otherwise noted, all endpoints require `Authorization: Bearer
    <token>` over HTTPS.


    ## Endpoints


    ### Health Check

    - `GET /health-check` - Check API service availability (no authentication
    required)


    ### Authentication

    - `POST /auth/token` - Obtain a bearer token using HTTP Basic Auth
      - Token expires in 1 hour by default
      - Token provides access based on client credentials and associated scopes

    ### Properties

    - `GET /get-property/{propertyId}` - Retrieve a property by ID
      - Requires bearer token authentication
    - `POST /create-property` - Create a new property record
      - Requires `properties:write` scope
      - Accepts JSON or form-encoded data
      - Supports image URLs as array or comma-separated string
    - `PATCH /update-property/{propertyId}` - Update an existing property
      - Requires `properties:write` scope
      - Server enforces ownership/permissions
      - Provide only fields you wish to change
    - `DELETE /delete-property/{propertyId}` - Delete a property
      - Requires `properties:delete` scope
      - Server enforces ownership/permissions

    ## Authentication

    - Obtain a token with Basic Auth to `/auth/token`.

    - Token expires in 1 hour by default.

    - Use the token in subsequent requests: `Authorization: Bearer <token>`


    ## Error Responses

    All error responses follow the `application/problem+json` format with a
    `response` field containing the error message. Validation errors include an
    additional `errors` object with field-specific error arrays.
servers:
  - url: https://v2.api.uk.housr.com
    description: Production
  - url: https://v2.staging.api.uk.housr.com
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Properties
  - name: Health Check
paths:
  /get-property/{propertyId}:
    get:
      tags:
        - Properties
      summary: Get a property
      description: |
        Retrieves a property by its ID.
      parameters:
        - $ref: '#/components/parameters/PropertyId'
      responses:
        '200':
          description: Property found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Property'
              examples:
                found:
                  value:
                    propertyId: 12345
                    title: Spacious 4-bed near campus
                    description: Modern kitchen, large garden.
                    address: 12 Oxford Road
                    city: Manchester
                    images:
                      - https://cdn.example.com/img/1.jpg
                      - https://cdn.example.com/img/2.jpg
                    price_pw: 180
                    bedrooms: 4
                    bathrooms: 2
                    postcode: M13 9PL
                    lat: 53.467
                    lng: -2.233
                    deposit: 200
        '401':
          description: Missing or invalid authentication
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                unauthorized:
                  value:
                    response: Missing or invalid authentication token
        '404':
          description: Property not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              examples:
                not_found:
                  value:
                    response: Property with ID 12345 not found
      security:
        - bearerAuth: []
components:
  parameters:
    PropertyId:
      in: path
      name: propertyId
      required: true
      schema:
        type: integer
        format: int64
      description: ID of the property
  schemas:
    Property:
      allOf:
        - $ref: '#/components/schemas/PropertyBase'
        - type: object
          properties:
            propertyId:
              type: integer
              format: int64
    Problem:
      type: object
      properties:
        response:
          type: string
    PropertyBase:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        address:
          type: string
        city:
          type: string
        images:
          type: array
          items:
            type: string
            format: uri
          description: Array of image URLs, each their own comma-separated string
        price_pw:
          type: integer
          description: Weekly price as a string to preserve precision
        bedrooms:
          type: integer
          minimum: 0
        bathrooms:
          type: integer
          minimum: 0
        postcode:
          type: string
        lat:
          type: number
          format: double
          nullable: true
        lng:
          type: number
          format: double
          nullable: true
        deposit:
          type: integer
          default: 0
          description: Defaults to 0 if not supplied
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````