NAV Navbar
shell

Introduction

Our REST based APIs allow you to get access to the Smoobu Application. We have different APIs for different usecases. On this page we explain you a little bit more detailled what you need for your usecase as a host.

Please contact us before you start coding. We send you the necessary keys and all further information you need to know. Tell us a few words about your ideas and plans. We are always happy to help our customers and our partners to build a perfect integrated and easy to use solution.

Send us an email to api@smoobu.com to join our mailing list and keep updated about all issues, developer news and API updates.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "Api-Key: secretApiKey"

Make sure to replace secretApiKey with your API key.

If you want to develop an API for a single Smoobu user you get this API key from the Smoobu support. All you have to do is to open a support ticket from your account and ask for the key.

Please insert this key into the header. If your API-Key is ABCDEFGH Your header should look like: ‘API-key: ABCDEFGH’

If you are a developer of a third party tool which is relevant for more than one Smoobu user please read the part at the end of the documentation.

Smoobu Availability API

curl -X POST \
  https://login.smoobu.com/booking/checkApartmentAvailability \
  -H 'Api-Key: secretApiKey' \
  -H 'cache-control: no-cache' \
  -d '{
    "arrivalDate" : "2017-11-01",
    "departureDate":  "2017-12-03",
    "apartments": [2, 3, 14],
    "customerId": 9
}'

The above command returns JSON structured like this:

{
    "availableApartments": [
        2,
        3,
        14

    ],
    "prices": {
        "3": {
            "price": 36560,
            "currency": "IDR"
        },
        "14": {
            "price": 4415,
            "currency": "IDR"
        }
    },
    "errorMessages": {
        "2": {
            "errorCode": 401,
            "message": "The duration of the booking is too short.",
            "minimumLengthOfStay": 50
        }
    }
}

If the authentication failed it return this jason:

{
    "title": "Error occurred",
    "detail": "verification error"
}

Partners and customers of Smoobu can check their availability of properties and dates. For that you send a request with arrival and departure date and the property ID.

HTTP Request

POST https://login.smoobu.com/booking/checkApartmentAvailability

Json Request Body

Parameter Format Description
arrivalDate yyyy-mm-dd Start date of the booking.
departureDate yyyy-mm-dd End date of the booking.
apartments array Check availability in the given apartments. If apartments is empty it check all apartments.
customerId int Id of the customer/user with the given apartment and the api key.

Json Response

We send you more than available or unavailable. If it is available we send you the price for that period. If you have restrictions which don't allow this reservation we show the reason for disapproval.

Parameter Format Description
availableApartments array All available apartments from request.
prices object The Key of the price object match with the apartment id. The price object contain the price and the currency.
prices.price int price for the range and for the apartment.
prices.currency string Currency of the price.
errorMessages object The Key of the error message object match with the apartment id. The error message object contain all unavailable apartments with reason why it not available.
errorMessages.errorCode int Error id.
errorMessages.message string Error message.
errorMessages.minimumLengthOfStay int Number of required days. Occur only if the booking is to short.
errorMessages.numberOfGuest int Max number of guests. Occur only if the number of guests is to high.
errorMessages.leadTime int Number of days before a booking. Occur Only if the number of days before is to small.
errorMessages.minimumLengthBetweenBookings int Number of days between bookings. Occur only if the Distance between bookings is to short.
errorMessages.arrivalDays int Allowed arrival dates. Occur only if the arrival day is not in the list of allowed days.

Errors

Error Code Message
400 The number of guests exceeds the limit of the apartment.
401 The duration of the booking is too short.
402 The chosen day of arrival is not available
403 Arrival day is too short term.
404 Minimum between bookings is too short.

Create Booking Api

The above command create a booking only with the mandatory fields:

curl -X POST \
  http://login.smoobu.com/api/apartment/54/booking \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
  "arrivalDate": "01.09.2019",
  "departureDate": "03.09.2019",
  "channelId": 63
}'

The above command returns JSON structured like this with Status code 200:

{
    "id": 906
}

The above comand create a booking with all fields:

curl -X POST \
  http://login.smoobu.com/api/apartment/54/booking \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
  "arrivalDate": "05.09.2019",
  "departureDate": "08.09.2019",
  "channelId": 63,
  "arrivalTime": "12:00",
  "departureTime": "15:00",
  "firstName": "Max",
  "lastName": "Mustermann",
  "email": "ma@muster.de",
  "phone": "0177123456789",
  "notice": "Breakfast, one dog",
  "adults": 2,
  "children": 3,
  "price": 150.20,
  "priceStatus": 1,
  "deposit": 50,
  "depositStatus": 1,
  "language": "en"
}'

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

Response if there is an validation error code 400:

{
    "status": 400,
    "title": "Bad Request",
    "detail": "Failed validation",
    "validation_messages": {
        "error": "There exists already a reservation from 05.09.2019 to 08.09.2019."
    }
}

Partners and customers of Smoobu can send bookings to Smoobu. Our application receives them like a booking from a booking channel and synchronizes it into every other channel.

HTTP Request

POST https://login.smoobu.com/api/apartment/<apartmentId>/booking

URL Parameters

Parameter Description
apartmentId Id of the apartment

Json Request Body

Parameter Format Mandatory Description
arrivalDate yyyy-mm-dd Yes Start date of the booking.
departureDate yyyy-mm-dd Yes End date of the booking.
channelId int Yes Id of the channel. Smoobu provide the id.
arrivalTime string * Time when the guest will arrive. In the Format "HH:ii"
departureTime string No Time when the guest will departs. In the Format "HH:ii"
firstName string * First name of the guest
lastName string * First name of the guest
notice string * Notes. Free text field for you information.
adults int No Number of adults
children int No Number of children
price float No Total price of the booking.
priceStatus int No Id of the price status. See table below.
deposit float No Deposit of the booking.
depositStatus int No Id of the deposit status. See table below.
address object * address of the guest
address.street string * street of the address
address.postalCode string * postal code of the address
address.location string * location of the address
country string * country of the address
email string * Email of the guest
phone string * Phone Number of the guest
language string No Guest language i.e en, de, es

* depend on the user settings which can be found in the booking-tool settings in "Form Content"

Price/Deposit Status

Id Description
1 open/not payed
2 partially paid
3 complete payment

Json Response

Parameter Format Description
id int If booking successful entered it return the booking id

Get Booking Api

The above command get all bookings:

curl -X GET \
  http://login.smoobu.com/api/apartment/1/booking \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache''

The above command returns JSON structured like this with Status code 200:

{
 "page_count": 1,
 "page_size": 25,
 "total_items": 3,
 "page": 1,
 "bookings": [
 {
  "id": 291,
  "type": "reservation",
  "arrival": "2018-01-10",
  "departure": "2018-01-12",
  "created-at": "2018-01-03 13:51",
  "apartment": {
   "id": 50017,
   "name": "Seaside apartment"
  },
  "channel": {
   "id": 465614,
   "name": "Booking.com"
  },
  "guest-name": "Harry Potter",
  "email": "HarryPotter@hogwarts.com",
  "phone": "+49123456789"
  "adults": 3,
  "children": 2,
  "check-in": "16:00",
  "check-out": "10:00",
  "notice": "",
  "price": 150,
  "price-paid": "Yes",
  "deposit": 0,
  "deposit-paid": "No"
 },
 {
  "id": 292,
  "type": "reservation",
  "arrival": "2018-01-22",
  "departure": "2018-01-25",
  "created-at": "2018-01-03 13:51",
  "apartment": {
   "id": 50017,
   "name": "Seaside apartment"
  },
  "channel": {
   "id": 465885,
   "name": "Airbnb"
  },
  "guest-name": "Hermine Granger",
  "email": "Hermine@hogwarts.com",
  "phone": "+49123456789",
  "adults": 1,
  "children": 0,
  "check-in": "18:00",
  "check-out": "",
  "notice": "she arrives by plane and is maybe a little bit late",
  "price": 200,
  "price-paid": "YES",
  "deposit": 0,
  "deposit-paid": "No"
  },
 ]
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

With this Call you can get all your existing reservations with all information.

HTTP Request

GET https://login.smoobu.com/api/apartment/<apartmentId>/booking

URL Parameters

Parameter Description
apartmentId Id of the apartment

URL Query Parameters

Parameter Format Mandatory Description
created_from yyyy-mm-dd No show all bookings with the created at in the range
created_to yyyy-mm-dd No show all bookings with the created at in the range
from yyyy-mm-dd No show all bookings in the range
to yyyy-mm-dd No show all bookings in the range
showCancellation boolean No show canceled bookings too
page int No current page

Json Response

Parameter Format Description
page_count int number of all pages
page_size int max number of bookings on one page
total_items int number of all bookings
page int number of current page
bookings array contain all booking objects
bookings.id int id of the booking
bookings.type string see types in the table below
bookings.arrival string start date of the booking
bookings.departure string end date of the booking
bookings.created-at string create date of the booking
bookings.apartment object apartment of the booking
bookings.apartment.id int id of the apartment
bookings.apartment.name string name of the apartment
bookings.channel object channel of the booking
bookings.channel.id int id of the channel
bookings.channel.name int name of the channel
bookings.guest-name string name of the guest
bookings.email string email of the guest
bookings.phone string phone number of the guest
bookings.adults int number of adults
bookings.children int number of children
bookings.check-in string check in time of the guests
bookings.check-out string check in time of the guests
bookings.notice string notice from the guests
bookings.price int price of the booking
bookings.price-paid bool price already paid ("yes"/"no")
bookings.deposit int deposit of the booking
bookings.deposit-paid bool deposit already paid ("yes"/"no")

booking type

booking type
reservation
modification of booking
cancellation

Cancel Reservation Api

The above command cancel a reservation:

curl -X DELETE \
  http://login.smoobu.com/api/apartment/1/booking/54 \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache''

The above command returns JSON structured like this with Status code 200:

{
 "success": true
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

With this call you can cancel a existing reservation. The booking is still in the system as a cancelled booking.

HTTP Request

DELETE https://login.smoobu.com/api/apartment/<apartmentId>/booking/<bookingId>

URL Parameters

Parameter Description
apartmentId Id of the apartment
bookingId Id of the booking

Get Rates Api

The above command get all dates:

curl -X GET \
  http://login.smoobu.com/api/rates?apartments[]=398&apartments[]=401&start_date=2019-01-15&end_date=2019-01-30 \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache''

The above command returns JSON structured like this with Status code 200:

{
    "data": {
        "398": {
            "2019-01-15": {
                "price": 444,
                "min_length_of_stay": 2,
                "available": 1
            },
            "2019-01-16": {
                "price": 444,
                "min_length_of_stay": 2,
                "available": 1
            },
            "2019-01-17": {
                "price": 444,
                "min_length_of_stay": 2,
                "available": 1
            },
            "2019-01-18": {
                "price": 444,
                "min_length_of_stay": 2,
                "available": 1
            },
            "2019-01-19": {
                "price": 444,
                "min_length_of_stay": 2,
                "available": 1
            },
            "2019-01-20": {
                "price": 200,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-21": {
                "price": 200,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-22": {
                "price": 200,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-23": {
                "price": 200,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-24": {
                "price": 200,
                "min_length_of_stay": 3,
                "available": 1
            },
            "2019-01-25": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-26": {
                "price": 444,
                "min_length_of_stay": 2,
                "available": 1
            },
            "2019-01-27": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-28": {
                "price": 45,
                "min_length_of_stay": 5,
                "available": 1
            },
            "2019-01-29": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-30": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            }
        },
        "401": {
            "2019-01-15": {
                "price": 170,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-16": {
                "price": 170,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-17": {
                "price": 170,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-18": {
                "price": 170,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-19": {
                "price": 170,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-20": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-21": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-22": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-23": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-24": {
                "price": 200,
                "min_length_of_stay": 3,
                "available": 1
            },
            "2019-01-25": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-26": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-27": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-28": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-29": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            },
            "2019-01-30": {
                "price": null,
                "min_length_of_stay": null,
                "available": 1
            }
        }
    }
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

Example Response for validation error error code 500: json { "status": 500, "title": "Internal Server Error", "detail": "Apartment not found for this user" }

With this Call you can get all your rates

HTTP Request

GET https://login.smoobu.com/api/rates

URL Query Parameters

Parameter Format Mandatory Description
start_date yyyy-mm-dd Yes show all dates in the range
end_date yyyy-mm-dd Yes show all dates in the range
apartments array Yes array of apartment ids

Json Response

Parameter Format Description
data array include all dates departed in apartments. Array key is the apartment id
data.date object Array key is date in form y yyyy-mm-dd
date.price double price of this date. Null if there is no price
date.min_length_of_stay int min length of stay for this date. Null if there is no value
date.available int say how often the apartment is available 0 for not available

Post Rates Api

The above command create/update a rate:

curl -X POST \
  http://login.smoobu.com/api/rest \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
  "apartments": [apartmentId1, apartmentId2],
  "operations": [
    {
        "dates": [
            "2019-01-24:2019-01-27",
            "2019-01-29",
            "2019-02-01:2019-02-05"
        ],
        "daily_price": 140,
        "min_length_of_stay": 2
    },

    {
            "dates": [
                "2019-02-29"               
            ],
            "daily_price": 200,
            "min_length_of_stay": 4
        }
  ]
}'

The above command returns JSON structured like this with Status code 200:

{
    "success": true
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

Response if you send only min length of stay but there is no price error code 500:

{
    "status": 500,
    "title": "Internal Server Error",
    "detail": "Price is required"
}

Example Response for validation error error code 500:

{
    "status": 500,
    "title": "Internal Server Error",
    "detail": "invalid Date format 22\/01\/19"
}

Partners and customers of Smoobu can send rates to Smoobu. Our application synchronizes it into other channels which has enabled the price sync.

HTTP Request

POST https://login.smoobu.com/api/rates

Json Request Body

Parameter Format Mandatory Description
apartments array Yes Array with apartment ids
operations objects Yes array with all operations
operation.dates array Yes Dates for the operation you can add a single dates with format "yyyy-mm-dd" or a ranges with format "yyyy-mm-dd:yyyy-mm-dd".
operation.daily_price double * Price of the operation
operation.min_length_of_stay int * Min length of booking. Can only set if this date has a price or set together with price

* operation need minimum one of this values but not all

Json Response

Parameter Format Description
success boolean response is true or validation error response with message in detail

Get Apartment-IDs Api

The above command get all apartments

curl -X GET \
  http://login.smoobu.com/api/apartment \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache''

The above command returns JSON structured like this with Status code 200:

{
 "apartments": [
  {
    "id": 1,
    "name": "Property 1"
  },
  {
    "id": 2,
    "name": "Property 2"
  }
 ]
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

With this Call you can get all your properties.

HTTP Request

GET https://login.smoobu.com/api/apartment

Json Response

Parameter Format Description
apartments array contain all apartment objects
apartments.id int id of the apartment
apartments.name string name of the apartment

Get Listing Details Api

The above command get more details for a specific listing

curl -X GET \
  http://login.smoobu.com/api/apartment/1 \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache''

The above command returns JSON structured like this with Status code 200:


{
    "location": {
        "street": "Wönnichstr. 68/70",
        "zip": "10317",
        "city": "Berlin",
        "country": "Germany",
        "latitude": "52.5200080000000",
        "longitude": "13.4049540000000"
    },
    "rooms": {
        "bedrooms": 4,
        "bathrooms": 2,
        "maxOccupancy": 4
    },
    "equipments": [
        "Internet",
        "Whirlpool",
        "Pool",
        "Heating"
    ],
    "currency": "EUR"
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

With this call you can get more information about one property. Especially the information which are relevant to calculate competitive rates. You can create and edit this content in the Smoobu website builder even if you don't use our website or the website isn't online.

HTTP Request

`GET https://login.smoobu.com/api/apartment

URL Parameters

Parameter Description
apartmentId Id of the apartment // you can fin the apartment id in getApartmentsApi

Json Response

Parameter Format Description
location object group all location information of the apartment
location.street string street of the apartment
location.zip string zip of the apartment
location.city string city of the apartment
location.country string country of the apartment
location.latitude string latitude of the apartment
location.longitude string longitude of the apartment
rooms object group all room information of the apartment
rooms.bedrooms integer number of bedrooms
rooms.bathrooms integer number of bathrooms
rooms.maxOccupancy integer max number of persons
amenities array list of amenities
currency string Currency of the user e.g. ("EUR")

Get Message Api

Below command to get all messages:

curl -X GET \
  http://login.smoobu.com/api/apartment/1/booking/1/message \
  -H 'Api-Key: secretApiKey' \
  -H 'Cache-Control: no-cache''

The above command returns JSON structured like this with Status code 200:

{
 "page_count": 1,
 "page_size": 25,
 "total_items": 2,
 "page": 1,
 "messages": [
 {
  "id": 1,
  "subject": "welcome",
  "message": "Hello Kim Klaus, Thank you for booking our Apartment Property 3. You have booked the apartment for 1 person. You can email us @ smoobu. Contact us for advance information on how to get there and how to get there. Ideal to inform you about sightseeing opportunities around Apartment 3 or give you tips on where to spend a cozy evening.  We are looking forward to hearing from you.",
  "messageHtml": "<p>Hello Kim Klaus, <br />Thank you for booking our Apartment Property 3. You have booked the apartment for 1 person. You can email us @ smoobu. Contact us for advance information on how to get there and how to get there. Ideal to inform you about sightseeing opportunities around Apartment 3 or give you tips on where to spend a cozy evening.  We are looking forward to hearing from you.</p>",
  "type": 2
 },
 {
  "id": 2,
  "subject": "re-welcome",
  "message": "",
  "messageHtml": "<p>Please send me exact apartment location</p>",
  "type": 1
  }
 ]
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

With this call you can get all messages and the complete conversation for a reservation.

HTTP Request

GET https://login.smoobu.com/api/apartment/<apartmentId>/booking/<bookingId>

URL Parameters

Parameter Description
apartmentId Id of the apartment
bookingId Id of the booking

URL Query Parameters

Parameter Format Mandatory Description
page int No current page
onlyRelatedToGuest boolean No get messages only related to guest. Setting this parameter to false will fetch all messages for the booking.

Json Response

Parameter Format Description
page_count int number of all pages
page_size int max number of messages on one page
total_items int number of all messages
page int number of current page
messages array contain all message objects
messages.id int id of the booking
messages.subject string message subject
messages.message string plain-text message
messages.htmlMessage string message in html
messages.type int 1 = inbox, 2 = outbox

Send message to guest

Below command send a message to guest for the given booking:

curl -X POST \
  'https://login.smoobu.com/api/apartment/6/booking/1/send-message-to-guest' \
  -H 'Api-Key: _5ybL0NssHvDT3WL4AlWUtfcYHup~-vw' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "subject" : "Test subject",
    "messageBody" : "test"
}'

The above command returns JSON structured like this with Status code 201:

{
    "status": 201,
    "title": "Resource created successfully",
    "detail": ""
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

Response if there is an validation error code 400:

{
    "status": 400,
    "title": "Bad Request",
    "detail": "Failed validation",
    "validation_messages": {
        "messageBody": {
            "isEmpty": "Value is required and can't be empty"
        }
    }
}

Partners and customers of Smoobu can send message to guests of a reservation.

HTTP Request

POST https://login.smoobu.com/api/apartment/<apartmentId>/booking/<bookingId>/send-message-to-guest

URL Parameters

Parameter Description
apartmentId Id of the apartment
bookingId Id of the booking

Json Request Body

Parameter Format Mandatory Description
subject string No Message subject
messageBody string Yes Message content in HTML or plain-text.

Send message to host

Below command send a message to host for the given booking:

curl -X POST \
  'https://login.smoobu.com/api/apartment/6/booking/1/send-message-to-host' \
  -H 'Api-Key: _5ybL0NssHvDT3WL4AlWUtfcYHup~-vw' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "subject" : "Test subject",
    "messageBody" : "test"
}'

The above command returns JSON structured like this with Status code 201:

{
    "status": 201,
    "title": "Resource created successfully",
    "detail": ""
}

Response if authentication failed Status code 401:

{
    "status": 401,
    "title": "Unauthorized",
    "detail": "Authentication required"
}

Response if there is an validation error code 400:

{
    "status": 400,
    "title": "Bad Request",
    "detail": "Failed validation",
    "validation_messages": {
        "messageBody": {
            "isEmpty": "Value is required and can't be empty"
        }
    }
}

Partners and customers of Smoobu can send messages to the Smoobu user as a host.

HTTP Request

POST https://login.smoobu.com/api/apartment/<apartmentId>/booking/<bookingId>/send-message-to-host

URL Parameters

Parameter Description
apartmentId Id of the apartment
bookingId Id of the booking

Json Request Body

Parameter Format Mandatory Description
subject string No Message subject
messageBody string Yes Message content in HTML or plain-text.

Third Party Providers

We have a different authorization process for third party providers that have solutions for more than one Smoobu user. Please contact us and tell us more about your product and business model. We can list you as a third party provider that our users get easy access to your system and you get all the rights you need for your product. Third party providers can be smart pricing tools, booking portals, accounting software, smartlock systems and many more.

Webhooks

example for updateRates webhook:

{
   "action":"updateRates",
   "user":"7",
   "data":{
      "398":{
         "2019-01-15":{
            "price":444,
            "min_length_of_stay":2,
            "available":1
         },
         "2019-01-16":{
            "price":444,
            "min_length_of_stay":2,
            "available":1
         },
         "2019-01-17":{
            "price":444,
            "min_length_of_stay":2,
            "available":1
         }
      }
   }
}

example for newReservation webhook:

{
 "action": "newReservation",
 "user": 7,
 "data": {
   "id": 292,
   "type": "modification of booking",
   "arrival": "2019-08-11",
   "departure": "2019-08-13",
   "created-at": "2019-08-08 15:25",
   "apartment": {
     "id": 38,
     "name": "Apartment 1"
   },
   "channel": {
     "id": 3,
     "name": "API"
   },
   "guest-name": "Steffen Hansen",
   "email": "steffen@smoobu.com",
   "phone": null,
   "adults": 1,
   "children": 0,
   "check-in": null,
   "check-out": null,
   "notice": "Zahlungsmethode: Rechnung (Überweisung)",
   "price": 444,
   "price-paid": "No",
   "deposit": null,
   "deposit-paid": "No"
 }
}

It is very important that calendars and rates are always up to date. If you use cron jobs you can never guarantee correct data in real time. So we provide a webhook functionality that notificates you if there are any updates. Every Smoobu user can enter a webhook URL in the API settings. Then we send a webhook containing a json file to this URL if there are any changes in the calendar regarding rates or availabilities.

For third party providers we send webhooks for all connected users that allow you to receive rates and availabilities.

Json

Parameter Format Description
action string action of the webhook (updateRates, newReservation, cancelReservation, updateReservation)
user integer user id
data object contain the data of the webhook. For the detailed information for single webhook look in the documentation of regarding request

Change Log

2019-09-16

Messaging APIs: sending messages to guests or hosts and receiving the whole conversation

2019-08-11

Add webhook for reservations

2019-06-28

Add language attribute to create booking request

2019-06-24

Add webhook for getRates updates

2019-06-17

Add availability to getRates response

2019-04-24

Add user currency to apartment detail page

2019-04-03

New endpoint for listing details

New process and authentification for third party providers

2019-03-28

New endpoint to cancel reservations and add Get Apartment IDs

2019-01-18

Starting newsletter for Api users. Join by sending an email to api@smoobu.com

2019-01-08

Add Get/Post Rates Api

2018-11-13

Add missing address in createBooking call. And add correct mandatory fields for some fields in createBooking call

2018-10-23

Added getReservations. Clarifying functions, fixing typos, cleaning up. Added changelog