Skip to content

Dossier Search

POST dossiers/search

Returns dossiers that match the specified search criteria.

Request#

curl -X POST 'https://api.pricehubble.com/api/v1/dossiers/search?access_token=74126eab0a9048d993bda4b1b55ae074' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "dealType": "sale",
    "createdAt": {
      "min": "2018-01-01"
    },
    "propertyType": [
      {
        "code": "apartment",
        "subcode": "apartment_normal"
      },
      {
        "code": "apartment",
        "subcode": "apartment_attic"
      }
    ],
    "numberOfRooms": {
      "min": 4,
      "max": 4.5
    },
  },
  "offset": 0,
  "limit": 10,
  "orderBy": {
    "field": "createdAt",
    "direction": "desc"
  },

  "countryCode": "CH"
}'
Field Description Type Remarks
referenceLocation Reference location of the search if ordered by distance. Distances of results are computed relative to this location Location Mandatory if orderBy contains distance
filters Allows to specify various search criteria object
filters.createdAt Filter on dossier creation date object
filters.createdAt.min Lower bound for dossier creation date date Date format: YYYY-MM-DD
filters.createdAt.max Upper bound for dossier creation date date Date format: YYYY-MM-DD
filters.dealType Filter on dossier deal type enum sale or rent
filters.propertyType Filter on property type. Matches dossiers which have one of the specified property types array of PropertyTypes
filters.location Filters on location. If multiple filters are provided, they are connected by a logical "or" array of LocationFilters
filters.buildingYear Filter on building year object
filters.buildingYear.min Lower bound for building year integer
filters.buildingYear.max Upper bound for building year integer
filters.numberOfRooms Filter on number of rooms object
filters.numberOfRooms.min Lower bound for number of rooms float
filters.numberOfRooms.max Upper bound for number of rooms float
filters.hasOpenKitchen Whether the kitchen is in a separate room or part of the living area boolean Only relevant for CZ
filters.numberOfBedrooms Filter on number of bedrooms object Only relevant in BE
filters.numberOfBedrooms.min Lower bound for number of bedrooms integer Only relevant in BE
filters.numberOfBedrooms.max Upper bound for number of bedrooms integer Only relevant in BE
filters.livingArea Filter on net living area object
filters.livingArea.min Lower bound for net living area, in m2 float Maximum two decimals
filters.livingArea.max Upper bound for net living area, in m2 float Maximum two decimals
filters.askingSalePrice Filter on asking sale price in the main currency of the dossier’s country object Only relevant if dealType is sale
filters.askingSalePrice.min Lower bound for asking sale price integer
filters.askingSalePrice.max Upper bound for asking sale price integer
offset Offset of the query (allows pagination) integer min: 0, max: 10'000, default: 0
limit Maximum number of results to return integer min: 0, max: 300, default: 50
orderBy Sort order array of OrderByCriterions
countryCode ISO country code string CH, DE and FR are currently supported

LocationFilter#

Field Description Type Remarks
circle Location filter of type "circle". Matches dossiers which lie within the circle defined by center and radius object
circle.center Center of the circle Location
circle.radius Radius of the circle, in m integer min: 0, max: 30'000, default: 20'000

OrderByCriterion#

Field Description Type Remarks
field Field by which to sort enum createdAt or distance
direction Sort direction enum asc (default) or desc

Response#

{
  "items": [
    {
      "id": "c41924a0fb86b4e2e2da33f2ff468b72f2...",
      "dealType": "sale",
      "createdAt": "2018-07-31T16:06:05Z",
      "modifiedAt": "2018-08-03T14:00:00Z",
      "title": "Family home",
      "description": "My description",
      "askingSalePrice": 200000,
      "numberOfRooms": 3,
      "livingArea": 100.00,
      "images": [{
        "caption": "Front view",
        "filename": "...b7879b37e.jpg",
        "url": "https://storage.googleapis.com/.../...b7879b37e.jpg"
      }],
      "location" : {
        "address": {
          "city": "Oberglatt",
          "houseNumber": "1",
          "postCode": "8154",
          "street": "Allmendstrasse"
        },
        "coordinates": {
          "latitude": 47.4741020202637,
          "longitude": 8.51667785644531
        },
      },
      "propertyType": {
        "code": "apartment",
        "subcode": "apartment_normal"
      },
    },
    ...
  ],
}
Field Description Type Remarks
items List of matching dossiers array of Dossiers empty array if no results

Dossier#

Field Description Type Remarks
id Technical ID of the dossier string
dealType Deal type of the dossier enum sale or rent (always present when property type code is not multi_family_house)
createdAt Creation date of the dossier date-time Format: YYYY-MM-DDTHH:MM:SSZ
createdBy Username of the dossier's creator string
modifiedAt Date of the dossier's last modification date-time Format: YYYY-MM-DDTHH:MM:SSZ
title Title of the dossier string
description Description of the dossier string
askingSalePrice Asking price of the dossier in the main currency of the dossier’s country integer Only present if dealType is sale
numberOfRooms Number of rooms of the property float
hasOpenKitchen Whether the kitchen is in a separate room or part of the living area boolean Only relevant for CZ
numberOfBedrooms Number of bedrooms of the property integer Only relevant in BE
livingArea Net living area (SIA standard) of the property, in m2 float Maximum two decimals
landArea Total area of the lot/parcel on which the house is standing, in m2 float Maximum two decimals
images Images of the dossier array of DossierImages max items: 3
propertyType Type of the property PropertyType
location Location of the dossier Location
distance Distance of the property to the reference location, in m integer Only returned if the request contains a referenceLocation

Dossier Image#

Field Description Type Remarks
filename Name of the file string
url Url of the image string
caption Caption of the image string