I-Rent.net Booking Web Service(en)

21
DEVELOPMENTS S.L. I-RENT.NET BOOKING WEB SERVICE TECHNICAL HELP MANUAL

Transcript of I-Rent.net Booking Web Service(en)

Page 1: I-Rent.net Booking Web Service(en)

DEVELOPMENTS S.L.

I-RENT.NET BOOKING WEB SERVICETECHNICAL HELP MANUAL

Page 2: I-Rent.net Booking Web Service(en)

List of changesVersion Date Notes

1.0.4 12/07/2011

- Added "Full_Details" obligatory parameter to "Ask_Availability" function.- "Ask_Availability" now returns optional extras.- Added "OptionalExtras" property to Booking object- "Language" properties accept only fixed values.

1.0.3 09/11/2010- Added "Insert_Mail_Request" and "Insert_PhoneCall_Request" functions.- Added "NOT_APPLIES" value to Result.Availability

1.0.2 22/09/2010 - Added English document.

1.0.1 25/08/2010 - Added "ON_DEPARTURE" value to Result.Extras.Extra.PayOn

1.0 14/07/2010 Initial release.

Page 3: I-Rent.net Booking Web Service(en)

1- URL OF THE I-RENT.NET BOOKING WEB SERVICEhttp://booking.i-rent.net/booking_service/service.asmx

2- DESCRIPTION OF THE FUNCTIONS PUBLISHED BY THE I-RENT.NET BOOKING WEB SERVICE.

2.a- Ask_Availability: consults availability and prices.Accepts as parameter:- a Booking object that contains, as properties, agent code, accommodation code, start and end date of the consulted period and the quantity of persons.- a boolean parameter (FullDetails).When FullDetails parameter is set to "true" returns within the properties of a Result object the availability of an accommodation, rental price, applicable discounts or surcharges, obligatory extras, optional extras, payment calendar and applicable safety deposit.When FullDetails parameter is set to "false" (default value) returns within the properties of a Result object the availability of an accommodation.

Obligatory parameters:Booking.AgentBooking.AccommodationBooking.FromBooking.TillBooking.PeopleBooking.LanguageFullDetails

Optional parameters:Booking.Referrer

2.b- Make_Booking: inserts a booking.Accepts as parameter a Booking object that contains, as properties, agent code, referrer code (if applicable), accommodation code, start and end date of the consulted period, the quantity of persons, a Tenant object with the tenants properties (title, name, surname, address, etc.) and optional extras (if applicable).Returns within the properties of a Result object the availability of an accommodation, rental price, applicable discounts or surcharges, obligatory extras, optional extras, payment calendar and applicable safety deposit.If it was possible to insert a booking, it returns the reservation number and the URL to print the contract. If the period needs the confirmation of the owner, a booking option is inserted and only the number of that option is returned.

Obligatory Parameters:Booking.AgentBooking.AccommodationBooking.FromBooking.Till

Page 4: I-Rent.net Booking Web Service(en)

Booking.PeopleBooking.LanguageTenant.TreatmentTenant.NameTenant.SurnameTenant.AddressTenant.PostalCodeTenant.CityTenant.CountryTenant.TelephoneTenant.MailTenant.Language

Optional Parameters:Booking.ReferrerBooking.ObservationsTenant.PassportTenant.ProvinceTenant.MobileTenant.FaxTenant.BirthOptionalExtras

2.c- Make_Option: Inserts a booking option.Accepts as parameter a Booking object that contains, as properties, agent code, referrer code (if applicable), accommodation code, start and end date of the consulted period, the quantity of persons and a Tenant object with the tenants properties (title, name, surname, address, etc.).Returns within the properties of an object Result the availability of an accommodation, rental price, applicable discounts or surcharges, obligatory extras, optional extras, payment calendar and applicable safety deposit.A booking option is inserted with a validity of 3 (three) days and only the number of that option is returned.

Obligatory parameters:Booking.AgentBooking.AccommodationBooking.FromBooking.TillBooking.PeopleBooking.LanguageTenant.TreatmentTenant.NameTenant.SurnameTenant.AddressTenant.PostalCodeTenant.CityTenant.CountryTenant.Telephone

Page 5: I-Rent.net Booking Web Service(en)

Tenant.MailTenant.Language

Optional parameters:Booking.ReferrerBooking.ObservationsTenant.PassportTenant.ProvinceTenant.MobileTenant.FaxTenant.Birth

2.d- Insert_Mail_Request: Inserts a mail request.Accepts as parameter a Booking object that contains, as properties, agent code, referrer code (if applicable), accommodation code, observations and a Tenant object with the tenants properties (title, name, surname, address, etc.).Returns within the properties of a Result object the error code (0 if no error, other if an error occurred).

Obligatory Parameters:Booking.AgentBooking.AccommodationBooking.LanguageTenant.TreatmentTenant.NameTenant.SurnameTenant.MailTenant.Language

Optional Parameters:Booking.ReferrerBooking.FromBooking.TillBooking.PeopleBooking.ObservationsTenant.PassportTenant.AddressTenant.PostalCodeTenant.CityTenant.ProvinceTenant.CountryTenant.TelephoneTenant.MobileTenant.FaxTenant.Birth

2.e- Insert_PhoneCall_Request: Inserts a phone call request.

Page 6: I-Rent.net Booking Web Service(en)

Accepts as parameter a Booking object that contains, as properties, agent code, referrer code (if applicable), accommodation code, observations and a Tenant object with the tenants properties (title, name, surname, address, etc.).Returns within the properties of a Result object the error code (0 if no error, other if an error occurred).

Obligatory Parameters:Booking.AgentBooking.AccommodationBooking.LanguageTenant.TreatmentTenant.NameTenant.SurnameTenant.TelephoneTenant.Language

Optional Parameters:Booking.ReferrerBooking.FromBooking.TillBooking.PeopleBooking.ObservationsTenant.PassportTenant.AddressTenant.PostalCodeTenant.CityTenant.ProvinceTenant.CountryTenant.MailTenant.MobileTenant.FaxTenant.Birth

3- DESCRIPTION OF THE OBJECTS THAT THE FUNCTIONS OF THE I-RENT.NET BOOKING WEB SERVICE ACCEPT AND RETURN.

3.a- Result: Object returned by the published functions.

<Result> <Availability>FREE_PERIOD or OCCUPIED_PERIOD or OWNER_CONFIRMATION_NEEDED or NOT_APPLIES </Availability> <!-- Accommodations availability for a period --> <Amount>double</Amount> <!-- Amount that corresponds with the rental of an accommodation --> <Discount> <!-- Applicable discount --> <Description>string</Description> <!-- Discount description in the language of the booking --> <Percentage>double</Percentage> <!-- Percentage of the discount amount compared to the rental amount -->

Page 7: I-Rent.net Booking Web Service(en)

<Amount>double</Amount> <!-- Discount amount. To be deducted from the rental amount--> </Discount> <Surcharge> <!-- Applicable surcharge --> <Description>string</Description> <!-- Surcharge description in the language of the booking --> <Percentage>double</Percentage> <!-- Percentage of the surcharge amount compared to the rental amount --> <Amount>double</Amount> <!-- Surcharge amount. To be added to the rental amount--> </Surcharge> <Extras> <!-- Array of Extra objects, which are the obligatory for the rental period --> <Extra> <!-- Obligatory extra --> <Description>string</Description> <!-- Description of the extra in the language of the booking--> <Amount>double</Amount> <!-- Total amount of the extra --> <PayOn>WHEN_BOOKING or UPON_ARRIVAL or ON_DEPARTURE</PayOn> <!-- Moment when the extra is to be paid --> </Extra> </Extras> <OptionalExtras> <!-- Array of OptionalExtra objects, which are the eligible for the rental period --> <OptionalExtra> <!-- Optional extra --> <Code>int</Code> <!-- Internal code, needed to refer the extra --> <Source>AGENT or ACCOMMODATION</Source> <!-- Origin of the extra --> <Description>string</Description>> <!-- Description of the extra in the language of the booking--> <Quantity>unsignedByte</Quantity> <!-- Always returns 1 --> <MaximumQuantity>unsignedByte</MaximumQuantity> <!-- Maximum quantity that can be selected --> <Amount>double</Amount> <!-- Amount of the extra corresponding to Quantity = 1 --> <PayOn>WHEN_BOOKING or UPON_ARRIVAL or ON_DEPARTURE</PayOn> <!-- Moment when the extra is to be paid --> </OptionalExtra> </ OptionalExtras > <Payments> <!-- Array of Payment objects that constitute the payment calendar of the booking --> <Payment> <!-- Programmed payment --> <Amount>double</Amount> <!-- Payment amount --> <DueDate>dateTime</DueDate> <!-- Date when the payment is due --> </Payment> </Payments> <Deposit>double</Deposit> <!-- Corresponding safety deposit amount --> <Number>string</Number> <!-- Number of the inserted booking or option --> <ContractURL>string</ContractURL> <!-- URL of the PDF contract file --> <ErrorCode>int</ErrorCode> <!-- Error code, if there will be --> <ErrorMessage>string</ErrorMessage> <!-- Error description, if there will be --></Result>

Page 8: I-Rent.net Booking Web Service(en)

3.b- Booking: Object sent as parameters when calling the published functions.<Booking> <Agent>string</Agent> <!-- GUID code of the booking agent --> <Referrer>string</Referrer> <!-- GUID code of the referring agent of the (optional) reservation --> <Accommodation>string</Accommodation> <!-- GUID code of the accommodation --> <From>dateTime</From> <!-- Start date of the rental period in yyyy-MM-ddThh:mm:ss format --> <Till>dateTime</Till> <!-- End date of the rental period in yyyy-MM-ddThh:mm:ss format --> <People>int</People> <!-- Number of persons for which the booking is made --> <OptionalExtras> <!-- Array of OptionalExtra objects, selected to be inserted with the booking --> <OptionalExtra> <!-- Optional extra --> <Code>int</Code> <!-- Internal code, needed to refer the extra --> <Source>AGENT or ACCOMMODATION</Source> <!-- Origin of the extra --> <Quantity>unsignedByte</Quantity> <!-- Quantity selected --> </OptionalExtra> </ OptionalExtras > <Language>NL or DE or GB or FR or ES or IT or PT or GR or SW or RU or ID or CH or JP or DK or NO or CZ or CA or PL or HR or TR</Language> <!-- Language in which descriptions and texts will be returned --> <Tenant> <!-- Tenant --> <Treatment>MR or MRS or FAMILY or COMPANY</Treatment> <Name>string</Name> <Surname>string</Surname> <Company>string</Company> <Passport>string</Passport> <Birth>dateTime</Birth> <Address>string</Address> <City>string</City> <Province>string</Province> <PostalCode>string</PostalCode> <Country>int</Country> <Telephone>string</Telephone> <Mobile>string</Mobile> <Fax>string</Fax> <Language>NL or DE or GB or FR or ES or IT or PT or GR or SW or RU or ID or CH or JP or DK or NO or CZ or CA or PL or HR or TR</Language> <Mail>string</Mail> </Tenant> <Observations>string</Observations> <!-- Remarks attached to the booking --></Booking>

4- CONSIDERATIONS TO TAKE INTO ACCOUNT - The correct date parameters format is : YYYY-MM-DDTHH:MM:SS (Ej: 2010-12-31T00:00:00)

Page 9: I-Rent.net Booking Web Service(en)

- When making requests from any SOAP client with the POST method, it has to meet strictly the definitions set out in:http://booking.i-rent.net/booking_service/service.asmx?op=Ask_Availabilityhttp://booking.i-rent.net/booking_service/service.asmx?op=Make_Bookinghttp://booking.i-rent.net/booking_service/service.asmx?op=Make_Optionhttp://booking.i-rent.net/booking_service/service.asmx?op=Insert_Mail_Requesthttp://booking.i-rent.net/booking_service/service.asmx?op=Insert_PhoneCall_Request- Total amount results by adding the rental amount + obligatory extras + surcharges - discounts.- Valid country codes are:Afghanistan 1Albania 2Antarctica 3Algeria 4American Samoa 5Andorra 6Angola 7Antigua and Barbuda 8Azerbaijan 9Argentina 10Australia 11Austria 12Bahamas 13Bahrain 14Bangladesh 15Armenia 16Barbados 17Belgium 18Bermuda 19Bhutan 20Bolivia 21Bosnia and Herzegovina 22Botswana 23Bouvet Island 24Brazil 25Belize 26British Indian Ocean Territory

27

Solomon Islands 28British Virgin Islands 29Brunei Darussalam 30Bulgaria 31Myanmar 32Burundi 33Belarus 34Cambodia 35Cameroon 36

Page 10: I-Rent.net Booking Web Service(en)

Canada 37Cape Verde 38Cayman Islands 39Central African 40Sri Lanka 41Chad 42Chile 43China 44Taiwan 45Christmas Island 46Cocos (Keeling) Islands 47Colombia 48Comoros 49Mayotte 50Republic of the Congo 51The Democratic Republic Of The

52

Cook Islands 53Costa Rica 54Croatia 55Cuba 56Cyprus 57Czech Republic 58Benin 59Denmark 60Dominica 61Dominican Republic 62Ecuador 63El Salvador 64Equatorial Guinea 65Ethiopia 66Eritrea 67Estonia 68Faroe Islands 69Falkland Islands 70South Georgia and the South Sa

71

Fiji 72Finland 73Åland Islands 74France 75French Guiana 76French Polynesia 77French Southern Territories 78Djibouti 79Gabon 80Georgia 81Gambia 82

Page 11: I-Rent.net Booking Web Service(en)

Occupied Palestinian Territory

83

Germany 84Ghana 85Gibraltar 86Kiribati 87Greece 88Greenland 89Grenada 90Guadeloupe 91Guam 92Guatemala 93Guinea 94Guyana 95Haiti 96Heard Island and McDonald Isla

97

Vatican City State 98Honduras 99Hong Kong 10

0Hungary 10

1Iceland 10

2India 10

3Indonesia 10

4Islamic Republic of Iran 10

5Iraq 10

6Ireland 10

7Israel 10

8Italy 10

9Côte d'Ivoire 11

0Jamaica 11

1Japan 11

2Kazakhstan 11

3Jordan 11

Page 12: I-Rent.net Booking Web Service(en)

4Kenya 11

5Democratic People's Republic o

116

Republic of Korea 117

Kuwait 118

Kyrgyzstan 119

Lao People's Democratic Republ

120

Lebanon 121

Lesotho 122

Latvia 123

Liberia 124

Libyan Arab Jamahiriya 125

Liechtenstein 126

Lithuania 127

Luxembourg 128

Macao 129

Madagascar 130

Malawi 131

Malaysia 132

Maldives 133

Mali 134

Malta 135

Martinique 136

Mauritania 137

Mauritius 138

Page 13: I-Rent.net Booking Web Service(en)

Mexico 139

Monaco 140

Mongolia 141

Republic of Moldova 142

Montserrat 143

Morocco 144

Mozambique 145

Oman 146

Namibia 147

Nauru 148

Nepal 149

Netherlands 150

Netherlands Antilles 151

Aruba 152

New Caledonia 153

Vanuatu 154

New Zealand 155

Nicaragua 156

Niger 157

Nigeria 158

Niue 159

Norfolk Island 160

Norway 161

Northern Mariana Islands 162

United States Minor 16

Page 14: I-Rent.net Booking Web Service(en)

Outlying I 3Federated States of Micronesia

164

Marshall Islands 165

Palau 166

Pakistan 167

Panama 168

Papua New Guinea 169

Paraguay 170

Peru 171

Philippines 172

Pitcairn 173

Poland 174

Portugal 175

Guinea-Bissau 176

Timor-Leste 177

Puerto Rico 178

Qatar 179

Réunion 180

Romania 181

Russian Federation 182

Rwanda 183

Saint Helena 184

Saint Kitts and Nevis 185

Anguilla 186

Saint Lucia 187

Page 15: I-Rent.net Booking Web Service(en)

Saint-Pierre and Miquelon 188

Saint Vincent and the Grenadin

189

San Marino 190

Sao Tome and Principe 191

Saudi Arabia 192

Senegal 193

Seychelles 194

Sierra Leone 195

Singapore 196

Slovakia 197

Vietnam 198

Slovenia 199

Somalia 200

South Africa 201

Zimbabwe 202

Spain 203

Western Sahara 204

Sudan 205

Suriname 206

Svalbard and Jan Mayen 207

Swaziland 208

Sweden 209

Switzerland 210

Syrian Arab Republic 211

Tajikistan 21

Page 16: I-Rent.net Booking Web Service(en)

2Thailand 21

3Togo 21

4Tokelau 21

5Tonga 21

6Trinidad and Tobago 21

7United Arab Emirates 21

8Tunisia 21

9Turkey 22

0Turkmenistan 22

1Turks and Caicos Islands 22

2Tuvalu 22

3Uganda 22

4Ukraine 22

5The Former Yugoslav Republic o

226

Egypt 227

United Kingdom 228

Isle of Man 229

United Republic Of Tanzania 230

United States 231

U.S. Virgin Islands 232

Burkina Faso 233

Uruguay 234

Uzbekistan 235

Venezuela 236

Page 17: I-Rent.net Booking Web Service(en)

Wallis and Futuna 237

Samoa 238

Yemen 239

Serbia and Montenegro 240

Zambia 241

Scotland 242

Dubai Emirate 243

5- AGENT AND ACCOMMODATION CODES FOR TESTINGAgent: 29B044E0-DE5B-4788-B73E-AF4E0379F8F6

Accommodations: 44BC62C1-00AD-4486-8578-B1EC95A33B39B1569BC3-0155-4023-B1D9-7EDC1EAB7801A03B719B-7395-4A15-94F5-EC76C69811563700A080-EDCA-4ED5-8461-6A51D09702492C0196DA-8398-4183-833B-CC525E8CFD64EFCA04F6-1008-4FB4-A142-F4720A4C7F5C9DB14FFD-1290-4562-8EF1-1707E22B0910CC6F2307-BF9A-4C08-B78B-12C36B0B51D38E7CB05B-A60C-46AC-9204-44F5B37CFF5F1494E589-C715-4923-B7DE-528421C67801B453660E-399E-457B-B096-21ED13A43A9C69DF58DB-6B35-4F88-AD0B-C8A942E4C689EF5F4A87-2CE6-4F21-8C6F-A8A2320433DB

6- CODE EXAMPLE FOR IMPLEMENTING CALLS OF THE I-RENT.NET BOOKING WEB SERVICE (LANGUAGE: VISUAL BASIC.NET)

After adding the web reference (http://booking.i-rent.net/booking_service/service.asmx)

Dim tmp_Service As New net.i_rent.booking.Service() Dim tmp_Booking As New net.i_rent.booking.Booking() Dim tmp_Tenant As New net.i_rent.booking.Tenant() Dim tmp_Result As New net.i_rent.booking.Result()

tmp_Booking.Agent = "29B044E0-DE5B-4788-B73E-AF4E0379F8F6" tmp_Booking.Accommodation = "44BC62C1-00AD-4486-8578-B1EC95A33B39"

Page 18: I-Rent.net Booking Web Service(en)

tmp_Booking.From = "09/07/2011" tmp_Booking.Till = "16/07/2011" tmp_Booking.People = 4 tmp_Booking.Language = "es"

tmp_Tenant.Treatment = net.i_rent.booking.Treatments.MR tmp_Tenant.Name = "Juan" tmp_Tenant.Surname = "Pérez" tmp_Tenant.Address = "Av. Costanera 2115" tmp_Tenant.City = "Santa Lucía" tmp_Tenant.Province = "Valencia" tmp_Tenant.PostalCode = "5411" tmp_Tenant.Country = 203 tmp_Tenant.Telephone = "471453248" tmp_Tenant.Mail = "[email protected]" tmp_Tenant.Language = "es" tmp_Booking.Tenant = tmp_Tenant

tmp_Result = tmp_Service.Make_Booking(tmp_Booking)

Upon executing this call, the web service will return an Object of the type Result, which will contain the properties mentioned above.