Back to top

BOOKINGS API OVERVIEW

Bookings Hypermedia API is designed to give you complete control over the Booking’s process, being able to move a reservation from a request to the booking itself. API calls use the standard HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources. Responses follow the hypermedia JSON format HAL.

BOOKING JOURNEY

*Booking Intention: The Booking Journey starts with this entity that captures a user intention to book after they land to the booking form (even before completing the booking lead).

Booking Lead: a Tenant interested in booking a property, which is identified by the system at the moment that she fills up the form with her personal information in addition to a short questionary.

Booking Request: In the next step the Tenant must enter a valid Payment Method. A request can have different stages depending on its type: post paid, bank transfer, instant, pre paid.

Booking: If the Booking Request is successfully charged it turns into a Booking. A Booking means that the property is set as occupied for the selected dates.

BOOKING REQUEST TYPES

Post Paid: No money is charged at the moment of the request but once it is accepted by the landlord.

Pre Paid: A fee plus the first month rent is held at the moment of the request and it is captured once the request is accepted by the Landlord.

Bank Transfer: They money is sent by the Tenant through the bank so it will take longer until reach our account. The Booking Request process does not start until the money reaches our bank account.

Instant: No acceptance by landlord is required. Therefore, money is charged as soon as a valid Payment Method is introduced by the Tenant.

PRICING FORMAT

All the pricing details are represented in cents.

REQUESTS AND RESPONSES

AUTHENTICATION

All requests are performed via HTTPS and use a JWT token in an Authorization header for each request.

Authorization: aa.bb.cc

There are two different roles supported by the system:

  • ACCOMMODATION_PROVIDER_ROLE: Landlords can list their own bookings.

  • BOOKING_AGENT: Can operate with all the endpoints.

REQUEST FORMAT

The only supported content type is JSON.

Content-Type: application/json

RESPONSE FORMAT

The response content type is HAL JSON.

Accept: application/hal+json

ERROR FORMAT

Errors will use the most appropriate HTTP status code contained in an API Problem response.

{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}

Booking Intention

Create Booking Intention

Create Booking Intention
POST/booking-intentions

Authorization: protected for uai_tenant role.

Example URI

POST https://bookings.spotahome.com/api/booking-intentions
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "listingId": "12345",
  "checkIn": "yyyy-mm-dd",
  "checkOut": "yyyy-mm-dd",
  "platformSource": "spotahome",
  "deviceInfoType": "native",
  "deviceInfoOs": "Android"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listingId": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "platformSource": {
      "type": "string",
      "enum": [
        "spotahome",
        "erasmusu"
      ]
    },
    "deviceInfoType": {
      "type": "string",
      "enum": [
        "native",
        "smartphone",
        "tablet",
        "desktop"
      ]
    },
    "deviceInfoOs": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Booking Lead

Create Booking Lead

Create Booking Lead
POST/booking-leads

Authorization: protected for uai_tenant role in authorization header.

Example URI

POST https://bookings.spotahome.com/api/booking-leads
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "platformSource": "spotahome",
  "tenantName": "Tenant Name",
  "tenantEmail": "tenant@email.com",
  "tenantPhone": "666999000",
  "tenantBirthday": "yyyy-mm-dd",
  "tenantGender": "female",
  "tenantCountry": "ES",
  "checkIn": "yyyy-mm-dd",
  "checkOut": "yyyy-mm-dd",
  "listing": "12345",
  "pricingId": "98593aed-57f5-4d84-95a2-76c28dfe57d9",
  "deviceInfoType": "native",
  "deviceInfoOs": "Android"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "platformSource": {
      "type": "string",
      "enum": [
        "spotahome",
        "erasmusu"
      ]
    },
    "tenantName": {
      "type": "string"
    },
    "tenantEmail": {
      "type": "string"
    },
    "tenantPhone": {
      "type": "string"
    },
    "tenantBirthday": {
      "type": "string"
    },
    "tenantGender": {
      "type": "string",
      "enum": [
        "female",
        "male"
      ],
      "description": "Tenant Gender"
    },
    "tenantCountry": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "listing": {
      "type": "string"
    },
    "pricingId": {
      "type": "string"
    },
    "deviceInfoType": {
      "type": "string",
      "enum": [
        "native",
        "smartphone",
        "tablet",
        "desktop"
      ]
    },
    "deviceInfoOs": {
      "type": "string"
    }
  },
  "required": [
    "tenantGender"
  ]
}
Response  201
HideShow
Headers
Location: /booking-leads/8f2dbe69-b68f-4423-bc93-b8b036727a032
Response  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Forbidden",
  "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/problem+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/problem+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"
  ]
}

Get Booking Lead

Get Booking Lead
GET/booking-leads/{id}

This endpoint returns the information of a booking lead

Example URI

GET https://bookings.spotahome.com/api/booking-leads/id
URI Parameters
HideShow
id
string (required) 

Id of a Booking Lead.

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "_links": {
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "id": "305e7971-4006-4554-a962-17278a136ba3",
  "locator": "305E7",
  "listing": "123456",
  "tenantName": "The Name",
  "tenantEmail": "test@email.com",
  "tenantPhone": "+34650213569",
  "tenantBirthday": "2000-03-26",
  "tenantGender": "male",
  "tenantCountry": "ES",
  "checkIn": "2017-01-01",
  "checkOut": "2010-06-01",
  "couple": true,
  "message": "text message",
  "houseRulesChecked": true,
  "houseRulesPassed": false,
  "houseRulesSuitability": {
    "genderSuitable": true,
    "coupleSuitable": false,
    "occupationSuitable": true
  },
  "converted": true,
  "pricingId": "2875083a-2b12-4ffd-b248-a18911411213",
  "userId": "2b12083a-2875-a189-1213-4ffd1141b248",
  "platformSource": "spotahome",
  "exclusivityType": "basic",
  "creationDate": "2021-01-21T14:19:34+00:00",
  "preAcceptedAt": "2021-01-21T14:19:34+00:00"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "id": {
      "type": "string"
    },
    "locator": {
      "type": "string"
    },
    "listing": {
      "type": "string"
    },
    "tenantName": {
      "type": "string"
    },
    "tenantEmail": {
      "type": "string"
    },
    "tenantPhone": {
      "type": "string"
    },
    "tenantBirthday": {
      "type": "string"
    },
    "tenantGender": {
      "type": "string"
    },
    "tenantCountry": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "couple": {
      "type": "boolean"
    },
    "message": {
      "type": "string"
    },
    "houseRulesChecked": {
      "type": "boolean"
    },
    "houseRulesPassed": {
      "type": "boolean"
    },
    "houseRulesSuitability": {
      "type": "object",
      "properties": {
        "genderSuitable": {
          "type": "boolean"
        },
        "coupleSuitable": {
          "type": "boolean"
        },
        "occupationSuitable": {
          "type": "boolean"
        }
      }
    },
    "converted": {
      "type": "boolean"
    },
    "pricingId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "platformSource": {
      "type": "string"
    },
    "exclusivityType": {
      "type": "string"
    },
    "creationDate": {
      "type": "string"
    },
    "preAcceptedAt": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Get all Booking Leads by query params

Get all Booking Leads by query params
GET/booking-leads{?page,itemsPerPage}

This endpoint returns a list of Booking Leads that satisfy query params

Example URI

GET https://bookings.spotahome.com/api/booking-leads?page=1&itemsPerPage=1
URI Parameters
HideShow
listingIds
array[string] (optional) Example: 8BA4E
converted
boolean (optional) Example: true
creationDateFrom
string (optional) Example: 1985-02-12
creationDateTo
string (optional) Example: 1985-02-12
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 1
Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/hal+json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "sah:booking-leads": [
      {
        "_links": {
          "self": {
            "href": "https://monolith.spotahome.com/api/{resource}/{id}"
          }
        },
        "id": "305e7971-4006-4554-a962-17278a136ba3",
        "locator": "305E7",
        "listing": "123456",
        "tenantName": "The Name",
        "tenantEmail": "test@email.com",
        "tenantPhone": "+34650213569",
        "tenantBirthday": "2000-03-26",
        "tenantGender": "male",
        "tenantCountry": "ES",
        "checkIn": "2017-01-01",
        "checkOut": "2010-06-01",
        "couple": true,
        "message": "text message",
        "houseRulesChecked": true,
        "houseRulesPassed": false,
        "houseRulesSuitability": {
          "genderSuitable": true,
          "coupleSuitable": false,
          "occupationSuitable": true
        },
        "converted": true,
        "pricingId": "2875083a-2b12-4ffd-b248-a18911411213",
        "userId": "2b12083a-2875-a189-1213-4ffd1141b248",
        "platformSource": "spotahome",
        "exclusivityType": "basic",
        "creationDate": "2021-01-21T14:19:34+00:00",
        "preAcceptedAt": "2021-01-21T14:19:34+00:00"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "sah:booking-leads": {
          "type": "array",
          "description": "A list of Booking Leads"
        }
      }
    }
  }
}
Response  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Update social info

Update social info
PUT/booking-leads/{bookingLeadId}/social-info

Example URI

PUT https://bookings.spotahome.com/api/booking-leads/test-id-0/social-info
URI Parameters
HideShow
bookingLeadId
string (required) Example: test-id-0

Id of a Booking Lead.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "couple": false,
  "message": "Message for landlord from tenant",
  "occupation": "student",
  "occupationDetails": "Stanford University"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "couple": {
      "type": "boolean",
      "description": "Tenant travelling with couple"
    },
    "message": {
      "type": "string",
      "description": "Tenant's message for landlord"
    },
    "occupation": {
      "type": "string",
      "enum": [
        "student",
        "professional"
      ],
      "description": "Tenant's occupation"
    },
    "occupationDetails": {
      "type": "string",
      "description": "Tenant's occupation details like company name, university name, job title"
    }
  }
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

View booking lead converted status

View booking lead converted status
GET/booking-leads/{bookingLeadId}/converted

Example URI

GET https://bookings.spotahome.com/api/booking-leads/test-id-0/converted
URI Parameters
HideShow
bookingLeadId
string (required) Example: test-id-0

Id of a Booking Lead.

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Body
{
  "converted": false
}
Schema
{
  "type": "object",
  "properties": {
    "converted": {
      "type": "boolean",
      "description": "Tenant travelling with couple"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Tenant booking leads

Tenant booking leads
GET/tenant/me/booking-leads?converted,creationDateFrom,creationDateTo

Example URI

GET https://bookings.spotahome.com/api/tenant/me/booking-leads?converted,creationDateFrom,creationDateTo
URI Parameters
HideShow
converted
boolean (optional) Example: true
creationDateFrom
string (optional) Example: 1985-02-12
creationDateTo
string (optional) Example: 2019-10-10
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "sah:booking-leads": [
      {
        "_links": {
          "self": {
            "href": "https://monolith.spotahome.com/api/{resource}/{id}"
          }
        },
        "id": "305e7971-4006-4554-a962-17278a136ba3",
        "locator": "305E7",
        "listing": "123456",
        "tenantName": "The Name",
        "tenantEmail": "test@email.com",
        "tenantPhone": "+34650213569",
        "tenantBirthday": "2000-03-26",
        "tenantGender": "male",
        "tenantCountry": "ES",
        "checkIn": "2017-01-01",
        "checkOut": "2010-06-01",
        "couple": true,
        "message": "text message",
        "houseRulesChecked": true,
        "houseRulesPassed": false,
        "houseRulesSuitability": {
          "genderSuitable": true,
          "coupleSuitable": false,
          "occupationSuitable": true
        },
        "converted": true,
        "pricingId": "2875083a-2b12-4ffd-b248-a18911411213",
        "userId": "2b12083a-2875-a189-1213-4ffd1141b248",
        "platformSource": "spotahome",
        "exclusivityType": "basic",
        "creationDate": "2021-01-21T14:19:34+00:00",
        "preAcceptedAt": "2021-01-21T14:19:34+00:00"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "sah:booking-leads": {
          "type": "array",
          "description": "A list of Booking Leads"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/problem+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  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Forbidden",
  "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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Landlord booking leads

Landlord booking leads
GET/landlord/me/booking-leads?converted,creationDateFrom,creationDateTo,listingIds

Example URI

GET https://bookings.spotahome.com/api/landlord/me/booking-leads?converted,creationDateFrom,creationDateTo,listingIds
URI Parameters
HideShow
converted
boolean (optional) Example: false
creationDateFrom
string (optional) Example: 1985-02-12
creationDateTo
string (optional) Example: 2019-10-10
listingIds
array[string] (required) Example: 79950
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "sah:booking-leads": [
      {
        "_links": {
          "self": {
            "href": "https://monolith.spotahome.com/api/{resource}/{id}"
          }
        },
        "id": "305e7971-4006-4554-a962-17278a136ba3",
        "locator": "305E7",
        "listing": "123456",
        "tenantName": "The Name",
        "tenantEmail": "test@email.com",
        "tenantPhone": "+34650213569",
        "tenantBirthday": "2000-03-26",
        "tenantGender": "male",
        "tenantCountry": "ES",
        "checkIn": "2017-01-01",
        "checkOut": "2010-06-01",
        "couple": true,
        "message": "text message",
        "houseRulesChecked": true,
        "houseRulesPassed": false,
        "houseRulesSuitability": {
          "genderSuitable": true,
          "coupleSuitable": false,
          "occupationSuitable": true
        },
        "converted": true,
        "pricingId": "2875083a-2b12-4ffd-b248-a18911411213",
        "userId": "2b12083a-2875-a189-1213-4ffd1141b248",
        "platformSource": "spotahome",
        "exclusivityType": "basic",
        "creationDate": "2021-01-21T14:19:34+00:00",
        "preAcceptedAt": "2021-01-21T14:19:34+00:00"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "sah:booking-leads": {
          "type": "array",
          "description": "A list of Booking Leads"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/problem+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  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Pre-accept Booking Lead

Pre-accept Booking Lead
PUT/landlords/me/booking-leads/{bookingLeadId}/pre-accept

Example URI

PUT https://bookings.spotahome.com/api/landlords/me/booking-leads/0a496f80-fbd8-46f2-8dce-3127fa289e41/pre-accept
URI Parameters
HideShow
bookingLeadId
string (required) Example: 0a496f80-fbd8-46f2-8dce-3127fa289e41

booking lead id

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Create Booking Request from Lead

Create Booking Request from Lead
PUT/booking-leads/{bookingLeadId}/booking-request

Authorization: protected for uai_admin and uai_tenant roles.

Example URI

PUT https://bookings.spotahome.com/api/booking-leads/test-id-0/booking-request
URI Parameters
HideShow
bookingLeadId
string (required) Example: test-id-0

Id of a Booking Lead.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "paymentMethodNonce": "123123",
  "paymentProvider": "braintree",
  "promoCode": "DOUBLEBOOKING",
  "userId": "12345678",
  "paymentDeviceData": "Json_Generated_By_Braintree_Dropin",
  "feeCollectionType": "upfront",
  "rentCollectionType": "none",
  "pricingId": "aa-bb-cc-dd",
  "savePaymentMethod": false,
  "deviceInfoType": "desktop",
  "deviceInfoOs": "GNU/Linux"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "paymentMethodNonce": {
      "type": "string"
    },
    "paymentProvider": {
      "type": "string",
      "enum": [
        "braintree",
        "postponed"
      ]
    },
    "promoCode": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "paymentDeviceData": {
      "type": "string"
    },
    "feeCollectionType": {
      "type": "string",
      "enum": [
        "upfront",
        "monthly"
      ]
    },
    "rentCollectionType": {
      "type": "string",
      "enum": [
        "none",
        "monthly"
      ]
    },
    "pricingId": {
      "type": "string"
    },
    "savePaymentMethod": {
      "type": "boolean",
      "description": "To store the tenant's payment method"
    },
    "deviceInfoType": {
      "type": "string",
      "description": "Device type in which the booking request was converted"
    },
    "deviceInfoOs": {
      "type": "string",
      "description": "Device OS in which the booking request was converted"
    }
  },
  "required": [
    "paymentMethodNonce",
    "paymentProvider",
    "feeCollectionType",
    "rentCollectionType"
  ]
}
Response  201
HideShow
Headers
Location: /booking-requests/8f2dbe69-b68f-4423-bc93-b8b036727a032
Response  402
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The payment is required and could not be performed",
  "status": 402,
  "title": "Payment Required",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
  "providerError": "payment_method_generic_error",
  "vendorErrorCode": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "providerError": {
      "type": "string",
      "enum": [
        "payment_method_generic_error",
        "payment_method_declined_error",
        "payment_method_cvv_error",
        "payment_method_account_error",
        "payment_method_expired_error"
      ]
    },
    "vendorErrorCode": {
      "type": "number",
      "description": "Code from Braintree: Validation Errors (https://developers.braintreepayments.com/reference/general/validation-errors/all/php) or Authorization errors (https://articles.braintreepayments.com/control-panel/transactions/declines#authorization-decline-codes) since we are doing 2 things: creating a customer and authorizing a payment."
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Booking Request

A Booking Request is created at the moment the Tenant introduces a valid Payment Method.

Booking Request Collection

Create Booking Request
POST/booking-requests

This endpoint allows users with a specific role to create a BookingRequest without a Booking Lead

Example URI

POST https://bookings.spotahome.com/api/booking-requests
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "platformSource": "spotahome",
  "listingId": "11111",
  "checkIn": "2018-02-01",
  "checkOut": "2018-07-31",
  "tenantName": "Jane Doe",
  "tenantEmail": "jane.doe@email.com",
  "tenantPhone": "666999000",
  "tenantGender": "female",
  "tenantBirthday": "yyyy-mm-dd",
  "tenantCountry": "ES",
  "isCouple": false,
  "message": "Message",
  "promoCode": "DOUBLEBOOKING",
  "paymentMethod": "paypal",
  "funnelType": "instant"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "platformSource": {
      "type": "string",
      "enum": [
        "spotahome",
        "erasmusu"
      ]
    },
    "listingId": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "tenantName": {
      "type": "string"
    },
    "tenantEmail": {
      "type": "string"
    },
    "tenantPhone": {
      "type": "string"
    },
    "tenantGender": {
      "type": "string",
      "enum": [
        "female",
        "male"
      ],
      "description": "Tenant Gender"
    },
    "tenantBirthday": {
      "type": "string"
    },
    "tenantCountry": {
      "type": "string"
    },
    "isCouple": {
      "type": "boolean"
    },
    "message": {
      "type": "string"
    },
    "promoCode": {
      "type": "string"
    },
    "paymentMethod": {
      "type": "string",
      "enum": [
        "paypal",
        "bank_transfer",
        "credit_card"
      ],
      "description": "Payment method chosen for the Booking Request"
    },
    "funnelType": {
      "type": "string",
      "enum": [
        "instant",
        "partner",
        "post_paid",
        "pre_paid",
        "relocation"
      ],
      "description": "Type of funnel chosen for the Booking Request"
    }
  },
  "required": [
    "listingId",
    "checkIn",
    "checkOut",
    "tenantName",
    "tenantEmail",
    "tenantPhone",
    "tenantGender",
    "tenantBirthday",
    "tenantCountry",
    "isCouple",
    "promoCode",
    "paymentMethod",
    "funnelType"
  ]
}
Response  201
HideShow
Headers
Location: /booking-requests/110594
Response  401
HideShow
Headers
Content-Type: application/problem+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  409
HideShow
Headers
Content-Type: application/problem+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/problem+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"
  ]
}

Search Booking Requests
GET/booking-requests{?secret,locator,ric,email,cities,agents,states,listings,checkInFrom,checkInTo,checkOutFrom,checkOutTo,creationDateFrom,creationDateTo,closedDateFrom,closedDateTo,page,itemsPerPage,sortBy,sortType}

Example URI

GET https://bookings.spotahome.com/api/booking-requests?secret=abcd&locator=54DA2&ric=H3&email=test@test.com&cities=madrid&agents=593a803d422ff6f3068b4567&states=BookingChargeWasAuthorized&listings=12345678&checkInFrom=2017-01-01&checkInTo=2017-10-01&checkOutFrom=2017-07-01&checkOutTo=2017-10-01&creationDateFrom=2018-01-01&creationDateTo=2018-02-01&closedDateFrom=2018-02-01&closedDateTo=2018-02-01&page=1&itemsPerPage=1&sortBy=moveInDate&sortType=asc
URI Parameters
HideShow
email
string (optional) Example: test@test.com
cities
array[string] (optional) Example: madrid
agents
array[string] (optional) Example: 593a803d422ff6f3068b4567
states
array[string] (optional) Example: BookingChargeWasAuthorized
listings
array[string] (optional) Example: 12345678
secret
string (optional) Example: abcd
locator
string (optional) Example: 54DA2
ric
string (optional) Example: H3
viewed
boolean (optional) Example: true
checkInFrom
string (optional) Example: 2017-01-01
checkInTo
string (optional) Example: 2017-10-01
checkOutFrom
string (optional) Example: 2017-07-01
checkOutTo
string (optional) Example: 2017-10-01
landlord
string (optional) Example: 12345
creationDateFrom
string (optional) Example: 2018-01-01
creationDateTo
string (optional) Example: 2018-02-01
closedDateFrom
string (optional) Example: 2018-02-01
closedDateTo
string (optional) Example: 2018-02-01
itemsPerPage
number (optional) Example: 1
page
number (optional) Example: 1
sortBy
enum [string] (optional) Example: moveInDate
  • city

  • tenantEmail

  • moveInDate

  • creationDate

sortType
enum [string] (optional) Example: asc
  • asc

  • desc

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "bookingRequests": [
      {
        "_links": {
          "self": {
            "href": "https://monolith.spotahome.com/api/{resource}/{id}"
          }
        },
        "id": "7980",
        "bookingProcessId": "a4cdee-3fe6aab-bc34",
        "locator": "A4CDE",
        "ric": "H3",
        "referenceCode": "A4CDE-H3",
        "tenantFullName": "Luis Alfredo González",
        "tenantEmail": "test@test.com",
        "city": "madrid",
        "checkIn": "2010-01-01",
        "checkOut": "2010-01-01",
        "reservationPrice": 12000,
        "listing": "123",
        "promoCode": "PROMO",
        "promoPercentage": 50,
        "vat": 2100,
        "currencyCode": "EUR",
        "contractConditions": {
          "monthlyPrice": 45000,
          "downpayment": 25000,
          "seasonalPrice": [
            "10000",
            "10000",
            "5000",
            "5000",
            "5000",
            "5000",
            "5000",
            "5000",
            "5000",
            "8000",
            "8000",
            "8000"
          ],
          "contractDateStart": "2010-01-01",
          "contractDateEnd": "2010-01-01",
          "tenantPayments": [
            "0",
            "49000",
            "49000",
            "49000"
          ],
          "securityDeposit": 56000,
          "adminFee": 30000,
          "downpaymentMaxCapType": "weekly",
          "downpaymentMaxCapValue": 1
        },
        "tenantFeeDiscountPercentage": 25.1,
        "tenantFeeDiscount": 12000,
        "landlordTransferDueDate": "2017-01-01",
        "landlordTransfer": 180000,
        "landlordCommission": {
          "commission": 10.5,
          "type": "percentage"
        },
        "tenantFeeNet": 12000,
        "tenantFeeGross": 12000,
        "landlordFeeNet": 12000,
        "landlordFeeGross": 12000,
        "landlordNoCapFeeNet": 24000,
        "landlordNoCapFeeGross": 24000,
        "landlordFeeOwed": 12000,
        "landlordId": "12000",
        "secret": "356fgh453v653v",
        "tenantPhone": "+34620000000",
        "tenantGender": "male",
        "tenantBirthday": "1980-01-01",
        "tenantCountry": "Spain",
        "couple": true,
        "message": "this is a test",
        "contractDays": 180,
        "contractValue": 180000,
        "pricePerDay": 1200,
        "revenue": 24000,
        "isPaymentMethodRegistered": true,
        "bookingProcess": "'post_paid'",
        "agent": "687687",
        "payments": [
          {
            "instrument": "paypal_account"
          }
        ],
        "state": "'BookingRequestWasCreated'",
        "remark": "'agent comments'",
        "rating": 4,
        "landlordRejectionReason": 1,
        "landlordRejectionMessage": "reason",
        "tenantCancellationReason": 5,
        "originalBrId": "7989",
        "creationDate": "2011-01-01",
        "closedAt": "2019-08-16T13:38:44+0000",
        "notifications": [
          {
            "creation": true,
            "alternative": true,
            "chargeAuthorization": true,
            "landlordConfirmationRequest": true
          }
        ],
        "listingType": "Guaranteed",
        "pricingId": "c524a423-510a-454b-8615-6ab201843335",
        "assignationConfirmed": false,
        "autoAssigned": false,
        "isInstantBooking": false,
        "feeCollectionType": "upfront",
        "rentCollectionType": "none",
        "transactionId": "aabbccdd",
        "paymentProvider": "braintree",
        "exclusivityType": "basic"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "bookingRequests": {
          "type": "array",
          "description": "A list of Booking Requests"
        }
      }
    }
  }
}

Tenant Booking Request Collection

Get Tenant Booking Requests
GET/tenant/me/booking-requests

Return the list of Booking Requests from an authenticated tenant

Example URI

GET https://bookings.spotahome.com/api/tenant/me/booking-requests
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "bookingRequests": [
      {
        "id": "7980",
        "bookingProcessId": "a4cdee-3fe6aab-bc34",
        "secret": "a4cdee3fe6bc34",
        "locator": "A4CDE",
        "ric": "H3",
        "referenceCode": "A4CDE-H3",
        "city": "madrid",
        "listing": "123",
        "tenantEmail": "test@test.com",
        "currencyCode": "EUR",
        "checkIn": "2010-01-01",
        "checkOut": "2010-01-01",
        "contractConditions": {
          "monthlyPrice": 49000,
          "securityDeposit": 56000,
          "adminFee": 30000
        },
        "state": "'BookingRequestWasCreated'",
        "pricingId": "1a6fbe69-b68f-4423-bc93-b8b036727a014",
        "plan": "standard"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "bookingRequests": {
          "type": "array",
          "description": "A list of Booking Requests"
        }
      }
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Booking Request Admin

This endpoint returns sensitive and non-sensitive data related with the booking request, for admins due to it requires authentication

Get Booking Request Admin
GET/admin/booking-requests/{id}

Depending on the stage that the Booking Request is the list of _links can vary, showing the allowed actions at the moment.

Example URI

GET https://bookings.spotahome.com/api/admin/booking-requests/id
URI Parameters
HideShow
id
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "_links": {
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "id": "7980",
  "bookingProcessId": "a4cdee-3fe6aab-bc34",
  "locator": "A4CDE",
  "ric": "H3",
  "referenceCode": "A4CDE-H3",
  "tenantFullName": "Luis Alfredo González",
  "tenantEmail": "test@test.com",
  "city": "madrid",
  "checkIn": "2010-01-01",
  "checkOut": "2010-01-01",
  "reservationPrice": 12000,
  "listing": "123",
  "promoCode": "PROMO",
  "promoPercentage": 50,
  "vat": 2100,
  "currencyCode": "EUR",
  "contractConditions": {
    "monthlyPrice": 45000,
    "downpayment": 25000,
    "seasonalPrice": [
      "10000",
      "10000",
      "5000",
      "5000",
      "5000",
      "5000",
      "5000",
      "5000",
      "5000",
      "8000",
      "8000",
      "8000"
    ],
    "contractDateStart": "2010-01-01",
    "contractDateEnd": "2010-01-01",
    "tenantPayments": [
      "0",
      "49000",
      "49000",
      "49000"
    ],
    "securityDeposit": 56000,
    "adminFee": 30000,
    "downpaymentMaxCapType": "weekly",
    "downpaymentMaxCapValue": 1
  },
  "tenantFeeDiscountPercentage": 25.1,
  "tenantFeeDiscount": 12000,
  "landlordTransferDueDate": "2017-01-01",
  "landlordTransfer": 180000,
  "landlordCommission": {
    "commission": 10.5,
    "type": "percentage"
  },
  "tenantFeeNet": 12000,
  "tenantFeeGross": 12000,
  "landlordFeeNet": 12000,
  "landlordFeeGross": 12000,
  "landlordNoCapFeeNet": 24000,
  "landlordNoCapFeeGross": 24000,
  "landlordFeeOwed": 12000,
  "landlordId": "12000",
  "secret": "356fgh453v653v",
  "tenantPhone": "+34620000000",
  "tenantGender": "male",
  "tenantBirthday": "1980-01-01",
  "tenantCountry": "Spain",
  "couple": true,
  "message": "this is a test",
  "contractDays": 180,
  "contractValue": 180000,
  "pricePerDay": 1200,
  "revenue": 24000,
  "isPaymentMethodRegistered": true,
  "bookingProcess": "'post_paid'",
  "agent": "687687",
  "payments": [
    {
      "instrument": "paypal_account"
    }
  ],
  "state": "'BookingRequestWasCreated'",
  "remark": "'agent comments'",
  "rating": 4,
  "landlordRejectionReason": 1,
  "landlordRejectionMessage": "reason",
  "tenantCancellationReason": 5,
  "originalBrId": "7989",
  "creationDate": "2011-01-01",
  "closedAt": "2019-08-16T13:38:44+0000",
  "notifications": [
    {
      "creation": true,
      "alternative": true,
      "chargeAuthorization": true,
      "landlordConfirmationRequest": true
    }
  ],
  "listingType": "Guaranteed",
  "pricingId": "c524a423-510a-454b-8615-6ab201843335",
  "assignationConfirmed": false,
  "autoAssigned": false,
  "isInstantBooking": false,
  "feeCollectionType": "upfront",
  "rentCollectionType": "none",
  "transactionId": "aabbccdd",
  "paymentProvider": "braintree",
  "exclusivityType": "basic"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "id": {
      "type": "string"
    },
    "bookingProcessId": {
      "type": "string"
    },
    "locator": {
      "type": "string"
    },
    "ric": {
      "type": "string"
    },
    "referenceCode": {
      "type": "string"
    },
    "tenantFullName": {
      "type": "string"
    },
    "tenantEmail": {
      "type": "string",
      "description": "Unique"
    },
    "city": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "reservationPrice": {
      "type": "number"
    },
    "listing": {
      "type": "string"
    },
    "promoCode": {
      "type": "string"
    },
    "promoPercentage": {
      "type": "number"
    },
    "vat": {
      "type": "number"
    },
    "currencyCode": {
      "type": "string"
    },
    "contractConditions": {
      "type": "object",
      "properties": {
        "monthlyPrice": {
          "type": "number"
        },
        "downpayment": {
          "type": "number"
        },
        "seasonalPrice": {
          "type": "array"
        },
        "contractDateStart": {
          "type": "string"
        },
        "contractDateEnd": {
          "type": "string"
        },
        "tenantPayments": {
          "type": "array"
        },
        "securityDeposit": {
          "type": "number"
        },
        "adminFee": {
          "type": "number"
        },
        "downpaymentMaxCapType": {
          "type": "string"
        },
        "downpaymentMaxCapValue": {
          "type": "number"
        }
      }
    },
    "tenantFeeDiscountPercentage": {
      "type": "number"
    },
    "tenantFeeDiscount": {
      "type": "number"
    },
    "landlordTransferDueDate": {
      "type": "string"
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordCommission": {
      "type": "object",
      "properties": {
        "commission": {
          "type": "number"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "tenantFeeNet": {
      "type": "number"
    },
    "tenantFeeGross": {
      "type": "number"
    },
    "landlordFeeNet": {
      "type": "number"
    },
    "landlordFeeGross": {
      "type": "number"
    },
    "landlordNoCapFeeNet": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordNoCapFeeGross": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordFeeOwed": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordId": {
      "type": "string"
    },
    "secret": {
      "type": "string"
    },
    "tenantPhone": {
      "type": "string"
    },
    "tenantGender": {
      "type": "string",
      "enum": [
        "male",
        "female"
      ]
    },
    "tenantBirthday": {
      "type": "string"
    },
    "tenantCountry": {
      "type": "string"
    },
    "couple": {
      "type": "boolean"
    },
    "message": {
      "type": "string"
    },
    "contractDays": {
      "type": "number"
    },
    "contractValue": {
      "type": "number"
    },
    "pricePerDay": {
      "type": "number"
    },
    "revenue": {
      "type": "number"
    },
    "isPaymentMethodRegistered": {
      "type": "boolean"
    },
    "bookingProcess": {
      "type": "string"
    },
    "agent": {
      "type": "string"
    },
    "payments": {
      "type": "array"
    },
    "state": {
      "type": "string"
    },
    "remark": {
      "type": "string"
    },
    "rating": {
      "type": "number"
    },
    "landlordRejectionReason": {
      "type": "number"
    },
    "landlordRejectionMessage": {
      "type": "string"
    },
    "tenantCancellationReason": {
      "type": "number"
    },
    "originalBrId": {
      "type": "string"
    },
    "creationDate": {
      "type": "string"
    },
    "closedAt": {
      "type": "string"
    },
    "notifications": {
      "type": "array"
    },
    "listingType": {
      "type": "string"
    },
    "pricingId": {
      "type": "string"
    },
    "assignationConfirmed": {
      "type": "boolean"
    },
    "autoAssigned": {
      "type": "boolean"
    },
    "isInstantBooking": {
      "type": "boolean"
    },
    "feeCollectionType": {
      "type": "string",
      "enum": [
        "upfront",
        "monthly"
      ]
    },
    "rentCollectionType": {
      "type": "string",
      "enum": [
        "none",
        "monthly"
      ]
    },
    "transactionId": {
      "type": "string"
    },
    "paymentProvider": {
      "type": "string"
    },
    "exclusivityType": {
      "type": "string"
    }
  },
  "required": [
    "feeCollectionType",
    "rentCollectionType"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Booking Request Public

This endpoint returns the minimum amount of public data related with the booking request, it does not requires authentication

Get Booking Request Public
GET/booking-requests/{id}

Show the public information for Booking Request

Example URI

GET https://bookings.spotahome.com/api/booking-requests/id
URI Parameters
HideShow
id
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "_links": {
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "id": "7980",
  "bookingProcessId": "a4cdee-3fe6aab-bc34",
  "locator": "A4CDE",
  "ric": "H3",
  "referenceCode": "A4CDE-H3",
  "city": "madrid",
  "checkIn": "2010-01-01",
  "checkOut": "2010-01-01",
  "reservationPrice": 12000,
  "listing": "123",
  "promoCode": "PROMO",
  "promoPercentage": 50,
  "currencyCode": "EUR",
  "contractConditions": {
    "monthlyPrice": 49000,
    "downpayment": 44000,
    "seasonalPrice": [
      "10000",
      "10000",
      "5000",
      "5000",
      "5000",
      "5000",
      "5000",
      "5000",
      "5000",
      "8000",
      "8000",
      "8000"
    ],
    "tenantPayments": [
      "0",
      "49000",
      "49000",
      "49000"
    ],
    "securityDeposit": 56000,
    "adminFee": 30000
  },
  "tenantFeeDiscountPercentage": 25.1,
  "tenantFeeDiscount": 12000,
  "tenantFeeGross": 12000,
  "platformSource": "spotahome",
  "tenantEmail": "test@test.com",
  "isInstantBooking": true,
  "userId": "some-user-id",
  "plan": "select",
  "exclusivityType": "basic"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "id": {
      "type": "string"
    },
    "bookingProcessId": {
      "type": "string"
    },
    "locator": {
      "type": "string"
    },
    "ric": {
      "type": "string"
    },
    "referenceCode": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "reservationPrice": {
      "type": "number"
    },
    "listing": {
      "type": "string"
    },
    "promoCode": {
      "type": "string"
    },
    "promoPercentage": {
      "type": "number"
    },
    "currencyCode": {
      "type": "string"
    },
    "contractConditions": {
      "type": "object",
      "properties": {
        "monthlyPrice": {
          "type": "number"
        },
        "downpayment": {
          "type": "number"
        },
        "seasonalPrice": {
          "type": "array"
        },
        "tenantPayments": {
          "type": "array"
        },
        "securityDeposit": {
          "type": "number"
        },
        "adminFee": {
          "type": "number"
        }
      }
    },
    "tenantFeeDiscountPercentage": {
      "type": "number"
    },
    "tenantFeeDiscount": {
      "type": "number"
    },
    "tenantFeeGross": {
      "type": "number"
    },
    "platformSource": {
      "type": "string"
    },
    "tenantEmail": {
      "type": "string"
    },
    "isInstantBooking": {
      "type": "boolean"
    },
    "userId": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "exclusivityType": {
      "type": "string"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Booking Request Public By Secret

This endpoint returns the minimum amount of public data related with the booking request, it does not requires authentication

Get Booking Request Public By Secret
GET/public/booking-requests/secret/{secret}

Show the public information for Booking Request

Example URI

GET https://bookings.spotahome.com/api/public/booking-requests/secret/secret
URI Parameters
HideShow
secret
string (required) 

Secret of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "id": "7980",
  "state": "'BookingRequestWasCreated'"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

funnel types

List the funnel types
GET/booking-requests/funnel-types

Return all available funnel types

Example URI

GET https://bookings.spotahome.com/api/booking-requests/funnel-types
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "types": [
    "instant",
    "partner",
    "post_paid",
    "pre_paid",
    "relocation"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "types": {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "instant"
          ]
        },
        {
          "type": "string",
          "enum": [
            "partner"
          ]
        },
        {
          "type": "string",
          "enum": [
            "post_paid"
          ]
        },
        {
          "type": "string",
          "enum": [
            "pre_paid"
          ]
        },
        {
          "type": "string",
          "enum": [
            "relocation"
          ]
        }
      ]
    }
  },
  "required": [
    "types"
  ]
}
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"
  ]
}

Countries with their ISOs

List the countries with their ISOs
GET/countries

Return all available countries with their associated ISOs

Example URI

GET https://bookings.spotahome.com/api/countries
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "countries": [
    {
      "name": "Jersey",
      "alpha2": "JE"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "countries": {
      "type": "array"
    }
  }
}
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"
  ]
}

Instant Payment

Pay With Different Payment Method
PUT/booking-requests/{id}/instant-payment

Allows to pay the request with a different method than the one introduced at the beginning of the process.

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/instant-payment
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "paymentMethodNonce": "aa.bb.cc",
  "paymentProvider": "stripe"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "paymentMethodNonce": {
      "type": "string"
    },
    "paymentProvider": {
      "type": "string"
    }
  },
  "required": [
    "paymentMethodNonce"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Landlord Rejection

Landlord Rejects
PUT/booking-requests/{id}/landlord-rejection

Set the Booking Request as rejected by the Landlord.

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/landlord-rejection
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "reason": 3,
  "message": "A message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "reason": {
      "type": "number"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "reason",
    "message"
  ]
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

DEPRECATED Landlord Rejection Reasons

DEPRECATED Landlord Rejection Reasons
GET/booking-requests/rejection-reasons

Return all valid rejection reasons.

Example URI

GET https://bookings.spotahome.com/api/booking-requests/rejection-reasons
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "rejection-reasons": [
      "1: aaaa",
      "2: bbbbb"
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "rejection-reasons": {
          "type": "array"
        }
      }
    }
  }
}

Landlord Rejection Reasons

Landlord Rejection Reasons
GET/v2/booking-requests/rejection-reasons{?category}

Return all valid rejection reasons.

Example URI

GET https://bookings.spotahome.com/api/v2/booking-requests/rejection-reasons?category=1
URI Parameters
HideShow
category
string (optional) Example: 1

Rejection category

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "rejection-reasons": [
      {
        "id": "1",
        "reason": "IncorrectAvailability",
        "requireAvailabilityUpdate": true,
        "enabled": true
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "rejection-reasons": {
          "type": "array"
        }
      }
    }
  }
}

Landlord Rejection Reasons Categories

Landlord Rejection Reasons Categories
GET/booking-requests/rejection-reasons-categories

Return all valid rejection reasons categories.

Example URI

GET https://bookings.spotahome.com/api/booking-requests/rejection-reasons-categories
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "landlord-rejection-reasons-categories": [
      {
        "id": "1",
        "name": "IncorrectAvailability"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "landlord-rejection-reasons-categories": {
          "type": "array"
        }
      }
    }
  }
}

Tenant cancellation

Tenant cancellation
PUT/booking-requests/{id}/tenant-cancellation

Set the Booking Request as cancel by the Tenant.

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/tenant-cancellation
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "reason": 5,
  "message": "A message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "reason": {
      "type": "number"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "reason",
    "message"
  ]
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Tenant Cancellation Reasons

Tenant Cancellation Reasons
GET/booking-requests/cancellation-reasons{?restrictedToTenants}

Return all valid cancellation reasons.

Example URI

GET https://bookings.spotahome.com/api/booking-requests/cancellation-reasons?restrictedToTenants=true
URI Parameters
HideShow
restrictedToTenants
string (optional) Example: true

Criteria by restricted to tenants filter.

  • true

  • false

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "cancellation-reasons": [
      "1: aaaa",
      "2: bbbbb"
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "cancellation-reasons": {
          "type": "array"
        }
      }
    }
  }
}

Charge cancellation penalty

Cancellation penalty
POST/booking-requests/{id}/penalties

Charge a penalty to the Tenant of the Booking Request.

Example URI

POST https://bookings.spotahome.com/api/booking-requests/id/penalties
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "amount": 10000,
  "instrumentType": "paypal",
  "isManualCharge": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "amount": {
      "type": "number"
    },
    "instrumentType": {
      "type": "string",
      "enum": [
        "paypal",
        "bank_transfer",
        "credit_card"
      ]
    },
    "isManualCharge": {
      "type": "boolean"
    }
  },
  "required": [
    "amount",
    "instrumentType",
    "isManualCharge"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Cancellation policies

Cancellation penalty
GET/booking-requests/{id}/cancellation-policies

Return the cancellation policies of a Booking Request.

Example URI

GET https://bookings.spotahome.com/api/booking-requests/id/cancellation-policies
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Body
{
  "cancellationPolicies": [
    {
      "tenantPenalty": 50,
      "downpaymentPercentageRefund": 100,
      "reservationFeePercentageRefund": 100,
      "deadlineDaysToMoveIn": 60
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "cancellationPolicies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "tenantPenalty": {
            "type": "number"
          },
          "downpaymentPercentageRefund": {
            "type": "number"
          },
          "reservationFeePercentageRefund": {
            "type": "number"
          },
          "deadlineDaysToMoveIn": {
            "type": "number"
          }
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Charge booking request

Charge booking request
PUT/booking-requests/{id}/charge

Charge a booking request to the Tenant of the Booking Request. If it is not a manual charge, instrumentType is ignored.

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/charge
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "isManualCharge": true,
  "instrumentType": "paypal"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "isManualCharge": {
      "type": "boolean"
    },
    "instrumentType": {
      "type": "string",
      "enum": [
        "paypal",
        "bank_transfer",
        "credit_card"
      ]
    }
  },
  "required": [
    "isManualCharge",
    "instrumentType"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  402
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The payment is required and could not be performed",
  "status": 402,
  "title": "Payment Required",
  "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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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",
  "validationMessages": {
    "errorCode": "errorValue"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "errorCode": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  422
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

Assign Agent

Assign Agent
PUT/booking-requests/{id}/agent

Assign an agent to a Booking Request.

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/agent
URI Parameters
HideShow
id
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "id": "Agent's id to assign"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ]
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Unassign Agent

Unassign Agent
DELETE/booking-requests/{id}/agent

Unassign an agent from a Booking Request.

Example URI

DELETE https://bookings.spotahome.com/api/booking-requests/id/agent
URI Parameters
HideShow
id
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Confirm agent assignation

Confirm agent assignation
PUT/booking-requests/{id}/agent/{agentId}/confirmation

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/agent/agentId/confirmation
URI Parameters
HideShow
id
string (required) 

Id of a Booking Request.

agentId
string (required) 

Id of an agent.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Booking Request States

Booking Request States
GET/booking-requests/states

Return all booking request states.

Example URI

GET https://bookings.spotahome.com/api/booking-requests/states
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "states": [
      "first state",
      "second state"
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "states": {
          "type": "array"
        }
      }
    }
  }
}

Update contract's conditions

Update contract's conditions
PUT/booking-requests/{id}/contract-conditions

Modifies the contract conditions according to negotiation with landlord

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/contract-conditions
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "seasonalPrice": [
    "10000",
    "10000",
    "5000",
    "5000",
    "5000",
    "5000",
    "5000",
    "5000",
    "5000",
    "8000",
    "8000",
    "8000"
  ],
  "contractDateStart": "2010-01-01",
  "contractDateEnd": "2010-02-30",
  "checkIn": "2010-01-01",
  "checkOut": "2010-02-30"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "seasonalPrice": {
      "type": "array"
    },
    "contractDateStart": {
      "type": "string",
      "description": "Date of contract start"
    },
    "contractDateEnd": {
      "type": "string",
      "description": "Date of contract end"
    },
    "checkIn": {
      "type": "string",
      "description": "Check in date"
    },
    "checkOut": {
      "type": "string",
      "description": "Check out date"
    }
  }
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Update moving dates

Update moving dates
PUT/booking-requests/{id}/moving-dates

Modify the moving dates for a booking request

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/moving-dates
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "checkIn": "2010-01-01",
  "checkOut": "2010-02-30"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "checkIn": {
      "type": "string",
      "description": "Check in date"
    },
    "checkOut": {
      "type": "string",
      "description": "Check out date"
    }
  },
  "required": [
    "checkIn",
    "checkOut"
  ]
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Update tenant fee discount

Update tenant fee discount
PUT/booking-requests/{id}/tenant-fee-discount

Modifies the discount for a tenant fee

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/tenant-fee-discount
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "percentage": "10"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "percentage": {
      "type": "string",
      "description": "percentage of discount"
    }
  }
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Update landlord's commission

Update landlord's commission
PUT/booking-requests/{id}/landlord-commission

Modifies the commission applied to the landlord

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/landlord-commission
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "commission": 15.3,
  "type": "fixed"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "commission": {
      "type": "number",
      "description": "commission value"
    },
    "type": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    }
  }
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Update landlord's transfer due date

Update landlord's transfer due date
PUT/booking-requests/{id}/landlord-transfer-due-date

Modifies the date when the bank transfer should be sent to the landlord

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/landlord-transfer-due-date
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "transferDueDate": "2010-02-30"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "transferDueDate": {
      "type": "string",
      "description": "due date for making the bank transfer"
    }
  }
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Update landlord's confirmation

Update landlord's confirmation
PUT/booking-requests/{id}/landlord-confirmation

Mark the booking request as confirmed by landlord

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/landlord-confirmation
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Alternative Booking Request

Alternative Booking Request
POST/booking-requests/{id}/alternative

Update Booking Request with new listing, new moving dates and recalculate price.

Example URI

POST https://bookings.spotahome.com/api/booking-requests/id/alternative
URI Parameters
HideShow
id
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "listing": "124",
  "checkIn": "2017-01-01",
  "checkOut": "2017-05-01"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listing": {
      "type": "string",
      "description": "New listing id"
    },
    "checkIn": {
      "type": "string",
      "description": "New check in date"
    },
    "checkOut": {
      "type": "string",
      "description": "New check out date"
    }
  },
  "required": [
    "listing",
    "checkIn",
    "checkOut"
  ]
}
Response  201
HideShow
Headers
Location: /booking-requests/8f2dbe69-b68f-4423-bc93-b8b036727a032
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Update tenant details

Update tenant details
PUT/booking-requests/{id}/tenant

Modifies the details of the tenant for a booking request

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/tenant
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "tenantEmail": "test@test.com",
  "userId": "new-user-if"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tenantEmail": {
      "type": "string",
      "description": "New tenant email"
    },
    "userId": {
      "type": "string",
      "description": "New user id"
    }
  }
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Update agent remark

DEPRECATED Update agent remark
PUT/booking-requests/{id}/remark

Updates the remark that agents use for adding notes about the booking request

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/remark
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "remark": "random text"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "remark": {
      "type": "string"
    }
  }
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Get list of booking request's remarks

Get Remarks of a booking request
GET/booking-requests/{id}/remarks

Get the list of remarks that agents add to the booking request

Example URI

GET https://bookings.spotahome.com/api/booking-requests/123456/remarks
URI Parameters
HideShow
id
number (required) Example: 123456

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "remarks": [
    {
      "id": "tag799-tyeh",
      "createdAt": "2010-01-01T22:50:21",
      "userId": "fgha72-aujl",
      "message": "this is a remark"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "remarks": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Add a remark to a booking request

Add a Remark to a booking request
POST/booking-requests/{id}/remarks

Adds a new remark to a specific booking request

Example URI

POST https://bookings.spotahome.com/api/booking-requests/123456/remarks
URI Parameters
HideShow
id
number (required) Example: 123456

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "message": "this is a remark"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
Response  201
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Update booking request rating

Update booking request rating
PUT/booking-requests/{id}/rating

Updates the rating that agents use to value the booking request process

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/rating
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "rating": 4
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "rating": {
      "type": "number",
      "description": "Value must be from 0 to 5"
    }
  },
  "required": [
    "rating"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Penalties

Booking Request Penalties
GET/booking-requests/{id}/penalties

Return all penalties charged to a Booking Request

Example URI

GET https://bookings.spotahome.com/api/booking-requests/id/penalties
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "penalties": [
    {
      "amount": 15050
    }
  ],
  "maxCancellationPenaltyAllowed": 43200
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "penalties": {
      "type": "array"
    },
    "maxCancellationPenaltyAllowed": {
      "type": "number"
    }
  }
}

Mark as viewed

Mark viewed
PUT/booking-requests/{id}/viewed

Mark Booking Request as viewed by the assigned agent

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/id/viewed
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "agent": "Agent's id that viewed the Booking Request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "agent": {
      "type": "string"
    }
  },
  "required": [
    "agent"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Renegotiation request

renegotiation-request

Renegotiation request
POST/booking-requests/{id}/landlord-request-renegotiation

Creates a Renegotiation Request made by the Landlord

Example URI

POST https://bookings.spotahome.com/api/booking-requests/id/landlord-request-renegotiation
URI Parameters
HideShow
id
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "message": "A message"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
Response  201
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Resource Group

Update payment Payment

Update payment method
PUT/tenant/me/booking-requests/{id}/payment-method

Allow user to update the payment method of a booking request.

Example URI

PUT https://bookings.spotahome.com/api/tenant/me/booking-requests/id/payment-method
URI Parameters
HideShow
id
number (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "paymentMethodNonce": "aa.bb.cc",
  "paymentProvider": "stripe",
  "paymentDeviceData": "aa.bb.cc",
  "savePaymentMethod": false,
  "promoCode": "DOUBLEBOOKING"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "paymentMethodNonce": {
      "type": "string"
    },
    "paymentProvider": {
      "type": "string"
    },
    "paymentDeviceData": {
      "type": "string"
    },
    "savePaymentMethod": {
      "type": "boolean"
    },
    "promoCode": {
      "type": "string"
    }
  },
  "required": [
    "paymentMethodNonce"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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/problem+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"
  ]
}

Booking

Get all Bookings by query params

Get all Bookings by query params
GET/bookings{?locator,checkInFrom,checkInTo,checkOutFrom,checkOutTo,page,itemsPerPage}

This endpoint returns a list of Bookings that satisfy query params

Example URI

GET https://bookings.spotahome.com/api/bookings?locator=8BA4E&checkInFrom=2018-02-01&checkInTo=2018-07-31&checkOutFrom=2018-02-01&checkOutTo=2018-07-31&page=1&itemsPerPage=1
URI Parameters
HideShow
locator
string (optional) Example: 8BA4E

Locator of a Booking.

checkInFrom
string (optional) Example: 2018-02-01

Specific booking checkIn start

checkInTo
string (optional) Example: 2018-07-31

Specific booking checkIn end

checkOutFrom
string (optional) Example: 2018-02-01

Specific booking checkOut start

checkOutTo
string (optional) Example: 2018-07-31

Specific booking checkOut end

bookingRequestIds
array[string] (optional) Example: 50100

Collection of Booking Request IDs referenced by Bookings.

page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 1
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "bookings": [
      {
        "_links": {
          "self": {
            "href": "https://monolith.spotahome.com/api/{resource}/{id}"
          }
        },
        "id": "305e7971-4006-4554-a962-17278a136ba3",
        "locator": "305E7",
        "ric": "GM",
        "bookingRequestId": "12345",
        "tenantEmail": "tenant@spotahome.com",
        "tenantPhone": "987654321",
        "listingId": "123456",
        "city": "madrid",
        "checkIn": "2010-01-01",
        "checkOut": "2010-01-01",
        "feeCollectionType": "upfront",
        "rentCollectionType": "none",
        "billCollectionType": "none",
        "state": "Ongoing",
        "platformSource": "spotahome",
        "plan": "standard",
        "userId": "305e79234-6345-0901-a738-17278a136ba3",
        "expirationDate": "2025-03-03T12:00:00+00:00"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "bookings": {
          "type": "array",
          "description": "A list of Bookings"
        }
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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"
  ]
}

Booking

Get a Booking by Id
GET/bookings/{id}

The endpoint returns the Booking identified by Id

Example URI

GET https://bookings.spotahome.com/api/bookings/id
URI Parameters
HideShow
id
string (required) 

Id of a Booking.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "_links": {
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "id": "305e7971-4006-4554-a962-17278a136ba3",
  "locator": "305E7",
  "ric": "GM",
  "bookingRequestId": "12345",
  "tenantEmail": "tenant@spotahome.com",
  "tenantPhone": "987654321",
  "listingId": "123456",
  "city": "madrid",
  "checkIn": "2010-01-01",
  "checkOut": "2010-01-01",
  "feeCollectionType": "upfront",
  "rentCollectionType": "none",
  "billCollectionType": "none",
  "state": "Ongoing",
  "platformSource": "spotahome",
  "plan": "standard",
  "userId": "305e79234-6345-0901-a738-17278a136ba3",
  "expirationDate": "2025-03-03T12:00:00+00:00"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "id": {
      "type": "string"
    },
    "locator": {
      "type": "string"
    },
    "ric": {
      "type": "string"
    },
    "bookingRequestId": {
      "type": "string"
    },
    "tenantEmail": {
      "type": "string"
    },
    "tenantPhone": {
      "type": "string"
    },
    "listingId": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "feeCollectionType": {
      "type": "string"
    },
    "rentCollectionType": {
      "type": "string"
    },
    "billCollectionType": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "platformSource": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "expirationDate": {
      "type": "string"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Booking From Booking Request

Get a Booking by bookingRequestId
GET/bookings/booking-request/{bookingRequestId}

This endpoint returns the Booking identified by BookingRequestId

Example URI

GET https://bookings.spotahome.com/api/bookings/booking-request/bookingRequestId
URI Parameters
HideShow
bookingRequestId
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "_links": {
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "id": "305e7971-4006-4554-a962-17278a136ba3",
  "locator": "305E7",
  "ric": "GM",
  "bookingRequestId": "12345",
  "tenantEmail": "tenant@spotahome.com",
  "tenantPhone": "987654321",
  "listingId": "123456",
  "city": "madrid",
  "checkIn": "2010-01-01",
  "checkOut": "2010-01-01",
  "feeCollectionType": "upfront",
  "rentCollectionType": "none",
  "billCollectionType": "none",
  "state": "Ongoing",
  "platformSource": "spotahome",
  "plan": "standard",
  "userId": "305e79234-6345-0901-a738-17278a136ba3",
  "expirationDate": "2025-03-03T12:00:00+00:00"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "id": {
      "type": "string"
    },
    "locator": {
      "type": "string"
    },
    "ric": {
      "type": "string"
    },
    "bookingRequestId": {
      "type": "string"
    },
    "tenantEmail": {
      "type": "string"
    },
    "tenantPhone": {
      "type": "string"
    },
    "listingId": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "feeCollectionType": {
      "type": "string"
    },
    "rentCollectionType": {
      "type": "string"
    },
    "billCollectionType": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "platformSource": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "expirationDate": {
      "type": "string"
    }
  }
}
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Landlord's Booking Collection

Get Landlord's Bookings
GET/landlord/me/bookings{?states,sortBy,sortType,page,itemsPerPage}

This endpoint returns a list of landlord’s bookings

Example URI

GET https://bookings.spotahome.com/api/landlord/me/bookings?states=BookingRequestWasConvertedIntoBooking&sortBy=moveInDate&sortType=asc&page=1&itemsPerPage=1
URI Parameters
HideShow
states
array[string] (optional) Example: BookingRequestWasConvertedIntoBooking
bookingStates
array[string] (optional) Example: finished
moveInFrom
string (optional) Example: 2019-01-01
moveInTo
string (optional) Example: 2019-01-07
moveOutFrom
string (optional) Example: 2019-07-01
moveOutTo
string (optional) Example: 2019-07-07
creationDateFrom
string (optional) Example: 2019-07-01
creationDateTo
string (optional) Example: 2019-07-07
listingId
string (optional) Example: '12345'
excludeBookingIds
array[string] (optional) Example: 50100

Collection of Booking IDs to exclude

itemsPerPage
number (optional) Example: 1
page
number (optional) Example: 1
sortBy
enum [string] (optional) Example: moveInDate
  • moveInDate

  • moveOutDate

sortType
enum [string] (optional) Example: asc
  • asc

  • desc

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "landlord-bookings": [
      {
        "bookingId": "305e7971-4006-4554-a962-17278a136ba3",
        "bookingRequestId": "12345",
        "locator": "A4CDE",
        "ric": "4A",
        "referenceCode": "A4CDE-4A",
        "listingId": "12345",
        "pricingId": "12345",
        "tenantEmail": "test@test.com",
        "tenantFullName": "John Doe",
        "tenantPhone": "``+34620000000`",
        "checkInDate": "2010-01-01",
        "checkOutDate": "2010-01-01",
        "bookingRequestState": "BookingRequestWasCreated",
        "state": "Ongoing",
        "platformSource": "spotahome"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "landlord-bookings": {
          "type": "array",
          "description": "A list of Booking"
        }
      }
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

Booking Cancellation Policy

Get Landlord's Bookings
GET/api/bookings/cancellation-policy{?cancellationDate}

This endpoint returns a list of landlord’s bookings

Example URI

GET https://bookings.spotahome.com/api/api/bookings/cancellation-policy?cancellationDate=2019-01-01
URI Parameters
HideShow
cancellationDate
string (optional) Example: 2019-01-01
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "tenantPenalty": 50,
  "downpaymentPercentageRefund": 100,
  "reservationFeePercentageRefund": 100,
  "deadlineDaysToMoveIn": 60
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tenantPenalty": {
      "type": "number"
    },
    "downpaymentPercentageRefund": {
      "type": "number"
    },
    "reservationFeePercentageRefund": {
      "type": "number"
    },
    "deadlineDaysToMoveIn": {
      "type": "number"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Instant Booking

Check if Instant Booking is eligible

Check if Instant Booking is eligible
POST/instant-booking-eligibility

This endpoint check if an Instant Booking can be created based on the given conditions

Example URI

POST https://bookings.spotahome.com/api/instant-booking-eligibility
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "listingId": "1234456",
  "birthDate": "1998-12-30",
  "isCouple": true,
  "checkIn": "2018-06-04",
  "checkOut": "2018-12-15",
  "startContractDate": "2018-06-01",
  "endContractDate": "2018-12-31",
  "gender": "male"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listingId": {
      "type": "string",
      "description": "Id of a Listing."
    },
    "birthDate": {
      "type": "string",
      "description": "Tenant's birth date"
    },
    "isCouple": {
      "type": "boolean",
      "description": "Tenant is a couple."
    },
    "checkIn": {
      "type": "string",
      "description": "Date of check-in."
    },
    "checkOut": {
      "type": "string",
      "description": "Date of check-out."
    },
    "startContractDate": {
      "type": "string",
      "description": "Date of contract start."
    },
    "endContractDate": {
      "type": "string",
      "description": "Date of contract end."
    },
    "gender": {
      "type": "string",
      "enum": [
        "male",
        "female"
      ]
    }
  },
  "required": [
    "listingId",
    "birthDate",
    "isCouple",
    "checkIn",
    "checkOut",
    "startContractDate",
    "endContractDate",
    "gender"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "instantBooking": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "instantBooking": {
      "type": "boolean",
      "description": "indicates if an instant booking can be created or not"
    }
  }
}

Get Instant Booking Conditions for a listing

Get Instant Booking Conditions for a listing
GET/instant-booking-conditions/{listingId}

This endpoint returns the Instant Booking Conditions for a given listing ID

Example URI

GET https://bookings.spotahome.com/api/instant-booking-conditions/123456
URI Parameters
HideShow
listingId
string (required) Example: 123456

Id of a Listing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "listingId": "1234456",
  "isInstantBookingEnabled": true,
  "areCouplesAllowed": false,
  "ageRangeAllowed": [
    18,
    99
  ],
  "maxDaysBeforeCheckIn": 50,
  "monthlyMinStay": [
    2,
    4,
    5,
    5,
    5,
    5,
    5,
    3,
    3,
    2,
    2,
    2
  ],
  "genderAllowed": "male"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listingId": {
      "type": "string"
    },
    "isInstantBookingEnabled": {
      "type": "boolean"
    },
    "areCouplesAllowed": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "ageRangeAllowed": {
      "type": [
        "array",
        "null"
      ]
    },
    "maxDaysBeforeCheckIn": {
      "type": [
        "number",
        "null"
      ]
    },
    "monthlyMinStay": {
      "type": [
        "array",
        "null"
      ]
    },
    "genderAllowed": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "male",
        "female",
        null
      ]
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Set Instant Booking Conditions for a list of listings

Set Instant Booking Conditions for a list of listings
PUT/instant-booking-conditions

This endpoint sets the Instant Booking Conditions for a given list of listings.

Example URI

PUT https://bookings.spotahome.com/api/instant-booking-conditions
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "conditions": [
    {
      "listingId": "1234456",
      "isInstantBookingEnabled": true,
      "areCouplesAllowed": false,
      "ageRangeAllowed": [
        18,
        99
      ],
      "maxDaysBeforeCheckIn": 50,
      "monthlyMinStay": [
        2,
        4,
        5,
        5,
        5,
        5,
        5,
        3,
        3,
        2,
        2,
        2
      ],
      "genderAllowed": "male"
    },
    {
      "listingId": "1234456",
      "isInstantBookingEnabled": true,
      "areCouplesAllowed": false,
      "ageRangeAllowed": [
        18,
        99
      ],
      "maxDaysBeforeCheckIn": 50,
      "monthlyMinStay": [
        2,
        4,
        5,
        5,
        5,
        5,
        5,
        3,
        3,
        2,
        2,
        2
      ],
      "genderAllowed": "male"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "conditions": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "listingId": {
              "type": "string",
              "enum": [
                "1234456"
              ]
            },
            "isInstantBookingEnabled": {
              "type": "boolean",
              "enum": [
                true
              ]
            },
            "areCouplesAllowed": {
              "type": [
                "boolean",
                "null"
              ],
              "enum": [
                false,
                null
              ]
            },
            "ageRangeAllowed": {
              "type": [
                "array",
                "null"
              ],
              "items": [
                {
                  "type": "number",
                  "enum": [
                    18
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    99
                  ]
                }
              ]
            },
            "maxDaysBeforeCheckIn": {
              "type": [
                "number",
                "null"
              ],
              "enum": [
                50,
                null
              ]
            },
            "monthlyMinStay": {
              "type": [
                "array",
                "null"
              ],
              "items": [
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    4
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    3
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    3
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                }
              ]
            },
            "genderAllowed": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "male",
                "female",
                null
              ]
            }
          },
          "required": [
            "listingId",
            "isInstantBookingEnabled",
            "areCouplesAllowed",
            "ageRangeAllowed",
            "maxDaysBeforeCheckIn",
            "monthlyMinStay",
            "genderAllowed"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "listingId": {
              "type": "string",
              "enum": [
                "1234456"
              ]
            },
            "isInstantBookingEnabled": {
              "type": "boolean",
              "enum": [
                true
              ]
            },
            "areCouplesAllowed": {
              "type": [
                "boolean",
                "null"
              ],
              "enum": [
                false,
                null
              ]
            },
            "ageRangeAllowed": {
              "type": [
                "array",
                "null"
              ],
              "items": [
                {
                  "type": "number",
                  "enum": [
                    18
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    99
                  ]
                }
              ]
            },
            "maxDaysBeforeCheckIn": {
              "type": [
                "number",
                "null"
              ],
              "enum": [
                50,
                null
              ]
            },
            "monthlyMinStay": {
              "type": [
                "array",
                "null"
              ],
              "items": [
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    4
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    5
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    3
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    3
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    2
                  ]
                }
              ]
            },
            "genderAllowed": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "male",
                "female",
                null
              ]
            }
          },
          "required": [
            "listingId",
            "isInstantBookingEnabled",
            "areCouplesAllowed",
            "ageRangeAllowed",
            "maxDaysBeforeCheckIn",
            "monthlyMinStay",
            "genderAllowed"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "conditions"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/problem+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  422
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

Booking Agent

Get all Booking Agents

Get all Booking Agents
GET/agents{?page,itemsPerPage,enabled,sortBy,sortType}

This endpoint returns a list of Booking Agents

Example URI

GET https://bookings.spotahome.com/api/agents?page=1&itemsPerPage=1&enabled=true&sortBy=fullName&sortType=asc
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 1
enabled
boolean (optional) Example: true
sortBy
enum [string] (optional) Example: fullName
  • fullName

  • ongoing

  • startTime

sortType
enum [string] (optional) Example: asc
  • asc

  • desc

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "bookingAgents": [
      {
        "id": "305e7971-4006-4554-a962-17278a136ba3",
        "email": "test@email.com",
        "fullName": "John Snow",
        "languages": [
          "es",
          "en",
          "fr"
        ],
        "cities": [
          "madrid",
          "barcelona"
        ],
        "ongoingBookingRequestsCount": 6,
        "day": "2018-12-31",
        "hours": [
          [
            "09:00",
            "14:00"
          ],
          [
            "15:00",
            "18:00"
          ]
        ]
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "bookingAgents": {
          "type": "array",
          "description": "A list of Agents"
        }
      }
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

Get a Booking Agent by ID

Get a Booking Agent by ID
GET/agents/{id}

This endpoint returns Booking Agent identified by Id

Example URI

GET https://bookings.spotahome.com/api/agents/id
URI Parameters
HideShow
id
string (required) 

Id of a Booking Agent.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "id": "305e7971-4006-4554-a962-17278a136ba3",
  "email": "test@email.com",
  "fullName": "John Snow",
  "languages": [
    "es",
    "en",
    "fr"
  ],
  "cities": [
    "madrid",
    "barcelona"
  ],
  "ongoingBookingRequestsCount": 6,
  "day": "2018-12-31",
  "hours": [
    [
      "09:00",
      "14:00"
    ],
    [
      "15:00",
      "18:00"
    ]
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "fullName": {
      "type": "string"
    },
    "languages": {
      "type": "array"
    },
    "cities": {
      "type": "array"
    },
    "ongoingBookingRequestsCount": {
      "type": "number"
    },
    "day": {
      "type": "string"
    },
    "hours": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Get all languages for booking agents

Get all languages for booking agents
GET/agents/languages

This endpoint returns a list of ISO code languages

Example URI

GET https://bookings.spotahome.com/api/agents/languages
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "languages": [
    "es",
    "en",
    "fr"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "languages": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

Set languages for a booking agent

Set languages for a booking agent
PUT/agents/{id}/languages

Set the list of languages (ISO code) associated to a booking agent

Example URI

PUT https://bookings.spotahome.com/api/agents/id/languages
URI Parameters
HideShow
id
string (required) 

ID of an agent.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "languages": [
    "es",
    "en"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "languages": {
      "type": "array"
    }
  }
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Set cities for a booking agent

Set cities for a booking agent
PUT/agents/{id}/cities

Set the list of cities associated to a booking agent

Example URI

PUT https://bookings.spotahome.com/api/agents/id/cities
URI Parameters
HideShow
id
string (required) 

ID of an agent.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "cities": [
    "madrid",
    "barcelona"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "cities": {
      "type": "array"
    }
  }
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Get agent schedule for a day

Get agent schedule for a day
GET/agents/{id}/schedules/{day}

Get the working hours (in UTC) for a given agent on a given day

Example URI

GET https://bookings.spotahome.com/api/agents/aa-bb-cc/schedules/2018-01-01
URI Parameters
HideShow
id
string (required) Example: aa-bb-cc

ID of an agent.

day
string (required) Example: 2018-01-01
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "id": "305e7971-4006-4554-a962-17278a136ba3",
  "agentId": "aa-bb-cc-dd",
  "day": "2018-12-31",
  "hours": [
    [
      "09:00",
      "14:00"
    ],
    [
      "15:00",
      "18:00"
    ]
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "agentId": {
      "type": "string"
    },
    "day": {
      "type": "string"
    },
    "hours": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  400
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Get agent schedule for a day range

Get agent schedule for a day range
GET/agents/{id}/schedules/{fromDate}/{toDate}

Get the working hours for a given agent on a given day range

Example URI

GET https://bookings.spotahome.com/api/agents/aa-bb-cc/schedules/2018-01-01/2018-01-05
URI Parameters
HideShow
id
string (required) Example: aa-bb-cc

ID of an agent.

fromDate
string (required) Example: 2018-01-01
toDate
string (required) Example: 2018-01-05
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-Type: application/json
Body
{
  "schedules": [
    {
      "id": "305e7971-4006-4554-a962-17278a136ba3",
      "agentId": "aa-bb-cc-dd",
      "day": "2018-12-31",
      "hours": [
        [
          "09:00",
          "14:00"
        ],
        [
          "15:00",
          "18:00"
        ]
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "schedules": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  400
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Set agent schedules

Set agent schedules
POST/agents/{id}/schedules

Set the working hours (in UTC) for a given agent on a given date

Example URI

POST https://bookings.spotahome.com/api/agents/aa-bb-cc/schedules
URI Parameters
HideShow
id
string (required) Example: aa-bb-cc

ID of an agent.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "day": "2018-01-01",
  "hours": [
    [
      "09:00",
      "18:00"
    ]
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "day": {
      "type": "string"
    },
    "hours": {
      "type": "array"
    }
  },
  "required": [
    "day",
    "hours"
  ]
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Update agent schedule

Update agent schedule
PUT/agents/{id}/schedules/{day}

Update the working hours (in UTC) for a given agent on a given date

Example URI

PUT https://bookings.spotahome.com/api/agents/aa-bb-cc/schedules/yyyy-mm-dd
URI Parameters
HideShow
id
string (required) Example: aa-bb-cc

ID of an agent.

day
string (required) Example: yyyy-mm-dd

Day to update its schedule.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "hours": [
    [
      "09:00",
      "15:00"
    ]
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "hours": {
      "type": "array"
    }
  },
  "required": [
    "hours"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Bulk CSV update of agent schedules

Bulk CSV update of agent schedules
PUT/agents/schedules-bulk

Example URI

PUT https://bookings.spotahome.com/api/agents/schedules-bulk
Request
HideShow
Headers
Content-Type: text/csv
Authorization: aa.bb.cc
Time-Zone: '+0200'
Body
{
  "file": "it should be a text/csv file"
}
Schema
{
  "type": "object",
  "properties": {
    "file": {
      "type": "string"
    }
  },
  "required": [
    "file"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  422
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

Global

Cities

Cities
GET/cities{?enabled}

Return all cities.

Example URI

GET https://bookings.spotahome.com/api/cities?enabled=true
URI Parameters
HideShow
enabled
boolean (optional) Example: true
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "prev": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "next": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "last": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    },
    "self": {
      "href": "https://monolith.spotahome.com/api/{resource}/{id}"
    }
  },
  "_embedded": {
    "cities": [
      "city A",
      "city B"
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "cities": {
          "type": "array"
        }
      }
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

City
GET/cities/{cityId}

Return information for a city.

Example URI

GET https://bookings.spotahome.com/api/cities/cityId
URI Parameters
HideShow
cityId
string (required) 

Id of the city

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "isBookable": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "isBookable": {
      "type": "boolean"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/problem+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  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Promo

Promo

Get a Promo by Promo code with the greatest expiration date
GET/promos/{promoCode}

The endpoint returns the Promo identified by the promoCode

Example URI

GET https://bookings.spotahome.com/api/promos/promoCode
URI Parameters
HideShow
promoCode
string (required) 

Code of a promo.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "id": "1234456",
  "promoCode": true,
  "discount": 15,
  "expirationDate": "2010-01-01"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "promoCode": {
      "type": "boolean"
    },
    "discount": {
      "type": "number"
    },
    "expirationDate": {
      "type": "string"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Value Added Service

Create value added service tracking

Create value added service tracking
POST/vas-trackings

Save tracking information about value added services

Example URI

POST https://bookings.spotahome.com/api/vas-trackings
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "valueAddedServiceId": "857a7a89-e044-4895-aab1-639748d4ed8e",
  "targetUrl": "https://www.example.com",
  "additionalInfo": {
    "foo": "foo",
    "foo1": "foo1"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "valueAddedServiceId": {
      "type": "string"
    },
    "targetUrl": {
      "type": "string"
    },
    "additionalInfo": {
      "type": "object",
      "properties": {
        "foo": {
          "type": "string"
        },
        "foo1": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "valueAddedServiceId",
    "targetUrl"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  409
HideShow
Headers
Content-Type: application/problem+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/problem+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"
  ]
}

Get value added service by target and city

Get value added service by target and city
GET/vas/{target}/{city}

This endpoint returns a list of value added services by target and city

Example URI

GET https://bookings.spotahome.com/api/vas/target/city
URI Parameters
HideShow
target
string (required) 

tenant or landlord.

city
string (required) 

ref code of the city

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Content-type: application/json
Body
[
  {
    "id": "80e859d1-aca7-41ad-9a77-8a0d4c4663f6",
    "target": "tenant",
    "name": "n26",
    "serviceType": "banking",
    "tags": [
      "moving-and-getting-up",
      "test"
    ],
    "cities": [
      "madrid",
      "london"
    ],
    "titleBanner": "Mobile Phone",
    "descriptionBanner": "description",
    "titleCard": "Mobile",
    "descriptionCard": "descriptionCard",
    "listCard": [
      "likedList: `* No hidden fees.\\n* Global support in range of languages.`"
    ],
    "imageSrc": "https://our-bucket/img/img1.jpeg",
    "link": "http://example.com",
    "affiliateCode": "SAH97",
    "featured": true,
    "trustpilotScore": "7.7",
    "trustpilotReviewsAmount": "+5.5k",
    "imgLogoSrc": "https://our-bucket.com/img/img1.jpeg",
    "discountCode": "code",
    "discountType": "amount",
    "discountAmount": "15",
    "discountCurrency": "EUR"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "enum": [
          "80e859d1-aca7-41ad-9a77-8a0d4c4663f6"
        ]
      },
      "target": {
        "type": "string",
        "enum": [
          "tenant",
          "landlord"
        ]
      },
      "name": {
        "type": "string",
        "enum": [
          "n26"
        ]
      },
      "serviceType": {
        "type": "string",
        "enum": [
          "banking"
        ]
      },
      "tags": {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "moving-and-getting-up"
            ]
          },
          {
            "type": "string",
            "enum": [
              "test"
            ]
          }
        ]
      },
      "cities": {
        "type": "array",
        "items": [
          {
            "type": "string",
            "enum": [
              "madrid"
            ]
          },
          {
            "type": "string",
            "enum": [
              "london"
            ]
          }
        ]
      },
      "titleBanner": {
        "type": "string",
        "enum": [
          "Mobile Phone"
        ]
      },
      "descriptionBanner": {
        "type": "string",
        "enum": [
          "description"
        ]
      },
      "titleCard": {
        "type": "string",
        "enum": [
          "Mobile"
        ]
      },
      "descriptionCard": {
        "type": "string",
        "enum": [
          "descriptionCard"
        ]
      },
      "listCard": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "likedList: `* No hidden fees.\\n* Global support in range of languages.`"
          ]
        }
      },
      "imageSrc": {
        "type": "string",
        "enum": [
          "https://our-bucket/img/img1.jpeg"
        ]
      },
      "link": {
        "type": "string",
        "enum": [
          "http://example.com"
        ]
      },
      "affiliateCode": {
        "type": "string",
        "enum": [
          "SAH97"
        ]
      },
      "featured": {
        "type": "boolean",
        "enum": [
          true
        ]
      },
      "trustpilotScore": {
        "type": "string",
        "enum": [
          "7.7"
        ]
      },
      "trustpilotReviewsAmount": {
        "type": "string",
        "enum": [
          "+5.5k"
        ]
      },
      "imgLogoSrc": {
        "type": "string",
        "enum": [
          "https://our-bucket.com/img/img1.jpeg"
        ]
      },
      "discountCode": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "code",
          null
        ]
      },
      "discountType": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "amount",
          "percentage",
          null
        ]
      },
      "discountAmount": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "15",
          null
        ]
      },
      "discountCurrency": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "EUR",
          null
        ]
      }
    },
    "required": [
      "id",
      "target",
      "name",
      "serviceType",
      "tags",
      "cities",
      "titleBanner",
      "descriptionBanner",
      "titleCard",
      "descriptionCard",
      "listCard",
      "imageSrc",
      "link",
      "affiliateCode",
      "featured",
      "trustpilotScore",
      "trustpilotReviewsAmount",
      "imgLogoSrc",
      "discountCode",
      "discountType",
      "discountAmount",
      "discountCurrency"
    ],
    "additionalProperties": false
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

Create value added service

Create value added service
POST/vas/services

Save a new value added service

Example URI

POST https://bookings.spotahome.com/api/vas/services
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "target": "tenant",
  "name": "link",
  "links": {
    "madrid": "Hello, world!",
    "london": "Hello, world!"
  },
  "imageSrc": "http://example.com/image",
  "imgLogoSrc": "http://example.com/logo",
  "trustpilotScore": "7.7",
  "trustpilotReviewsAmount": "23K"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "target": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "links": {
      "type": "object",
      "properties": {
        "madrid": {
          "type": "string"
        },
        "london": {
          "type": "string"
        }
      }
    },
    "imageSrc": {
      "type": "string"
    },
    "imgLogoSrc": {
      "type": "string"
    },
    "trustpilotScore": {
      "type": "string"
    },
    "trustpilotReviewsAmount": {
      "type": "string"
    }
  },
  "required": [
    "target",
    "name",
    "name",
    "name"
  ]
}
Response  201
Response  401
HideShow
Headers
Content-Type: application/problem+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  409
HideShow
Headers
Content-Type: application/problem+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/problem+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"
  ]
}

Update value added service

Update value added service
PUT/vas/services/

Update a value added service

Example URI

PUT https://bookings.spotahome.com/api/vas/services/
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "id": "857a7a89-e044-4895-aab1-639748d4ed8e",
  "target": "tenant",
  "name": "link",
  "links": "madrid",
  "imageSrc": "http://example.com/image",
  "imgLogoSrc": "http://example.com/logo",
  "trustpilotScore": "7.7",
  "trustpilotReviewsAmount": "23K"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "target": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "links": {
      "type": "string",
      "enum": [
        "madrid",
        "london"
      ]
    },
    "imageSrc": {
      "type": "string"
    },
    "imgLogoSrc": {
      "type": "string"
    },
    "trustpilotScore": {
      "type": "string"
    },
    "trustpilotReviewsAmount": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "target",
    "name",
    "name",
    "name",
    "links"
  ]
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Delete value added service

Delete value added service
DELETE/vas/services/{id}

Delete a value added service

Example URI

DELETE https://bookings.spotahome.com/api/vas/services/id
URI Parameters
HideShow
id
string (required) 

Id of a value added service.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Event Schema

List of Event Schemas

List of Event Schemas
GET/event-schemas

Return all stored event schemas

Example URI

GET https://bookings.spotahome.com/api/event-schemas
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "EA14917183508531F65B35E9D4C64066",
    "name": "SAH\\BookingsPostPaid\\Domain\\BookingRequestWasCreated",
    "schema": {
      "type": "record",
      "name": "BookingRequestWasCreated",
      "namespace": "spotahome.bookings.booking_lead",
      "fields": [
        {
          "name": "bookingLeadId",
          "type": "string"
        },
        {
          "name": "bookingRequestId",
          "type": "long"
        },
        {
          "name": "occurredOn",
          "type": "string"
        }
      ]
    },
    "timestamp": 0
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
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"
  ]
}

Domain Events

BookingRequestWasRemarked
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\BookingRequestWasRemarked",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingRequestId" : 95858,
        "remark"           : "this is the message",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingRequestWasRated
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\BookingRequestWasRated",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingRequestId" : 95858,
        "rating"            : 4,
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingRequestWasViewed
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\BookingRequestWasViewed",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingRequestId" : 95858,
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingRequestDeviceInfoWasAttached
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\BookingRequestDeviceInfoWasAttached",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id" : 95858,
        "deviceType" : "desktop",
        "deviceOs" : "Windows",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
CancellationPenaltyWasCharged
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\CancellationPenaltyWasCharged",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingRequestId" : 95858,
        "amount"            : 10000,
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingWasCreatedFromBookingRequestPostPaid
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingWasCreatedFromBookingRequestPostPaid",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingId"          : "c551b5e8-cba8-4341-bdbd-b1039fd21746",
        "bookingRequestId"   : 95858,
        "feeCollectionType"  : "upfront",
        "rentCollectionType" : "none",
        "billCollectionType" : "none",
        "platformSource"     : "spotahome",
        "plan"               : "standard",
        "occurred_on"        : "2017-05-18T09:55:06.000Z"
    }
}
BookingWasCreatedFromBookingRequestPrePaid
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingWasCreatedFromBookingRequestPrePaid",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingId"          : "c551b5e8-cba8-4341-bdbd-b1039fd21746",
        "bookingRequestId"   : 95858,
        "feeCollectionType"  : "upfront",
        "rentCollectionType" : "none",
        "billCollectionType" : "none",
        "platformSource"     : "spotahome",
        "plan"               : "standard",
        "occurred_on"        : "2017-05-18T09:55:06.000Z"
    }
}
BookingWasCreatedFromRelocation
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingWasCreatedFromRelocation",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingId"          : "c551b5e8-cba8-4341-bdbd-b1039fd21746",
        "bookingRequestId"   : 95858,
        "feeCollectionType"  : "upfront",
        "rentCollectionType" : "none",
        "billCollectionType" : "none",
        "platformSource"     : "spotahome",
        "plan"               : "standard",
        "occurred_on"        : "2017-05-18T09:55:06.000Z"
    }
}
BookingWasCreatedFromPartnerBookingRequest
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingWasCreatedFromPartnerBookingRequest",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"                 : "c551b5e8-cba8-4341-bdbd-b1039fd21746",
        "bookingRequestId"   : 95858,
        "feeCollectionType"  : "upfront",
        "platformSource"     : "spotahome",
        "rentCollectionType" : "none",
        "billCollectionType" : "none",
        "plan"               : "standard",
        "occurred_on"        : "2017-05-18T09:55:06.000Z"
    }
}
BookingWasCreatedFromInstantBooking
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingWasCreatedFromInstantBooking",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingId"          : "c551b5e8-cba8-4341-bdbd-b1039fd21746",
        "bookingRequestId"   : 95858,
        "feeCollectionType"  : "upfront",
        "platformSource"     : "spotahome",
        "rentCollectionType" : "none",
        "billCollectionType" : "none",
        "plan"               : "standard",
        "occurred_on"        : "2017-05-18T09:55:06.000Z"
    }
}
BookingWasCreatedFromPreAccepted
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingWasCreatedFromPreAccepted",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingId"          : "c551b5e8-cba8-4341-bdbd-b1039fd21746",
        "bookingRequestId"   : 95858,
        "feeCollectionType"  : "upfront",
        "platformSource"     : "spotahome",
        "rentCollectionType" : "none",
        "billCollectionType" : "none",
        "plan"               : "standard",
        "occurred_on"        : "2017-05-18T09:55:06.000Z"
    }
}
PartnerBookingRequestWasCreated
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\PartnerBookingRequestWasCreated",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"          : "199259",
        "name"        : "Jane Doe",
        "email"       : "jane.doe@mailing.com",
        "phone"       : "+34666666666",
        "birthday"    : "1983-08-08",
        "gender"      : "female",
        "country"     : "WA",
        "checkIn"     : "2020-08-08",
        "checkOut"    : "2021-08-08",
        "occurred_on" : "2017-05-18T09:55:06.000Z"
    }
}
BookingMovingDatesWereUpdated
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingMovingDatesWereUpdated",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"          : "c551b5e8-cba8-4341-bdbd-b1039fd21746",
        "moveInDate"  : "2019-01-01",
        "moveOutDate" : "2019-02-25",
        "occurredOn"  : "2017-05-18T09:55:06.000Z"
    }
}
BookingRequestWasCreated
{
    "_id": 1,
    "typeName": "SAH\BookingsPostPaid\Domain\Booking\BookingRequestWasCreated",
    "occurredOn": "2017-05-18T09:55:06.000Z",
    "eventBody": {
        "bookingId": 111670,
        "listingId": "110700",
        "checkIn": "2019-08-30",
        "checkOut": "2019-12-31",
        "landlordTransferDueDate": "2019-09-01",
        "bookingProcessId": "5dba3a84-12a4-4a8d-8969-0dede63cd6fd",
        "locator": "34GKGE",
        "ric": "H3",
        "bookingProcess": "post_paid",
        "pricingId": "5dba3a84-12a4-4a8d-8969-0dede63cd6fd",
        "platformSource": "spotahome",
        "occurredOn"  : "2017-05-18T09:55:06.000Z"
    }
}
RenegotiationWasRequestedByLandlord
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\RenegotiationWasRequestedByLandlord",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "bookingRequestId" : "95858",
        "message"          : "A message",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
MovingDatesWereModified
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\MovingDatesWereModified",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id" : "95858",
        "checkIn"          : "2017-06-01",
        "checkOut"         : "2017-07-31",
        "previousCheckIn"  : "2016-06-01",
        "previousCheckOut" : "2016-07-31",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
MovingDatesWereModifiedForAcceptedRenegotiation
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\MovingDatesWereModifiedForAcceptedRenegotiation",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id" : "95858",
        "checkIn"          : "2017-06-01",
        "checkOut"         : "2017-07-31",
        "previousCheckIn"  : "2016-06-01",
        "previousCheckOut" : "2016-07-31",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
RemarkWasCreated
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Remark\RemarkWasCreated",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "95858",
        "bookingRequestId" : "123456",
        "userId"           : "gha67k-jsi89-67ha",
        "message"          : "this is a remark",
        "metadata"         : {"occurredOn": {"date": "2018-03-06 14:50:48.634115", "timezone": "UTC", "timezone_type": 3}}
    }
}
BookingLeadWasCreated
{
    "_id" : 1,
    "type_name": "SAH\BookingsPostPaid\Domain\Lead\BookingLeadWasCreated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body"  : {
       "checkOut" : "2019-02-01",
       "listingId" : "82509",
       "name" : "White",
       "country" : "SZ",
       "id" : "6761ae82-ff66-49ee-b184-1ff9ef45a2ec",
       "bookingProcessId" : "6761ae82-ff66-49ee-b184-1ff9ef45a2ec",
       "birthday" : "1910-10-31",
       "email" : "jugux@mailinator.com",
       "metadata" : {
          "ipAddress" : "1.1.2.2"
       },
       "locator" : "8X1GX6",
       "phone" : "+618-33-6967783",
       "occurredOn" : "2018-08-02",
       "checkIn" : "2018-09-01",
       "gender" : "female",
       "pricingId" : "98593aed-57f5-4d84-95a2-76c28dfe57d9",
       "platformSource": "spotahome",
       "userId" : "57f54d84-ff66-95a2-b184-1ff9ef45a2ec"
    }
}
BookingLeadSocialInfoWasUpdated

Note: bookingLeadId in the event body has been deprecated in favor of id.

{
    "_id" : 82378869,
    "typeName" : "SAH\\BookingsPostPaid\\Domain\\Lead\\BookingLeadSocialInfoWasUpdated",
    "occurredOn" : ISODate("2019-02-26T13:55:58.000Z"),
    "eventBody" : {
       "occupationDetails" : null,
       "occupation" : "student",
       "bookingLeadId" : "4910d87e-7080-4f96-936b-3302e7c570f9",
       "occurredOn" : "2019-02-26T13:55:58+0000",
       "id" : "4910d87e-7080-4f96-936b-3302e7c570f9",
       "couple" : true,
       "message" : "Hi there!"
    }
}
BookingLeadConverted
{
    "_id" : 82380837,
    "typeName" : "SAH\\BookingsPostPaid\\Domain\\Lead\\BookingLeadConverted",
    "occurredOn" : ISODate("2019-02-26T15:11:26.000Z"),
    "eventBody" : {
       "bookingLeadId" : "8e594080-922a-46f1-8ffa-c149b74af31a",
       "occurredOn" : "2019-02-26T15:11:26+0000",
       "bookingRequestId" : 192733
    }
}
BookingLeadHouseRulesWereChecked
{
    "_id" : 82378870,
    "typeName" : "SAH\\BookingsPostPaid\\Domain\\Lead\\BookingLeadHouseRulesWereChecked",
    "occurredOn" : ISODate("2019-02-26T13:55:58.000Z"),
    "eventBody" : {
       "occupationResult" : true,
       "coupleResult" : false,
       "occurredOn" : "2019-02-26T13:55:58+0000",
       "id" : "4910d87e-7080-4f96-936b-3302e7c570f9",
       "genderResult" : true
    }
}
BookingLeadSuitabilityWasChecked
{
    "_id" : 82378871,
    "typeName" : "SAH\\BookingsPostPaid\\Domain\\Lead\\BookingLeadSuitabilityWasChecked",
    "occurredOn" : ISODate("2019-02-26T13:55:58.000Z"),
    "eventBody" : {
       "id" : "4910d87e-7080-4f96-936b-3302e7c570f9",
       "genderSuitable" : true,
       "coupleSuitable" : true,
       "bookingLeadSuitable" : true,
       "occurredOn" : "2019-02-26T13:55:58+0000",
       "occupationSuitable" : true
    }
}
AgentWasAssigned
{
    "_id" : 1,
    "type_name": "SAH\BookingsPostPaid\Domain\AgentWasAssigned",
    "occurred_on": "2018-09-18T08:05:56.000Z",
    "event_body"  : {
       "occurredOn" : "2018-09-18T08:05:56+0000",
       "id"         : "172292",
       "agentId"    : "2230f7f0-a4ef-4844-9518-0e56d4331658"
    }
}
AgentWasUnassigned
{
    "_id" : 1,
    "type_name": "SAH\BookingsPostPaid\Domain\AgentWasUnassigned",
    "occurred_on": "2018-09-18T08:05:56.000Z",
    "event_body"  : {
       "bookingRequestId" : "172292",
       "agentId"          : null,
       "previousAgentId"  : "2230f7f0-a4ef-4844-9518-0e56d4331658",
       "occurredOn"       : "2018-09-18T08:05:56+0000"
    }
}
AgentAssignationWasConfirmed
{
    "_id" : 1,
    "type_name": "SAH\BookingsPostPaid\Domain\AgentAssignationWasConfirmed",
    "occurred_on": "2018-09-18T08:05:56.000Z",
    "event_body"  : {
       "bookingRequestId" : "172292",
       "agentId"          : "2230f7f0-a4ef-4844-9518-0e56d4331658",
       "occurredOn"       : "2018-09-18T08:05:56+0000"
    }
}
BookingRequestExpirationWasChanged
{
    "_id" : 1,
    "type_name": "SAH\BookingsPostPaid\Domain\BookingRequestExpirationWasChanged",
    "occurred_on": "2018-09-18T08:05:56.000Z",
    "event_body"  : {
       "bookingRequestId" : "172292",
       "expirationDate"   : "2018-09-18T08:05:56+0000",
       "actionedBy"       : "2230f7f0-a4ef-4844-9518-0e56d4331658"
    }
}
TenantDetailsWereDeleted
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Tenant\TenantDetailsWereDeleted",
    "occurred_on" : "2019-05-18T09:55:06.000Z",
    "event_body"  : {
        "email"       : "tenant@email.com",
        "occurred_on" : "2019-05-18T09:55:06.000Z"
    }
}
BankAccountHoldersWereDeleted
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Landlord\BankAccountHoldersWereDeleted",
    "occurred_on" : "2019-05-18T09:55:06.000Z",
    "event_body"  : {
        "email"       : "landlord@email.com",
        "occurred_on" : "2019-05-18T09:55:06.000Z"
    }
}

BookingChargeWasAuthorized

{
   "bookingId" : 82375,
   "occurredOn" : "2017-01-19T15:03:13+0000",
   "provider" : "braintree",
   "instrumentType" : "credit_card"
}

BookingChargeFailed

{
   "bookingId" : 82375,
   "occurredOn" : "2017-01-19T15:03:13+0000",
   "errorMessage" : "Insufficient Funds",
   "provider" : "braintree",
   "instrumentType" : "credit_card"
}

BookingWasCharged

{
   "bookingId" : 79400,
   "occurredOn" : {
      "timezone_type" : 3,
      "date" : "2016-12-22 09:00:44.000000",
      "timezone" : "UTC"
   },
   "currencyCode" : "EUR",
   "provider" : "braintree",
   "instrumentType" : "credit_card",
   "amount" : 1597,
   "transactionId" : "n7ek5cs8"
}

PreAcceptedBookingWasCreated

{
   "id" : "79400",
   "occurredOn" : "2020-07-07 15:00:00.000",
   "listingId" : "230003",
   "checkInDate" : "2020-07-10",
   "checkOutDate" : "2020-08-10",
   "startContractDate" : "2020-07-10",
   "endContractDate" : "2020-08-10",
   "bookingRequestCreationDate" : "2020-07-07"
}
InstantBookingConditionsForListingWereCreated
{
    "_id" : 1,
    "type_name": "SAH\BookingsPostPaid\Domain\Listing\InstantBookingConditionsForListingWereCreated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
     {
         "gender": "male",
         "metadata": {
             "occurredOn": {
                 "date": "2018-05-18 14:34:14.216743",
                 "timezone": "UTC",
                 "timezone_type": 3
             }
         },
         "listingId": "99912",
         "monthlyMinStay": [
             5,
             5,
             4,
             3,
             2,
             1,
             1,
             1,
             5,
             4,
             3,
             2
         ],
         "ageRangeAllowed": [
             18,
             35
         ],
         "areCouplesAllowed": true,
         "maxDaysBeforeCheckIn": 60,
         "isInstantBookingEnabled": true
     }
}
InstantBookingConditionsForListingWereUpdated
{
    "_id" : 1,
    "type_name": "SAH\BookingsPostPaid\Domain\Listing\InstantBookingConditionsForListingWereUpdated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
     {
         "gender": "male",
         "metadata": {
             "occurredOn": {
                 "date": "2018-05-18 15:15:41.542048",
                 "timezone": "UTC",
                 "timezone_type": 3
             }
         },
         "listingId": "100923",
         "monthlyMinStay": [
             5,
             5,
             4,
             3,
             2,
             1,
             1,
             1,
             5,
             4,
             3,
             2
         ],
         "ageRangeAllowed": [
             18,
             35
         ],
         "areCouplesAllowed": true,
         "maxDaysBeforeCheckIn": 60,
         "isInstantBookingEnabled": true
     }
}
ScheduleForAgentWasSet
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\BookingAgent\Schedule\ScheduleForAgentWasSet",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id" : `xx-yy-zz`,
        "agentId" : "aa-bb-cc",
        "day" : 2017-03-21,
        "hours" : [
            [
                "09:00", "14:00"
            ],
            [
                "15:00", "18:00"
            ]
        ],
        "metadata" : {
            "occurredOn" : {
                "date"          : "2018-02-05 16:00:44.532756",
                "timezone"      : "UTC",
                "timezone_type" : 3
            }
        }
    }
}
BookingCreated
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingCreated",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"                 : "c197e843-8120-419a-bc7c-6449b239fbfb",
        "occurred_on"        : "2017-05-18T09:55:06.000Z",
        "bookingRequestId"   : "123456",
        "platformSource"     : "spotahome",
        "plan"               : "standard",
        "rentCollectionType" : "none",
        "billCollectionType" : "none"
    }
}
BookingStarted
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingStarted",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "c197e843-8120-419a-bc7c-6449b239fbfb",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingCheckedIn
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingCheckedIn",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "c197e843-8120-419a-bc7c-6449b239fbfb",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingCancelled
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingCancelled",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "c197e843-8120-419a-bc7c-6449b239fbfb",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingCheckedOut
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\Booking\BookingCheckedOut",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "c197e843-8120-419a-bc7c-6449b239fbfb",
        "occurred_on"      : "2017-05-18T09:55:06.000Z"
    }
}
BookingIntentionWasCreated
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\BookingIntention\BookingIntentionWasCreated",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "95858",
        "userId"           : "gha67k-jsi89-67ha",
        "listingId"        : "123456",
        "checkIn"          : "2020-10-20",
        "checkOut"         : "2020-11-24",
        "platformSource"   : "spotahome",
        "metadata"         : {"occurredOn": {"date": "2018-03-06 14:50:48.634115", "timezone": "UTC", "timezone_type": 3}}
    }
}
BookingRequestRenegotiationWasRequested
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\RenegotiationSuggestion\BookingRequestRenegotiationWasRequested",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "d0e47311-cebc-48b3-9544-b31c4c853ca7",
        "bookingRequestId" : "123456",
        "userId"           : "1bdb151d-c8a0-4988-aa8b-7496214c877d",
        "newCheckInDate"   : "2020-11-24",
        "newCheckOutDate"  : "2020-11-24",               
        "status"           : "WaitingForAnswer",
        "requestedAt"      : "2020-11-24 14:30:02",
        "landlordComment"  : "I want to change the check-in date",
        "occurredOn"       : "2018-03-06 14:50:48.634115"
    }
}
BookingRequestRenegotiationWasAccepted
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\RenegotiationSuggestion\BookingRequestRenegotiationWasAccepted",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "d0e47311-cebc-48b3-9544-b31c4c853ca7",
        "bookingRequestId" : "123456",
        "userId"           : "1bdb151d-c8a0-4988-aa8b-7496214c877d",
        "status"           : "Accepted",
        "closedAt"      : "2020-11-24 14:30:02",        
        "occurredOn"       : "2018-03-06 14:50:48.634115"
    }
}
BookingRequestRenegotiationWasRejected
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\RenegotiationSuggestion\BookingRequestRenegotiationWasRejected",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "d0e47311-cebc-48b3-9544-b31c4c853ca7",
        "bookingRequestId" : "123456",
        "userId"           : "1bdb151d-c8a0-4988-aa8b-7496214c877d",
        "status"           : "Rejected",
        "closedAt"      : "2020-11-24 14:30:02",        
        "occurredOn"       : "2018-03-06 14:50:48.634115"
    }
}
BookingRequestRenegotiationWasClosed
{
    "_id"         : 1,
    "type_name"   : "SAH\BookingsPostPaid\Domain\RenegotiationSuggestion\BookingRequestRenegotiationWasClosed",
    "occurred_on" : "2017-05-18T09:55:06.000Z",
    "event_body"  : {
        "id"               : "d0e47311-cebc-48b3-9544-b31c4c853ca7",
        "bookingRequestId" : "123456",
        "userId"           : "1bdb151d-c8a0-4988-aa8b-7496214c877d",
        "status"           : "Closed",
        "closedAt"      : "2020-11-24 14:30:02",        
        "occurredOn"       : "2018-03-06 14:50:48.634115"
    }
}

Event store

Get Domain Events

Get Domain Events
GET/api/monolith/event-store/{fromEventId}-{toEventId}

Gets a specific set of domain events from a specific interval. A maximum of 500 results will be shown if more are requested.

Example URI

GET https://bookings.spotahome.com/api/api/monolith/event-store/fromEventId-toEventId
URI Parameters
HideShow
fromEventId
number (required) 

From domain event id

toEventId
number (required) 

To domain event id

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "events": [
    {
      "typeName": "SAH\\BookingsPostPaid\\Domain\\NotifyBookingRequestCreationInitiated",
      "occurredOn": "2017-07-03T11:20:35.000Z",
      "eventBody": "{\"bookingRequestId\":102549,\"occurredOn\":\"2017-07-03T11:20:35+0000\"}"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "events": {
      "type": "array"
    }
  }
}
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"
  ]
}

Payment Provider

A Payment Provider is a service which allows the system to perform payments over Booking Requests

Client Token

Client Token
POST/payment-provider/client-token

Generate a client token from the given provider

Example URI

POST https://bookings.spotahome.com/api/payment-provider/client-token
Request
HideShow
Headers
Content-Type: application/json
Body
{}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {}
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "clientToken": "abcabcabc"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/problem+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  422
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

UnitStayRules

UnitStayRules

Create and Update multiple Unit Stay Rules
PUT/unit-stay-rules

This endpoint creates and updates unit stay rules information for a given unit.

Example URI

PUT https://bookings.spotahome.com/api/unit-stay-rules
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
[
  {
    "unitId": "123098",
    "bookingTooEarlyDays": 90,
    "minStay": 50,
    "maxStay": 90
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  204
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Create and partial update multiple Unit Stay Rules
PATCH/unit-stay-rules

This endpoint creates and updates unit stay rules information for a given unit.

Example URI

PATCH https://bookings.spotahome.com/api/unit-stay-rules
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
[
  {
    "unitId": "123098",
    "bookingTooEarlyDays": 90,
    "minStay": 50,
    "maxStay": 90
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  204
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Get UnitStayRules by Unit Id
GET/unit-stay-rules/{unitId}

This endpoint gets unit stay rules information for a given unit.

Example URI

GET https://bookings.spotahome.com/api/unit-stay-rules/123456
URI Parameters
HideShow
unitId
string (required) Example: 123456

Id of a Unit.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "unitId": "123098",
  "bookingTooEarlyDays": 90,
  "minStay": 50,
  "maxStay": 90
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "unitId": {
      "type": "string"
    },
    "bookingTooEarlyDays": {
      "type": [
        "number",
        "null"
      ]
    },
    "minStay": {
      "type": [
        "number",
        "null"
      ]
    },
    "maxStay": {
      "type": [
        "number",
        "null"
      ]
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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  404
HideShow
Headers
Content-Type: application/problem+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"
  ]
}

CityRules

Get minimum stay by set of units

Get minimum stay by set of units
POST/properties/city-rules

This endpoint gets unit stay rules information of a list of unit ids.

Example URI

POST https://bookings.spotahome.com/api/properties/city-rules
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "unitIds": [
    "188392"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "cities": [
    {
      "id": "barcelona",
      "minStay": 30
    }
  ],
  "maxMinStay": 30
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "cities": {
      "type": "array"
    },
    "maxMinStay": {
      "type": "number"
    }
  },
  "required": [
    "maxMinStay"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/problem+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/problem+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"
  ]
}

Renegotiation Suggestion

Renegotiation Suggestion

Create Renegotiation Suggestion
POST/booking-requests/{bookingRequestId}/renegotiation-suggestions

Authorization: protected for ROLE_ACCOMMODATION_PROVIDER if booking request owner, uai_admin and uai_employee role.

Example URI

POST https://bookings.spotahome.com/api/booking-requests/bookingRequestId/renegotiation-suggestions
URI Parameters
HideShow
bookingRequestId
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "newCheckInDate": "yyyy-mm-dd",
  "newCheckOutDate": "yyyy-mm-dd",
  "newStartContractDate": "yyyy-mm-dd",
  "newEndContractDate": "yyyy-mm-dd",
  "landlordComment": "This is a landlord comment about why he wants to change the booking request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "newCheckInDate": {
      "type": "string"
    },
    "newCheckOutDate": {
      "type": "string"
    },
    "newStartContractDate": {
      "type": "string"
    },
    "newEndContractDate": {
      "type": "string"
    },
    "landlordComment": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/problem+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/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Get Renegotiation Suggestion
GET/booking-requests/{bookingRequestId}/renegotiation-suggestions

Authorization: protected for ROLE_ACCOMMODATION_PROVIDER if booking request owner, uai_admin and uai_employee role.

Example URI

GET https://bookings.spotahome.com/api/booking-requests/bookingRequestId/renegotiation-suggestions
URI Parameters
HideShow
bookingRequestId
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "ad4b1e06-952e-4738-9221-7988a285a6a1",
    "bookingRequestId": "99998",
    "userId": "9cc5b319-49fd-4c41-afb5-1d55360f56bb",
    "newCheckInDate": "2023-09-05 00:00:00",
    "newCheckOutDate": "2023-11-04 00:00:00",
    "status": "WaitingForAnswer",
    "requestedAt": "2023-09-04 11:37:50",
    "closedAt": "2023-09-10 11:37:50",
    "landlordComment": "this is just a landlord comment"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: application/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Get Renegotiation Suggestion
GET/booking-requests/{bookingRequestId}/renegotiation-suggestions/{id}

Authorization: protected for ROLE_ACCOMMODATION_PROVIDER if booking request owner, uai_admin and uai_employee role.

Example URI

GET https://bookings.spotahome.com/api/booking-requests/bookingRequestId/renegotiation-suggestions/id
URI Parameters
HideShow
id
string (required) 

Id of a renegotiation.

bookingRequestId
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "ad4b1e06-952e-4738-9221-7988a285a6a1",
  "bookingRequestId": "99998",
  "userId": "9cc5b319-49fd-4c41-afb5-1d55360f56bb",
  "newCheckInDate": "2023-09-05 00:00:00",
  "newCheckOutDate": "2023-11-04 00:00:00",
  "status": "WaitingForAnswer",
  "requestedAt": "2023-09-04 11:37:50",
  "closedAt": "2023-09-10 11:37:50",
  "landlordComment": "this is just a landlord comment"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "bookingRequestId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "newCheckInDate": {
      "type": "string"
    },
    "newCheckOutDate": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "requestedAt": {
      "type": "string"
    },
    "closedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "landlordComment": {
      "type": "string"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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"
  ]
}

Reject Renegotiation Suggestion
PUT/booking-requests/{bookingRequestId}/renegotiation-suggestions/{id}/rejects

Authorization: protected for uai_tenant if booking request owner, uai_admin and uai_employee role.

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/bookingRequestId/renegotiation-suggestions/id/rejects
URI Parameters
HideShow
id
string (required) 

Id of a renegotiation.

bookingRequestId
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Accept Renegotiation Suggestion
PUT/booking-requests/{bookingRequestId}/renegotiation-suggestions/{id}/accepts

Authorization: protected for uai_tenant if booking request owner, uai_admin and uai_employee role.

Example URI

PUT https://bookings.spotahome.com/api/booking-requests/bookingRequestId/renegotiation-suggestions/id/accepts
URI Parameters
HideShow
id
string (required) 

Id of a renegotiation.

bookingRequestId
string (required) 

Id of a Booking Request.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/problem+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/problem+json
Body
{
  "detail": "Forbidden",
  "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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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/problem+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"
  ]
}

Generated by aglio on 11 Nov 2025