---
title: "Matching leads for a property"
url: "https://real-estate-agency.apim.eu/apis/leads/versions/d1fa19e4-3a7d-4b6b-aac0-9ec016571b4b/operations/matchLeadsForProperty"
---

> Full API specification: https://real-estate-agency.apim.eu/apis/leads/versions/d1fa19e4-3a7d-4b6b-aac0-9ec016571b4b.md

# Matching leads for a property

`GET` `/matching/properties/{propertyId}`

Operation ID: `matchLeadsForProperty`

Returns leads with a matching search profile, sorted descending by score.

## Path parameters

- `propertyId` (string, required)

## Query parameters

- `min_points` (integer, optional)

## Responses

- `200` - Results

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Leads & Inquiries
  version: 1.0.0
servers:
  - url: https://api.realestateagency.example/v1
    description: Production
  - url: https://sandbox.api.realestateagency.example/v1
    description: Sandbox
paths:
  /matching/properties/{propertyId}:
    parameters:
      - name: propertyId
        in: path
        required: true
        schema:
          type: string
          example: prop_8f2c1a
    get:
      tags:
        - Matching
      summary: Matching leads for a property
      description: Returns leads with a matching search profile, sorted descending by score.
      operationId: matchLeadsForProperty
      parameters:
        - name: min_points
          in: query
          schema:
            type: integer
            minimum: 0
            maximum: 100
            default: 60
      responses:
        "200":
          description: Results
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: "#/components/schemas/Score"
security:
  - apiKey: []
components:
  schemas:
    Score:
      type: object
      properties:
        inquiry_id:
          type: string
          example: inq_5c02
        lead_id:
          type: string
          example: lead_71ab
        points:
          type: integer
          minimum: 0
          maximum: 100
          example: 82
        rating:
          type: string
          enum:
            - low
            - medium
            - high
        criteria:
          type: array
          items:
            $ref: "#/components/schemas/Criterion"
    Criterion:
      type: object
      properties:
        criterion:
          type: string
          example: purchase_price
        met:
          type: boolean
          example: true
        weight:
          type: integer
          example: 30
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: |
        Every call carries an API key in the `apikey` header. You generate the
        key in the Real Estate portal under "My Apps"; it's shown exactly once.

        Each key has the scopes it's allowed to use attached to it. If one is
        missing, the API responds with `403` and `code: "scope_missing"`; the
        missing scope is in `details[].field`.
```
