Back to top

RESTful API of public endpoints

Headers

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

Accept: application/json

And for requests with body:

Content-Type: application/json

Listings

Create Properties

Create new property
POST/public/listings/properties

Example URI

POST https://monolith.spotahome.com/api/public/listings/properties
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "type": "apartment",
  "location": {
    "addressLine1": "Avenida de la Palmera, 60",
    "addressLine2": "1º Izquierda",
    "city": "Sevilla",
    "cityId": "seville",
    "postalCode": "41013",
    "latitude": 37.356508,
    "longitude": -5.983941
  },
  "ownerId": "aaaa-bbbb-cccc-dddd",
  "totalUnits": 10,
  "rentableUnits": 10
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "apartment",
        "studio",
        "roomShared",
        "residence"
      ]
    },
    "location": {
      "type": "object",
      "properties": {
        "addressLine1": {
          "type": "string"
        },
        "addressLine2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "cityId": {
          "type": "string",
          "enum": [
            "seville",
            "madrid",
            "barcelona",
            "bilbao",
            "valencia",
            "granada",
            "brussels",
            "dublin",
            "london",
            "rome",
            "milan",
            "paris",
            "lyon",
            "dubai",
            "berlin",
            "vienna",
            "istanbul",
            "turin",
            "bologna",
            "florence"
          ]
        },
        "postalCode": {
          "type": "string"
        },
        "latitude": {
          "type": "number",
          "description": "Between -90 and 90"
        },
        "longitude": {
          "type": "number",
          "description": "Between -180 and 180"
        }
      },
      "required": [
        "addressLine1",
        "city",
        "cityId",
        "postalCode",
        "latitude",
        "longitude"
      ]
    },
    "ownerId": {
      "type": "string"
    },
    "totalUnits": {
      "type": "number"
    },
    "rentableUnits": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "location",
    "ownerId",
    "totalUnits",
    "rentableUnits"
  ]
}
Response  201
HideShow
Headers
Location: /listings/properties/aaaa-bbbb-cccc-dddd
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "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"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "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"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Internal Server Error",
  "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"
  ]
}

Accounts

Create Account

Create new account
POST/public/landlords/accounts

Example URI

POST https://monolith.spotahome.com/api/public/landlords/accounts
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Requester: requester@spotahome.com
Body
{
  "accountId": "1234567",
  "firstName": "Homer",
  "lastName": "Simpson",
  "phone": "+62558124511",
  "email": "homer@simpson.es",
  "address": "Evergreen Terrace",
  "zipCode": "56481",
  "accountName": "Bart",
  "accountEmail": "bart@simpson.es",
  "notes": "notes here",
  "type": "private",
  "city": "madrid",
  "countryCode": "ES",
  "verificationCode": "12345"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "accountId": {
      "type": "string"
    },
    "firstName": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "address": {
      "type": "string"
    },
    "zipCode": {
      "type": "string"
    },
    "accountName": {
      "type": "string"
    },
    "accountEmail": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "private",
        "real_estate_agency",
        "property_manager",
        "subletter"
      ]
    },
    "city": {
      "type": [
        "string",
        "null"
      ]
    },
    "countryCode": {
      "type": [
        "string",
        "null"
      ]
    },
    "verificationCode": {
      "type": "string"
    }
  },
  "required": [
    "firstName",
    "lastName",
    "phone",
    "email",
    "accountName",
    "accountEmail",
    "type"
  ]
}
Response  201
HideShow
Headers
Location: /landlords/accounts/aaaa-bbbb-cccc-dddd
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "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"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "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"
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Forbidden access",
  "status": 403,
  "title": "Forbidden",
  "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"
  ]
}
Response  409
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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"
  ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Internal Server Error",
  "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"
  ]
}

Plans

Plans

Get all plans
GET/plans

Example URI

GET https://monolith.spotahome.com/api/plans
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "standard": {
    "hasVetting": "false",
    "hasRentCollection": "false"
  },
  "premium": {
    "hasVetting": "true",
    "hasRentCollection": "false"
  },
  "plus": {
    "hasVetting": "true",
    "hasRentCollection": "true"
  },
  "allIn": {
    "hasVetting": "true",
    "hasRentCollection": "true"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "standard": {
      "type": "object",
      "properties": {
        "hasVetting": {
          "type": "string"
        },
        "hasRentCollection": {
          "type": "string"
        }
      }
    },
    "premium": {
      "type": "object",
      "properties": {
        "hasVetting": {
          "type": "string"
        },
        "hasRentCollection": {
          "type": "string"
        }
      }
    },
    "plus": {
      "type": "object",
      "properties": {
        "hasVetting": {
          "type": "string"
        },
        "hasRentCollection": {
          "type": "string"
        }
      }
    },
    "allIn": {
      "type": "object",
      "properties": {
        "hasVetting": {
          "type": "string"
        },
        "hasRentCollection": {
          "type": "string"
        }
      }
    }
  }
}

Generated by aglio on 27 Nov 2025