Price Distribution
https://api.casafari.com/market-analytics-api/distributions/pricesLegacy API (api.casafari.com). A route of the existing API for Casafari clients with a contract, not of the platform. On the platform: POST /v1/area-insights/distributions/prices.
En la Legacy API en https://api.casafari.com (clientes con contrato): envíe Authorization: Bearer $CASAFARI_TOKEN; consulte cómo obtener un token. Nuevos usuarios: la API REST de la plataforma, claves de API de plataforma.
Description
Returns the number of properties distributed across price ranges.
Each range is defined by price boundaries and shows the number of properties with prices falling within those boundaries.
Cuerpo de la solicitud
Tipo de contenido application/json. Obligatorio. Tipo: object.
typesstring[]obligatorio42 valores permitidos
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel building other_commercial restaurant werkstatt urban_plot rural_plot room parking garage other apartment_building office_building mix_use_building apartment_development house_developmentbusiness_typestringobligatoriosale rentprice_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullableprice_per_sqm_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablerooms_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablebedrooms_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablebathrooms_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullabletotal_area_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullableplot_area_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullableconstruction_year_rangeobjectnullable2 propiedades
minintegernullablemaxintegernullablecharacteristicsobjectnullable2 propiedades
must_havestring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityexcludestring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityconditionsstring[]used, ruin, very-good, new, other.used ruin very-good new otherprivatebooleanbankbooleanauctionbooleanexclude_outliersbooleancustom_location_boundaryobjectobligatorio3 propiedades
location_idsinteger[]polygonobject[]2 propiedades
latitudenumberobligatoriolongitudenumberobligatoriocircleobject2 propiedades
distanceintegerobligatoriotarget_point solicitado hasta los inmuebles.target_pointobjectobligatorio2 propiedades
latitudenumberobligatoriolongitudenumberobligatorioEjemplo de solicitud
Solo marcadores de posición: reemplace el token y los valores por los suyos.
curl -X POST "https://api.casafari.com/market-analytics-api/distributions/prices" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"types": [
"apartment"
],
"business_type": "sale",
"custom_location_boundary": {
"location_ids": [
11737
]
}
}'Respuestas
200 Respuesta correcta
Tipo: object[].
Mostrar la estructura de respuesta (4 campos)
lower_boundintegerobligatorioupper_boundintegerobligatorioproperties_countintegerobligatoriois_meanbooleanobligatorioEjemplo de una llamada real (Madrid, pisos en venta) (arrays largos abreviados)
[
{
"lower_bound": 1,
"upper_bound": 50001,
"properties_count": 10,
"is_mean": false
},
{
"lower_bound": 50001,
"upper_bound": 100001,
"properties_count": 39,
"is_mean": false
}
]204 Sin contenido
Sin cuerpo.
400 Solicitud incorrecta
Tipo: object.
Mostrar la estructura de la respuesta (3 campos)
messagestringobligatorioerrorsstring[]nullabledetailsstringnullable422 Error de validación
Tipo: object.
Mostrar la estructura de respuesta (6 campos)
detailobject[]5 propiedades
loc(string | integer)[]obligatoriomsgstringobligatoriotypestringobligatorioinputanyctxobject