API Bookings

I-RENT.NET BOOKING WEB SERVICE
TECHNICAL HELP MANUAL

LIST OF CHANGES
Version Date Notes
1.0.7 11/02/2016 – Added “CalculationMethod” to “OptionalExtra” object.
1.0.6 25/04/2013 – Added “Insert_Non_Available” function. Changes in “Insert_Mail_Request” and “Insert_PhoneCall_Request” functions results.
1.0.5 01/06/2012 – Added “Website” obligatory parameters to all functions.
– Added “Type” property to “Extra” and “OptionalExtra” objects.
– Changed some obligatory parameters.
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.

1- URL OF THE I-RENT.NET BOOKING WEB SERVICE

http://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, website code, 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.Website
Booking.Agent
Booking.Accommodation
Booking.From
Booking.Till
Booking.People
Booking.Language
FullDetails

Optional parameters:
Booking.Referrer

2.b- Make_Booking: inserts a booking.
Accepts as parameter a Booking object that contains, as properties, website code, 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.Website
Booking.Agent
Booking.Accommodation
Booking.From
Booking.Till
Booking.People
Booking.Language
Tenant.Treatment
Tenant.Name
Tenant.Surname
Tenant.Address
Tenant.PostalCode
Tenant.City
Tenant.Country
Tenant.Telephone
Tenant.Language

Optional Parameters:
Booking.Referrer
Booking.Observations
Tenant.Passport
Tenant.Province
Tenant.Mobile
Tenant.Fax
Tenant.Mail
Tenant.Birth
OptionalExtras

2.c- Make_Option: Inserts a booking option.
Accepts as parameter a Booking object that contains, as properties, website code, 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.Website
Booking.Agent
Booking.Accommodation
Booking.From
Booking.Till
Booking.People
Booking.Language
Tenant.Treatment
Tenant.Name
Tenant.Surname
Tenant.Address
Tenant.PostalCode
Tenant.City
Tenant.Country
Tenant.Telephone
Tenant.Language

Optional parameters:
Booking.Referrer
Booking.Observations
Tenant.Passport
Tenant.Province
Tenant.Mobile
Tenant.Fax
Tenant.Mail
Tenant.Birth

2.d- Insert_Mail_Request: Inserts a mail request.
Accepts as parameter:
– an Occupation object that contains, as properties, website code, agent code, referrer code (if applicable), accommodation code, number of people travelling and observations.
– 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:
Occupation.Website
Occupation.Agent
Occupation.Accommodation
Occupation.Language
Tenant.Treatment
Tenant.Name
Tenant.Surname
Tenant.Mail
Tenant.Language

Optional Parameters:
Occupation.Referrer
Occupation.From
Occupation.Till
Occupation.People
Occupation.Observations
Tenant.Passport
Tenant.Address
Tenant.PostalCode
Tenant.City
Tenant.Province
Tenant.Country
Tenant.Telephone
Tenant.Mobile
Tenant.Fax
Tenant.Birth

2.e- Insert_PhoneCall_Request: Inserts a phone call request.
Accepts as parameter:
– an Occupation object that contains, as properties, website code, agent code, referrer code (if applicable), accommodation code and observations.
– 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:
Occupation.Website
Occupation.Agent
Occupation.Accommodation
Occupation.Language
Tenant.Treatment
Tenant.Name
Tenant.Surname
Tenant.Telephone
Tenant.Language

Optional Parameters:
Occupation.Referrer
Occupation.From
Occupation.Till
Occupation.Observations
Tenant.Passport
Tenant.Address
Tenant.PostalCode
Tenant.City
Tenant.Province
Tenant.Country
Tenant.Mail
Tenant.Mobile
Tenant.Fax
Tenant.Birth

2.f- Insert_Non_Available: Inserts an occupied period for an accommodation.
Accepts as parameter:
– an Occupation object that contains, as properties, website code, agent code, referrer code (if applicable), accommodation code, start and end date of the period.
Returns within the properties of a Result object the availability of an accommodation.
If it was possible to insert a non available period, it returns the occupation number.

Obligatory parameters:
Occupation.Website
Occupation.Agent
Occupation.Accommodation
Occupation.From
Occupation.Till
Occupation.Language

Optional parameters:
Occupation.Referrer
Occupation.Observations

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

3.1.a- Booking: Object sent as parameters when calling the published functions.

3.1.b- Result: Object returned by the published functions.

3.1.a- Occupation: Object sent as parameters when calling the “Insert_Non_Available” function.

3.2.b- Result: Object returned by the functions “Insert_Mail_Request” and “Insert_PhoneCall_Request” functions.

3.2.c- Insert_Non_Available_PeriodResult: Object returned by the functions “Insert_Non_Available”.

4- CONSIDERATIONS TO TAKE INTO ACCOUNT


– The correct date parameters format is : YYYY-MM-DDTHH:MM:SS (Ej: 2010-12-31T00:00:00)
– 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_Availability
http://booking.i-rent.net/booking_service/service.asmx?op=Make_Booking
http://booking.i-rent.net/booking_service/service.asmx?op=Make_Option
http://booking.i-rent.net/booking_service/service.asmx?op=Insert_Mail_Request
http://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 1
Åland Islands 74
Albania 2
Algeria 4
American Samoa 5
Andorra 6
Angola 7
Anguilla 186
Antarctica 3
Antigua and Barbuda 8
Argentina 10
Armenia 16
Aruba 152
Australia 11
Austria 12
Azerbaijan 9
Bahamas 13
Bahrain 14
Bangladesh 15
Barbados 17
Belarus 34
Belgium 18
Belize 26
Benin 59
Bermuda 19
Bhutan 20
Bolivia 21
Bonaire 245
Bosnia and Herzegovina 22
Botswana 23
Bouvet Island 24
Brazil 25
British Indian Ocean Territory 27
British Virgin Islands 29
Brunei Darussalam 30
Bulgaria 31
Burkina Faso 233
Burundi 33
Cambodia 35
Cameroon 36
Canada 37
Cape Verde 38
Cayman Islands 39
Central African 40
Chad 42
Chile 43
China 44
Christmas Island 46
Cocos (Keeling) Islands 47
Colombia 48
Comoros 49
Cook Islands 53
Costa Rica 54
Côte d’Ivoire 110
Croatia 55
Cuba 56
Curaçao 244
Cyprus 57
Czech Republic 58
Democratic People’s Republic o 116
Denmark 60
Djibouti 79
Dominica 61
Dominican Republic 62
Dubai Emirate 243
Ecuador 63
Egypt 227
El Salvador 64
Equatorial Guinea 65
Eritrea 67
Estonia 68
Ethiopia 66
Falkland Islands 70
Faroe Islands 69
Federated States of Micronesia 164
Fiji 72
Finland 73
France 75
French Guiana 76
French Polynesia 77
French Southern Territories 78
Gabon 80
Gambia 82
Georgia 81
Germany 84
Ghana 85
Gibraltar 86
Greece 88
Greenland 89
Grenada 90
Guadeloupe 91
Guam 92
Guatemala 93
Guinea 94
Guinea-Bissau 176
Guyana 95
Haiti 96
Heard Island and McDonald Isla 97
Honduras 99
Hong Kong 100
Hungary 101
Iceland 102
India 103
Indonesia 104
Iraq 106
Ireland 107
Islamic Republic of Iran 105
Isle of Man 229
Israel 108
Italy 109
Jamaica 111
Japan 112
Jordan 114
Kazakhstan 113
Kenya 115
Kiribati 87
Kuwait 118
Kyrgyzstan 119
Lao People’s Democratic Republ 120
Latvia 123
Lebanon 121
Lesotho 122
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
Marshall Islands 165
Martinique 136
Mauritania 137
Mauritius 138
Mayotte 50
Mexico 139
Monaco 140
Mongolia 141
Montserrat 143
Morocco 144
Mozambique 145
Myanmar 32
Namibia 147
Nauru 148
Nepal 149
Netherlands 150
Netherlands Antilles 151
New Caledonia 153
New Zealand 155
Nicaragua 156
Niger 157
Nigeria 158
Niue 159
Norfolk Island 160
Northern Mariana Islands 162
Norway 161
Occupied Palestinian Territory 83
Oman 146
Pakistan 167
Palau 166
Panama 168
Papua New Guinea 169
Paraguay 170
Peru 171
Philippines 172
Pitcairn 173
Poland 174
Portugal 175
Puerto Rico 178
Qatar 179
Republic of Korea 117
Republic of Moldova 142
Republic of the Congo 51
Republic Of The Congo 52
Réunion 180
Romania 181
Russian Federation 182
Rwanda 183
Saint Helena 184
Saint Kitts and Nevis 185
Saint Lucia 187
Saint Vincent and the Grenadin 189
Saint-Pierre and Miquelon 188
Samoa 238
San Marino 190
Sao Tome and Principe 191
Saudi Arabia 192
Scotland 242
Senegal 193
Serbia and Montenegro 240
Seychelles 194
Sierra Leone 195
Singapore 196
Slovakia 197
Slovenia 199
Solomon Islands 28
Somalia 200
South Africa 201
South Georgia and the South Sa 71
Spain 203
Sri Lanka 41
St. Barths 247
St. Maarten 248
St. Martin 246
Sudan 205
Suriname 206
Svalbard and Jan Mayen 207
Swaziland 208
Sweden 209
Switzerland 210
Syrian Arab Republic 211
Taiwan 45
Tajikistan 212
Thailand 213
The Former Yugoslav Republic o 226
Timor-Leste 177
Togo 214
Tokelau 215
Tonga 216
Trinidad and Tobago 217
Tunisia 219
Turkey 220
Turkmenistan 221
Turks and Caicos Islands 222
Tuvalu 223
U.S. Virgin Islands 232
Uganda 224
Ukraine 225
United Arab Emirates 218
United Kingdom 228
United Republic Of Tanzania 230
United States 231
United States Minor Outlying I 163
Uruguay 234
Uzbekistan 235
Vanuatu 154
Vatican City State 98
Venezuela 236
Vietnam 198
Wallis and Futuna 237
Western Sahara 204
Yemen 239
Zambia 241
Zimbabwe 202

5- AGENT AND ACCOMMODATION CODES FOR TESTING

Website:
9269CF76-50DB-4922-9607-B2EC77F0025C

Agent:
29B044E0-DE5B-4788-B73E-AF4E0379F8F6

Accommodations:
44BC62C1-00AD-4486-8578-B1EC95A33B39
B1569BC3-0155-4023-B1D9-7EDC1EAB7801
A03B719B-7395-4A15-94F5-EC76C6981156
3700A080-EDCA-4ED5-8461-6A51D0970249
2C0196DA-8398-4183-833B-CC525E8CFD64
EFCA04F6-1008-4FB4-A142-F4720A4C7F5C
9DB14FFD-1290-4562-8EF1-1707E22B0910
CC6F2307-BF9A-4C08-B78B-12C36B0B51D3
8E7CB05B-A60C-46AC-9204-44F5B37CFF5F
1494E589-C715-4923-B7DE-528421C67801
B453660E-399E-457B-B096-21ED13A43A9C
69DF58DB-6B35-4F88-AD0B-C8A942E4C689
EF5F4A87-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.Website = ” 9269CF76-50DB-4922-9607-B2EC77F0025C”
tmp_Booking.Agent = “29B044E0-DE5B-4788-B73E-AF4E0379F8F6”
tmp_Booking.Accommodation = “44BC62C1-00AD-4486-8578-B1EC95A33B39”
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 = “juanperez@hotmail.com”
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.

i-rent.net

Manuals

-----------------------------------------------------------------------------------------

Quick start up guides

-----------------------------------------------------------------------------------------

Starters guides

-----------------------------------------------------------------------------------------

Video manuals

-----------------------------------------------------------------------------------------

I-Rent Glossary

-----------------------------------------------------------------------------------------
blog i-rent.net