Back to top

RESTful API of Location Bounded Context

Headers

As API is working with JSON every request must add the following headers:

Accept: application/json

Cities

Cities

Retrieve all cities
GET/location/cities

Example URI

GET https://monolith.spotahome.com/api/location/cities
Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "valencia": {
        "country": "spain",
        "minimumStaying": 30,
        "numberOfRentableUnits": 962,
        "areaId": 1,
        "center": {
            "lng": 10.10,
            "lat": 20.10,
        },
        "limits": {
            "sw": {
                "lng": 30.10,
                "lat": 40.10,
            }
            "ne": {
                 "lng": 50.10,
                 "lat": 60.10,
            },
        }
    },
    "vienna": {
        "country": "austria",
        "minimumStaying": 30,
        "numberOfRentableUnits": 43,
        "areaId": 2,
        "center": {
            "lng": 10.15,
            "lat": 20.15,
        },
        "limits": {
            "sw": {
                "lng": 30.15,
                "lat": 40.15,
            }
            "ne": {
                 "lng": 50.15,
                 "lat": 60.15,
            },
        }
    },
    "rome": {
        "country": "italy",
        "minimumStaying": 30,
        "numberOfRentableUnits": 1890,
        "areaId": 3,
        "center": {
            "lng": 10.20,
            "lat": 20.20,
        },
        "limits": {
            "sw": {
                "lng": 30.20,
                "lat": 40.20,
            }
            "ne": {
                 "lng": 50.20,
                 "lat": 60.20,
            },
        }
    },
    "paris": {
        "country": "france",
        "minimumStaying": 30,
        "numberOfRentableUnits": 701,
        "areaId": 4,
        "center": {
            "lng": 10.25,
            "lat": 20.25,
        },
        "limits": {
            "sw": {
                "lng": 30.25,
                "lat": 40.25,
            }
            "ne": {
                 "lng": 50.25,
                 "lat": 60.25,
            },
        }
    },
    "milan": {
        "country": "italy",
        "minimumStaying": 30,
        "numberOfRentableUnits": 1884,
        "areaId": 5,
        "center": {
            "lng": 10.30,
            "lat": 20.30,
        },
        "limits": {
            "sw": {
                "lng": 30.30,
                "lat": 40.30,
            }
            "ne": {
                 "lng": 50.30,
                 "lat": 60.30,
            },
        }
    },
    "seville": {
        "country": "spain",
        "minimumStaying": 60,
        "numberOfRentableUnits": 276,
        "areaId": 6,
        "center": {
            "lng": 10.35,
            "lat": 20.35,
        },
        "limits": {
            "sw": {
                "lng": 30.35,
                "lat": 40.35,
            }
            "ne": {
                 "lng": 50.35,
                 "lat": 60.35,
            },
        }
    },
    "barcelona": {
        "country": "spain",
        "minimumStaying": 32,
        "numberOfRentableUnits": 1813,
        "areaId": 7,
        "center": {
            "lng": 10.40,
            "lat": 20.40,
        },
        "limits": {
            "sw": {
                "lng": 30.40,
                "lat": 40.40,
            }
            "ne": {
                 "lng": 50.40,
                 "lat": 60.40,
            },
        }
    },
    "lyon": {
        "country": "france",
        "minimumStaying": 30,
        "numberOfRentableUnits": 209,
        "areaId": 8,
        "center": {
            "lng": 10.45,
            "lat": 20.45,
        },
        "limits": {
            "sw": {
                "lng": 30.45,
                "lat": 40.45,
            }
            "ne": {
                 "lng": 50.45,
                 "lat": 60.45,
            },
        }
    },
    "bilbao": {
        "country": "spain",
        "minimumStaying": 30,
        "numberOfRentableUnits": 74,
        "areaId": 9,
        "center": {
            "lng": 10.50,
            "lat": 20.50,
        },
        "limits": {
            "sw": {
                "lng": 30.50,
                "lat": 40.50,
            }
            "ne": {
                 "lng": 50.50,
                 "lat": 60.50,
            },
        }
    },
    "brussels": {
        "country": "belgium",
        "minimumStaying": 30,
        "numberOfRentableUnits": 1163,
        "areaId": 10,
        "center": {
            "lng": 10.55,
            "lat": 20.55,
        },
        "limits": {
            "sw": {
                "lng": 30.55,
                "lat": 40.55,
            }
            "ne": {
                 "lng": 50.55,
                 "lat": 60.55,
            },
        }
    },
    "dubai": {
        "country": "uae",
        "minimumStaying": 30,
        "numberOfRentableUnits": 217,
        "areaId": 11,
        "center": {
            "lng": 10.60,
            "lat": 20.60,
        },
        "limits": {
            "sw": {
                "lng": 30.60,
                "lat": 40.60,
            }
            "ne": {
                 "lng": 50.60,
                 "lat": 60.60,
            },
        }
    },
    "berlin": {
        "country": "germany",
        "minimumStaying": 30,
        "numberOfRentableUnits": 160,
        "areaId": 12,
        "center": {
            "lng": 10.65,
            "lat": 20.65,
        },
        "limits": {
            "sw": {
                "lng": 30.65,
                "lat": 40.65,
            }
            "ne": {
                 "lng": 50.65,
                 "lat": 60.65,
            },
        }
    },
    "london": {
        "country": "uk",
        "minimumStaying": 30,
        "numberOfRentableUnits": 1996,
        "areaId": 13,
        "center": {
            "lng": 10.70,
            "lat": 20.70,
        },
        "limits": {
            "sw": {
                "lng": 30.70,
                "lat": 40.70,
            }
            "ne": {
                 "lng": 50.70,
                 "lat": 60.70,
            },
        }
    },
    "dublin": {
        "country": "ireland",
        "minimumStaying": 30,
        "numberOfRentableUnits": 542,
        "areaId": 14,
        "center": {
            "lng": 10.75,
            "lat": 20.75,
        },
        "limits": {
            "sw": {
                "lng": 30.75,
                "lat": 40.75,
            }
            "ne": {
                 "lng": 50.75,
                 "lat": 60.75,
            },
        }
    },
    "granada": {
        "country": "spain",
        "minimumStaying": 60,
        "numberOfRentableUnits": 581,
        "areaId": 15,
        "center": {
            "lng": 10.80,
            "lat": 20.80,
        },
        "limits": {
            "sw": {
                "lng": 30.80,
                "lat": 40.80,
            }
            "ne": {
                 "lng": 50.80,
                 "lat": 60.80,
            },
        }
    },
    "madrid": {
        "country": "spain",
        "minimumStaying": 30,
        "numberOfRentableUnits": 3980,
        "areaId": 16,
        "center": {
            "lng": 10.85,
            "lat": 20.85,
        },
        "limits": {
            "sw": {
                "lng": 30.85,
                "lat": 40.85,
            }
            "ne": {
                 "lng": 50.85,
                 "lat": 60.85,
            },
        }
    }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 500,
  "title": "Internal Server Error",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Locales

Locales

Retrieve all the locales available
GET/locales

Example URI

GET https://monolith.spotahome.com/api/locales
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "isoCode": "en",
    "label": "English",
    "languageSwitcherEnabled": true,
    "automaticTranslationSupported": true
  },
  {
    "isoCode": "es",
    "label": "Español",
    "languageSwitcherEnabled": true,
    "automaticTranslationSupported": true
  }
]
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 500,
  "title": "Internal Server Error",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Generated by aglio on 27 Nov 2025