Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/04/2014, 03:21
dunblanco
 
Fecha de Ingreso: abril-2003
Ubicación: Madrid
Mensajes: 65
Antigüedad: 21 años
Puntos: 2
Exclamación Integracion api de TRIPADVISOR

Hola a todos, estoy intentando integrar a mi motor de busqueda el API de tripconnect, ahora bien.

enmace con todo la implementacion:
http://developer.tripadvisor.com/index.html#overview

la descripcion del problema:

Hotel Availability Request

Availability requests are sent by adding /hotel_availability to your endpoint and sending the params explained below in a POST request.

Example Request

POST
http://partner-site.com/api_implemen...l_availability
BODY
api_version=4
&hotels=[{"ta_id":97497,"partner_id":"229547","partner_url" :"http://partner.com/deeplink/to/229547"},{"ta_id":97832,"partner_id":"id34234","pa rtner_url":"http://partner.com/deeplink/to/id34234"}]
&start_date=2013-07-01
&end_date=2013-07-03
&num_adults=2
&num_rooms=1
&lang=en_US
&currency=USD
&user_country=US
&device_type=d
&query_key=6167a22d1f87d2028bf60a8e5e27afa7_191_13 60299600000_2_2

y esta es la respuesta esperada:

Example Response

{
"api_version" : 4 ,
"hotel_ids" : [97497],
"start_date" : "2013-07-01",
"end_date" : "2013-07-03",
"num_adults" : 2,
"num_rooms" : 1,
"currency" : "USD",
"user_country" : "US",
"device_type" : "d",
"query_key" : "6167a22d1f87d2028bf60a8e5e27afa7_191_136029960000 0_2_2",
"lang" : "en_US",
"num_hotels" : 1,
"hotels" :
[
{
"hotel_id": 97497,
"room_types":
{
"Fenway Room":
{
"url": "http: //www.partner-site.com/hotel_commonwealth/fenway_room?start_date=2013-07-01&end_date=2013-07-05&num_adults=2",
"price": 178.50,
"fees": 80,
"fees_at_checkout": 0,
"taxes": 20,
"taxes_at_checkout": 0,
"final_price": 278.50,
"discounts":
[
{
"marketing_text": "10% off entire stay during July",
"is_percent": true,
"amount": 10,
"price": 20,
"fees": 0,
"fees_at_checkout": 0,
"taxes": 0,
"taxes_at_checkout": 0,
"final_price": 20
},
{
"marketing_text": "1% off web special",
"is_percent": true,
"amount": 1,
"price": 2,
"fees": 0,
"fees_at_checkout": 0,
"taxes": 0,
"taxes_at_checkout": 0,
"final_price": 2
},
{
"marketing_text": "Waive property fee",
"is_percent": false,
"amount": 25,
"price": 0,
"fees": 25,
"fees_at_checkout": 0,
"taxes": 0,
"taxes_at_checkout": 0,
"final_price": 25
}
],
"currency": "USD",
"num_rooms": 1,
"room_code": "SINGLE",
"room_amenities":
[
"BREAKFAST_AND_LUNCH_INCLUDED",
"ROOM_WITH_A_VIEW"
]
}
}
}
]
}

puedo utilizar PHP para generar esa respuesta pero no se como recibir los datos que me envian por POST a un fichero sin extension.

Gracias por la ayuda por adelantado.