Do Sirvoy have a open API available?  

We do not offer any open API but we do have a "callback URL" or webhook function. The callback URL gives the hotel the possibility to receive booking details in a JSON format thru URL.

If this function is activated it sends out a callback to a URL defined by you every time a new booking is received to Sirvoy. It could be activated under "Settings -> Your account > Callback URL"

The callback feature only send out info about new bookings, not changed or canceled bookings.

The receiving server has to respond with http code 200 (OK), otherwise the call will be retried every 30 minutes up to 10 times. Below is a file example in the format JSON:  

{  
"version":"1.0",
"generatedTime":"2016-03-15T10:18:49+00:00",
"event":"new",
"propertyId":1,
"bookingId":25935,
"bookingDate":"2016-03-15T09:41:37+00:00",
"arrivalDate":"2016-03-15",
"departureDate":"2016-03-16",
"eta":null,
"guest":{  
"firstName":"LBS",
"lastName":null,
"businessName":null,
"address":"Gentoftev\u00e4gen 2",
"postcode":"302 38",
"city":"Halmstad",
"country":"SE",
"phone":"+46706777949 (tel:%2B46706777949)",
"email":"glenn@lbs.se",
"passportNo":null,
"language":"sv",
"message":null
},
"internalComment":null,
"couponCode":null,
"rooms":[  
{  
"RoomTypeName":"Megaroom",
"RoomTypeDescription":"Megadescription rg",
"RoomName":"Megaroom2",
"arrivalDate":"2016-03-15",
"departureDate":"2016-03-16",
"adults":"1",
"quantity":1,
"price":"2000",
"roomTotal":2000,
"guestName":null,
"comment":null
}
],
"additionalItems":[  
{  
"description":"Deluxepackage",
"specificDate":"2016-03-15",
"quantity":"1",
"price":"10",
"itemTotal":10
},
{  
"description":"Deluxepackage",
"specificDate":"2016-03-16",
"quantity":"1",
"price":"10",
"itemTotal":10
}
],
"currency":"USD",
"totalPrice":2020
}

-Questions about this connection can be sent to tech@sirvoy.com.

 

-If you seem to get no incoming parameters, (or the equivalent depending on the programming language you use):
$jsonBooking = json_decode(file_get_contents('php://input'));

-Callbacks are made as Posts and via https.

Was this article helpful?
0 out of 0 found this helpful