POST /v2/bookings/easy (evaluation)

This page presents the simplest example of booking/easy usage, in EVALUATION mode.
Full use of /v2/bookings/easy API are documented here.

If stay specified in booking is no more available, response status code will be 409 (conflict).
If the presented price less than our possible price, response status code will be 404 (not found).

Resource information

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

Example Checking availability, and querying for a price

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

json post body

{"requestType":"EVALUATION",
   "lodgingId": "6893537",
   "arrival": "20151031",
   "departure": "20151110",
   "occupantCount": "2",
   "customer":{"address":{"line1":"","city":"","country":"","postalCode":""}, "email":"","firstName":"","lastName":"","language":"","phoneNumber":""}
}

xml post body

<booking>
   <requestType>EVALUATION</requestType>
   <lodgingId>6893537</lodgingId>
   <arrival>20151031</arrival>
   <departure>20151110</departure>
   <occupantCount>2</occupantCount>
   <customer><address><line1/><city/><country/><postalCode/></address><email/><firstName/><lastName/><language/><phoneNumber/></customer>
</booking>

Example Response

json

{"value":3683.53}

xml

<booking><value>3683.53</value></booking>

Checking availability, and confirming a price

Depending your implementation, you may have yourself calculated a price, adding a segment,
You can obtain a response validating, or invalidating your price proposal.

json post body

...
   "price": "3700",
...

xml post body

...
   <price>3700</price>
...

Response:

 {code:404,message:Price too low} 
 {value:3683.53}