POST /v2/bookings

Performs booking operation. Body response will contain the new created booking reference. If stay specified in booking is no more available, response status code will be 409 (conflict).

Resource information

Authentication No
Request Formats xml, json
Response Formats xml, json
HTTP Method GET
Request Object Booking
Response Object Booking result
API Version v2

Example Request

https://api.poplidays.com/v2/bookings

json post body

{
   "arrival":"20130508",
   "customer":{
      "address":{
         "city":"Gradignan",
         "country":"France",
         "line1":"164 route de Canéjan",
         "postalCode":"33170"
      },
      "civility":"MISTER",
      "email":"john.doe@radhius.fr",
      "firstName":"John",
      "language":"fr",
      "lastName":"Doe",
      "phoneNumber":"+33654545454"
   },
   "departure":"20130515",
   "extras":[
      "END_OF_STAY_CLEANING",
      "CONCIERGE"
   ],
   "lodgingId":886,
   "occupantCount":2,
   "paymentType":"PAYMENT_REQUEST",
   "urlSuccess":"https://www.google.com",
   "urlFailure":"https://www.google.com/",
   "referenceReseller":"TYUHVRTYJ",
   "salesFollowup":"Example sales follow up"
}

xml post body

<booking>
  <arrival>20130508</arrival>
  <departure>20130515</departure>
  <lodgingId>886</lodgingId>
  <occupantCount>2</occupantCount>
  <customer>
    <address>
      <city>Gradignan</city>
      <country>France</country>
      <line1>164 route de Canéjan</line1>
      <postalCode>33170</postalCode>
    </address>
    <civility>MISTER</civility>
    <email>john.doe@radhius.fr</email>
    <firstName>John</firstName>
    <language>fr</language>
    <lastName>Doe</lastName>
    <phoneNumber>+33654545454</phoneNumber>
  </customer>
  <extras>
    <extra>END_OF_STAY_CLEANING</extra>
    <extra>CONCIERGE</extra>
  </extras>
  <paymentType>PAYMENT_REQUEST</paymentType>
  <urlSuccess>https://www.google.com</urlSuccess>
  <urlFailure>https://www.google.com/</urlFailure>
  <referenceReseller>TYUHVRTYJ</referenceReseller>
  <salesFollowup>Example sales follow up</salesFollowup>
</booking>

Example Response

json

{"id":270954,"reference":"2012-11-17-270954", "paymentLink":"http://poplidays.com/ws/bookings/1540369916/mercanetpartnerwithoutpayment?normalurl=https%3A%2F%2Fwww.google.com&cancelurl=https%3A%2F%2Fwww.google.com%2F"}

xml

<booking><id>270945</id><reference>2012-11-17-270945</reference> <paymentLink>http://poplidays.com/ws/bookings/1540369916/mercanetpartnerwithoutpayment?normalurl=https%3A%2F%2Fwww.google.com&cancelurl=https%3A%2F%2Fwww.google.com%2F</paymentLink></booking>