Last active
April 30, 2017 01:16
-
-
Save vlinhart/c9c2920d919de98bce43 to your computer and use it in GitHub Desktop.
/buy/ proposed api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Request POST body - common | |
{ | |
"seller_site": "http://localhost:8000/backend/v1/sites/28950", | |
"buyer_site": "http://localhost:8000/backend/v1/sites/1", // the SFO for example, we can't say on backend which site user wants | |
"start_date": "2015-12-01", | |
"end_date": "2015-12-02", | |
"room_guests": { | |
"room_data": { | |
"price": 250, | |
"meta_data": {} | |
}, | |
"guests": [ | |
{ | |
"name": "Max Rockatanski with lot of names and longer than fifty characters", | |
"email": "[email protected]", | |
"phone": "+420777777777", | |
}, | |
{ | |
"name": "MadMaxĚščř RockatanskiŽýáíé", | |
"email": "[email protected]", | |
"phone": "+420777777777", | |
} | |
] | |
}, | |
"meta_data": {} | |
} | |
// example EAN | |
{ | |
"seller_site": "http://localhost:8000/backend/v1/sites/28950", | |
"buyer_site": "http://localhost:8000/backend/v1/sites/1", | |
"start_date": "2015-12-01", | |
"end_date": "2015-12-02", | |
"room_guests": { | |
"room_data": { | |
"price": 250, | |
"meta_data": { | |
"supplier_type": "E", | |
"rate_key": "7d9126dc-b881-4210-a828-feb4ed23579d", | |
"rate_code": 201370983, | |
"room_type_code": 200238519 | |
} | |
}, | |
"guests": [ | |
{ | |
"name": "Max Rockatanski with lot of names and longer than fifty characters", | |
"email": "[email protected]", | |
"phone": "+420777777777", | |
}, | |
{ | |
"name": "MadMaxĚščř RockatanskiŽýáíé", | |
"email": "[email protected]", | |
"phone": "+420777777777", | |
} | |
] | |
}, | |
"meta_data": {} | |
} | |
//example HB | |
{ | |
"seller_site": "http://localhost:8000/backend/v1/sites/28950", | |
"buyer_site": "http://localhost:8000/backend/v1/sites/1", | |
"start_date": "2015-12-01", | |
"end_date": "2015-12-02", | |
"room_guests": { | |
"room_data": { | |
"price": 250, | |
"meta_data": { | |
"room_type_xml": "<RoomType characteristic=\"RO\" code=\"DBL-U10\" type=\"SIMPLE\">DOUBLE RUN OF HOUSE</RoomType>", | |
"hotelbeds_room_id": "k4MtHu7iUE6FZFGRn/AhwQ==", | |
"board_type_xml": "<Board code=\"RO-U10\" shortname=\"RO\" type=\"SIMPLE\">ROOM ONLY</Board>", | |
"rooms": "999" | |
} | |
}, | |
"guests": [ | |
{ | |
"name": "Max Rockatanski with lot of names and longer than fifty characters", | |
"email": "[email protected]", | |
"phone": "+420777777777", | |
}, | |
{ | |
"name": "MadMaxĚščř RockatanskiŽýáíé", | |
"email": "[email protected]", | |
"phone": "+420777777777", | |
} | |
] | |
}, | |
"meta_data": { | |
"avail_token": "1QLOHkk2zDkhSjJFQTwyKAgh", | |
"contract_list": [ | |
{ | |
"name": "STA", | |
"office_code": "256" | |
} | |
] | |
} | |
} | |
// RESPONSE - not totally clear yet | |
{ | |
"id": "1", | |
"resource": "http://localhost:8000/backend/v1/bookings/1", | |
"created": "2015-09-25T10:38:51.648630Z", | |
"updated": "2015-09-25T10:38:51.648650Z", | |
"start_date": "2015-12-01", | |
"end_date": "2015-12-02", | |
"buyer_site": "http://localhost:8000/backend/v1/sites/1", | |
"seller_site": "http://localhost:8000/backend/v1/sites/28950", | |
"price": 170.61, | |
"reservation_number": "1234", | |
"provider": "ean", | |
"provider_data": { | |
"supplier": "Travelscape LLC or Vacationspot SL", | |
"non_refundable": false, | |
"terms_conditions": "http://travel.ian.com/index.jsp?pageName=userAgreement&locale=en_US&cid=055505", | |
"check_in_instructions": "", | |
"cancellation_policy": "We understand that sometimes your travel plans change. We do not charge a change or cancel fee. However, this property (Gateway Inn and Suites Hotel) imposes the following penalty to its customers that we are required to pass on: Cancellations or changes made after 11:59 AM ((GMT-08:00) Pacific Time (US & Canada); Tijuana) on Oct 26, 2015 are subject to a 100% Cost of Stay penalty. The property makes no refunds for no shows or early checkouts." | |
}, | |
"user": "http://localhost:8000/backend/v1/users/1", | |
"room": { | |
"room_type": "Standard Room, 1 King Bed", | |
"guest_name": "Max Rockatanski with lot of names and longer than fifty characters", | |
"guest_email": "[email protected]", | |
"guest_phone": "+420777777777", | |
"guest_pnr": "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment