Create feed (v1)
https://api.casafari.com/api/v1/listing-alerts/feedsLegacy API (api.casafari.com). Una ruta de la API existente para clientes de Casafari con contrato, no de la plataforma. En la plataforma: todavía no hay ruta de plataforma.
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
Create alerts feed for currently authenticated user.
Feed is a predefined set of conditions to filter alerts by.
The id of created feed then should be used as URL parameter for
get alerts by feed endpoint
to get alerts filtered by feed filter conditions.
Cuerpo de la solicitud
Content type application/json. Opcional. Tipo: object.
namestringobligatoriofilterobjectobligatorio50 propiedades
operationstringobligatoriosale rentlocation_idsinteger[]GET /v1/locations/search).custom_locationobject[]custom_locations en su lugar.2 propiedades
latitudenumberobligatoriolongitudenumberobligatoriocustom_locationsobject[][]2 propiedades
latitudenumberobligatoriolongitudenumberobligatoriotypesstring[]40 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 other_commercial restaurant werkstatt plot urban_plot rural_plot room other garage parking apartment_building office_building mix_use_buildingconditionsstring[]used, ruin, very-good, new, other.used ruin very-good new otheralert_date_fromcadena (fecha)YYYY-MM-DD) del periodo para las alertas de interés.alert_date_tocadena (fecha)YYYY-MM-DD) del periodo para las alertas de interés.created_at_fromcadena (fecha y hora)YYYY-MM-DDTHH:mm:ss) para filtrar las alertas según su creación en la base de datos (UTC). Resulta útil para la sincronización incremental y evitar la obtención de datos ya recuperados.created_at_tocadena (fecha y hora)YYYY-MM-DDTHH:mm:ss) para filtrar las alertas según su creación en la base de datos (UTC). Resulta útil para la sincronización incremental y evitar la obtención de datos ya recuperados.created_at_with_photos_fromcadena (fecha y hora)created_at_with_photos_tocadena (fecha y hora)statusesstring[]active reserved hold sold rentedprice_fromintegerprice_tointegerprice_per_sqm_fromintegerprice_per_sqm_tointegerbedrooms_fromintegerbedrooms_tointegerbathrooms_fromintegerbathrooms_tointegertotal_area_fromintegertotal_area_tointegerplot_area_fromintegerplot_area_tointegerconstruction_year_fromintegerconstruction_year_tointegerfloorstringfloors en su lugar.no_floor ground middle topfloorsstring[]no_floor ground middle toporientationstringexterior interiorviewstringviews en su lugar.water landscape city golf parkviewsstring[]water landscape city golf parkdirectionstringdirections en su lugar.north south east westdirectionsstring[]north south east westcharacteristicsstring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityalert_subtypesstring[]new price_up price_down reserved delisted soldprivatebooleanauctionbooleanbankbooleannew_developmentbooleanlisting_agentsstring[]with_agenciesstring[]without_agenciesstring[]exclusivebooleanprivate, with_agencies, without_agencies.ref_numbersstring[]has_phonebooleanphone.has_emailbooleanhas_agency_namebooleanproperty_idsinteger[]listing_idsinteger[]Ejemplo de solicitud
Solo marcadores de posición: reemplace el token y los valores por los suyos.
curl -X POST "https://api.casafari.com/api/v1/listing-alerts/feeds" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Apartments for sale in Cascais, Oeiras, Lisbon",
"filter": {
"operation": "sale",
"types": [
"apartment",
"studio",
"duplex",
"penthouse"
],
"location_ids": [
2942,
1861,
1600
],
"conditions": [
"used",
"very-good",
"new"
],
"statuses": [
"active",
"reserved"
],
"price_from": 150000,
"price_to": 800000,
"price_per_sqm_from": 2000,
"price_per_sqm_to": 8000,
"bedrooms_from": 1,
"bedrooms_to": 3,
"total_area_from": 30,
"total_area_to": 130,
"construction_year_from": 1950,
"floors": [
"middle",
"top"
],
"views": [
"city"
],
"directions": [
"west",
"south"
],
"characteristics": [
"balcony",
"elevator",
"parking"
],
"private": false,
"new_development": false,
"has_agency_name": true,
"has_email": false,
"without_agencies": [
"Airbnb",
"Casa.Sapo"
]
}
}'Respuestas
201 Created
Tipo: object.
Mostrar la estructura de respuesta (58 campos)
idintegernamestringobligatoriofilterobjectobligatorio50 propiedades
operationstringobligatoriosale rentlocation_idsinteger[]GET /v1/locations/search).custom_locationobject[]custom_locations en su lugar.2 propiedades
latitudenumberobligatoriolongitudenumberobligatoriocustom_locationsobject[][]2 propiedades
latitudenumberobligatoriolongitudenumberobligatoriotypesstring[]40 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 other_commercial restaurant werkstatt plot urban_plot rural_plot room other garage parking apartment_building office_building mix_use_buildingconditionsstring[]used, ruin, very-good, new, other.used ruin very-good new otheralert_date_fromcadena (fecha)YYYY-MM-DD) del periodo para las alertas de interés.alert_date_tocadena (fecha)YYYY-MM-DD) del periodo para las alertas de interés.created_at_fromcadena (fecha y hora)YYYY-MM-DDTHH:mm:ss) para filtrar las alertas según su creación en la base de datos (UTC). Resulta útil para la sincronización incremental y evitar la obtención de datos ya recuperados.created_at_tocadena (fecha y hora)YYYY-MM-DDTHH:mm:ss) para filtrar las alertas según su creación en la base de datos (UTC). Resulta útil para la sincronización incremental y evitar la obtención de datos ya recuperados.created_at_with_photos_fromcadena (fecha y hora)created_at_with_photos_tocadena (fecha y hora)statusesstring[]active reserved hold sold rentedprice_fromintegerprice_tointegerprice_per_sqm_fromintegerprice_per_sqm_tointegerbedrooms_fromintegerbedrooms_tointegerbathrooms_fromintegerbathrooms_tointegertotal_area_fromintegertotal_area_tointegerplot_area_fromintegerplot_area_tointegerconstruction_year_fromintegerconstruction_year_tointegerfloorstringfloors en su lugar.no_floor ground middle topfloorsstring[]no_floor ground middle toporientationstringexterior interiorviewstringviews en su lugar.water landscape city golf parkviewsstring[]water landscape city golf parkdirectionstringdirections en su lugar.north south east westdirectionsstring[]north south east westcharacteristicsstring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityalert_subtypesstring[]new price_up price_down reserved delisted soldprivatebooleanauctionbooleanbankbooleannew_developmentbooleanlisting_agentsstring[]with_agenciesstring[]without_agenciesstring[]exclusivebooleanprivate, with_agencies, without_agencies.ref_numbersstring[]has_phonebooleanphone.has_emailbooleanhas_agency_namebooleanproperty_idsinteger[]listing_idsinteger[]usercadena (correo electrónico)Ejemplo de la descripción de la API (arrays extensos abreviados)
{
"id": 887,
"user": "user@email.com",
"name": "Apartments for sale in Cascais, Oeiras, Lisbon",
"filter": {
"operation": "sale",
"types": [
"apartment",
"studio"
],
"location_ids": [
2942,
1861
],
"conditions": [
"used",
"very-good"
],
"statuses": [
"active",
"reserved"
],
"price_from": 150000,
"price_to": 800000,
"price_per_sqm_from": 2000,
"price_per_sqm_to": 8000,
"bedrooms_from": 1,
"bedrooms_to": 3,
"total_area_from": 30,
"total_area_to": 130,
"construction_year_from": 1950,
"floors": [
"middle",
"top"
],
"views": [
"city"
],
"directions": [
"west",
"south"
],
"characteristics": [
"balcony",
"elevator"
],
"private": false,
"new_development": false,
"has_agency_name": true,
"has_email": false,
"without_agencies": [
"Airbnb",
"Casa.Sapo"
]
}
}400 Solicitud incorrecta
Tipo: object.
Mostrar la estructura de la respuesta (1 campo)
errorsobject401 No autorizado
Tipo: object.
Mostrar la estructura de la respuesta (1 campo)
detailstring403 Prohibido
Tipo: object.
Mostrar la estructura de la respuesta (1 campo)
detailstring