June 2009, Lorenz Christian
This is the common Web Service interface for car rentals provided from Sunny Cars. You can use this Web Service to integrate car rental offers into your applications as well as submitting and managing car rental reservations from and to Sunny Cars.
This Web Service is intended to be used by Sunny Cars Partners, Tour Operators, Travel Agencies and third party booking engines. The CarRentalAgentService is a protected Web Service. Consumers of this service will have to subscribe to it. For detailed information about a service subscription please contact the Sunny Cars IT Division:
Sunny Cars AG - IT Division, Paul-Gerhardt-Allee 42, D-81245 Munich, Telephone: +49 - 89 - 82 99 33 90, Email: it@sunnycars.comUsing CarRentalAgentService, you can find car rental locations, query services for specific car rental locations, query car rental rates, create car rental reservations and manage car rental reservations.
The primary audience for this SDK are developers and managers from tourist industry, who are interested in integrating Sunny Cars products into their services, web site or business application.
In order to use the Web Service discussed and described in this SDK, you should verify that following prerequisites and system requirements are met:
Prerequisite | Description |
---|---|
Operator Registration | In order to use this Web Service, you must register at Sunny Cars as Operator. An Operator
is a Travel Agency, Tour Operator, Engine Provider or Broker, who wants
to integrate Sunny Cars products into their own service portfolio. Once you are registered as Sunny Cars Operator, you will get the following essential information along with your operator contract:
|
Web Service consumption capabilities |
To utilize this Web Service, you will have to make sure that your
system has Web Service consumption capabilities. Ideally, your system
is able to send and receive SOAP-Messages. Alternatively, you can
consume the Web Service functionality using HTTP-POST requests. In brief, your system must have an instant internet connection as well as all capabilities to send/receive HTTP 1.1-Messages. A web server, an http client and a processing language are fundamental instruments to use this Web Service. Recommendation: We recommend to use the SOAP 1.1 Protocol via HTTP. We have evaluated in test scenarios that either Microsoft .NET or Java/Tomcat have best performance and low implementation cost. |
The CarRentalAgentService interface supports two seperate technical communication protocols consumers can utilize interface functionality:
Protocol | Description |
---|---|
SOAP 1.1 OVER HTTP 1.1 | Simple Object Access Protocol v1.1 over Hypertext Transfer Protocol v1.1 This is the W3C standard communication protocol for Web Services. |
CGI POST OVER HTTP 1.1 | Common Gateway Interface, POST-Method over Hypertext Transfer Protocol v1.1 The HTTP-POST-Method communication protocol is a widely used and easy-to-use client/server communication protocol. |
Moreover, the client consuming the Web Service should be able to consume the resulting Web Service responses programmatically. In case you are going to use SOAP communication, it is most likely that your programming language or environment supports the SOAP protocol.
Alternatively, you may use the HTTP-POST communication to utilize the Web Service. For this your client environment should be able to communicate through HTTP1.0/1.1 protocol and be able to parse and process an XML response.
Some methods of the CarRentalAgentService require cryptographic security. To safely implement the security techniques required to communicate with the Web Service, your client programming language/environment must be able to:
Functionality | Description |
---|---|
MD5 digest hashing | Your client must be able to hash an arbitrary value to a MD5 digest. |
BASE64 encoding and decoding | Your client must be able to encode and decode bytes and/or string to and from BASE64-string format. |
TripleDES symmetric cryptography algorithm | Your client must be able to encrypt and decrypt bytes using TripleDES (3DES) algorithm. The TripleDES algorithm must support CBC mode and 192 Bit key length. |
All code samples in this SDK are written in C# using the Microsoft .NET Framework 1.1. You might want to use a different implementation language. Naturally, all languages have different syntax, classes and environments. Nevertheless, the samples herein should give you a good understanding on how this Web Service works and what tasks are neccessary to implement a client for it.
First, it is essential to understand the Web Service structure and its parts before starting to implement a client. The CarRentalAgentService is implemented as Microsoft .NET (Framework 1.1) Web Service. In general, it consists of two major components (assemblies, or just simply namespaces):
As mentioned before, the service component is the front-end of this Web Service. All functionality exposed by this service is integrated within this single component (or class). Consequently, you only need to utilize the one and only class in this namespace, called CarRentalAgentService. This class has methods you can use to:
Procedure | Description |
---|---|
Authenticate | Identify and authorize yourself to gain access to the Web Service functionality. |
Locate | Search, lookup and obtain information about locations and regions, where Sunny Cars provides car rental facilities. |
Evaluate | Enquire rates and car rental offerings for specific locations at a certain time Sunny Cars is offering car rentals. |
Delineate | Summarize, outline and verify data required to perform a car rental reservation at Sunny Cars. |
Operate | Initiate, query, manage and administer car rental reservations at Sunny Cars. |
All procedures consist of a set of methods. The methods of the service component follow a specific convention. If you have a closer look at all method names, you might have noticed that the're two types of method signatures. This distinction is reasoned by the means of passing parameters to a specific Web Service method. This Web Service accepts so called "complex types" as input parameters as well as "simple types". A complex type is an object instance of a class, whereas a simple type is an instance of a base type (strings).
Method signature | Description |
---|---|
[Action][EntityName]
Examples: |
This is the signature for complex methods. Complex methods always have complex input and output. Therefore, complex methods are suitable for SOAP requests, since this Web Service only supports complex input parameters through SOAP protocol. Moreover, complex methods are very flexible, since they always only accept one complex parameter, mostly a subclass of Request class. The output is always a subclass of the Response class. |
[Action][EntityName]P[Version]
Examples: |
This is the signature for simple methods. Contrary to complex methods, simple methods always have simple input and complex output. Consequently, simple methods are the preferred choice for those communicating over HTTP-POST protocol, since all simple parameters can be easily passed through CGI POST parameters. However, simple methods always return a complex output, a subclass of Response to be more precise. |
To summarize, the service component provides you everything you will need to query rates and reservations as well as performing and managing reservations at Sunny Cars.
Second, the interface component is a definition on how your client implementation will have to communicate with the service component. Its namespace contains a set of classes for general request/response communication as well as all data structures representing business entities (i.e. Locations, Rates or Vehicles). It is dependent on your client implementation and language how these entities are represented on your client side. If you are going to use the SOAP protocol for example, it is most likely that your SOAP language implementation/extension/component will create proxy classes based on the WSDL description for each class defined in the interface component. However, if you prefer or are required to use the HTTP-POST protocol, it is up to your client implementation on how the interface classes will appear and what properties they will have.
As for the business entity classes, it is important to understand which part of data they are representing. This SDK gives you detailed information on each business entity class to become familiar with their functionality and meaning. Furthermore, it is helpful to realize their purpose in a specific business process context. Again, this SDK will illustrate the most important business processes as well as their workflows to help you find the most suitable client implementation according to your individual business needs.
The first service procedure discussed here, the authentication procedure, is probably the most important procedure of all. Since you can only use all other procedures when you have identified and authenticated your client properly, this procedure is essential for your client implementation.
Methods For Authentication ProcedureThe authentication procedure is built upon following methods:
Method | Description |
---|---|
GetTicketGrantingTicket | Retrieves a granting ticket used to obtain a service ticket. |
GetTicket | Retrieves a service ticket. |
The correct usage of these methods is defined by the authentication procedure itself. The CarRentalAgentService uses a procedure which is very similar to the Kerberos authentication procedure. In detail, the authentication is done using a challenge/response mechanism, which in turn uses cryptographic methods (TripleDES) for secure identification.
From client's perspective, the complete procedure is divided into three steps:
Step 1: Obtain a ticket granting ticket
The client calls GetTicketGrantingTicket with his operator key and thereby initiates the authentication procedure.
First, the service checks the operator key for validity and integrity. Afterwards, the operator’s (client’s) pass phrase is being obtained. The service passes over this pass phrase to the cryptography service to generate a secret.
To create a valid secret, the cryptography service first creates a random integer number. Then, this number is being encrypted with TripleDES (CBC/192bit) using the MD5 digest hash of operator’s pass phrase. The encrypted bytes are converted to a string using BASE64-coding. The resulting secret is passed back to the client along with a token (transaction-id).
Both secret and token are assembled to a ticket granting ticket. This ticket granting ticket is the first object you'll get from the web service.
Step 2: Create a response secret
To create a valid response secret, the client first reads the secret from ticket granting ticket obtained in step 1.
Afterwards, the client will have to extract the random number from the secret. Therefore, the secret must be first decoded using BASE64-coding. The result of this operation is a set of plain encrypted bytes (byte-array) of the secret. Those bytes will have to be decrypted with TripleDES (CBC/192bit) using the operator pass phrase's MD5 hash.
In result of the decryption, the client obtains the random integer number the service has created in step 1. The client increases this number by one (n = n + 1).
Now the client will have to create a new secret, called the response secret. To achieve this, the increased number will be encrypted again with TripleDES (CBC/192bit) using the MD5 digest hash of operator's pass phrase. The encrypted bytes are converted to a string using BASE64-coding.
Finally, the client has successfully created the response secret and can proceed to the last authentication procedure step (step 3).
Step 3: Obtain a service ticket
In this last step, the client requests a service ticket. The service ticket is required for all subsequent method calls (using the functionality of the service). The ticket request consists of the ticket granting ticket token and the response secret created in step 2.
After having processed these steps, you are able to use the complete functionality of the Web Service for the period of time the service ticket is valid.
Example: How to perform a valid authentication procedure
[C#]
// STEP 1: Obtain a ticket granting ticket
// In this first step, we request a ticket granting ticket and
// decrypt the secret of the ticket in order to make a valid response secret.
// By the way, we locally store the token for later use.
// Web Service Reference
CarRentalAgentService service = new CarRentalAgentService();
// Our operator data
string opKey = "000000";
string opPassPhrase = "passphrase";
// prepare request
TicketGrantingTicketRequest rq = new TicketGrantingTicketRequest();
rq.OperatorKey = opKey;
// call service and get response
TicketGrantingTicketResponse rs = service.GetTicketGrantingTicket(rq);
// save the token for later use
this.tgtToken = rs.TicketGrantingTicket.Token;
// extract the secret from response
string secret = rs.TicketGrantingTicket.Secret;
// Now the decoding/decryption of the secret will have to be performed
// First we get the plain encoded bytes by converting the BASE64 secret
byte[] decodedSecret = Convert.FromBase64String(secret);
// Second, we create an MD5 hash of our passphrase which will serve as
// base data for the decryption.
// Note that in C# the md5 hash creation requires a byte array as input.
// The pass phrase is required to be a UTF8-encoded string, so we use
// the UTF8 encoding to convert to plain bytes.
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
byte[] md5PassPhraseHash = md5.ComputeHash(Encoding.UTF8.GetBytes(opPassPhrase));
// Now we have to prepare the TripleDES decryption. TripleDES requires us
// to pass a key and initialization vector. We use the 128bit md5 hash as key.
// The initialization vector is created with the leading 8 bytes (first 64bit)
// from the md5 hash.
byte[] cKey = md5PassPhraseHash;
byte[] cIV = new byte[8];
Array.Copy(cKey, cIV, 8);
// Decrypt with TripleDES
TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = cKey;
tdes.IV = cIV;
byte[] decryptedSecret = null;
using (MemoryStream ms = new MemoryStream())
{
using (CryptoStream cs = new CryptoStream(ms, tdes.CreateDecryptor(), CryptoStreamMode.Write))
{
cs.Write(decodedSecret, 0, decodedSecret.Length);
cs.FlushFinalBlock();
cs.Close();
}
decryptedSecret = ms.ToArray();
}
// finally convert the decrypted bytes back to a UTF8 encoded string
string decryptedResult = Encoding.UTF8.GetString(decryptedSecret);
.
.
.
// STEP 2: Create a response secret
// In this step, we take the decrypted secret, convert it to a number,
// increase the number by 1 and encrypt that number again.
// Increase number by 1
string stringResponse = Convert.ToString(Convert.ToInt64(decryptedResult) + 1);
// Take the string and convert it to plain bytes for encryption
byte[] encodedResponse = Encoding.UTF8.GetBytes(stringResponse);
// Encrypt with TripleDES
tdes = new TripleDESCryptoServiceProvider();
tdes.Key = cKey;
tdes.IV = cIV;
byte[] encryptedResponse = null;
using (MemoryStream ms = new MemoryStream())
{
using (CryptoStream cs = new CryptoStream(ms, tdes.CreateEncryptor(), CryptoStreamMode.Write))
{
cs.Write(encodedResponse, 0, encodedResponse.Length);
cs.FlushFinalBlock();
cs.Close();
}
encryptedResponse = ms.ToArray();
}
// Finally take the encrypted response and convert it to BASE64-string
string response = Convert.ToBase64String(encryptedResponse);
.
.
.
// STEP 3: Obtain a service ticket
// At last, we take the encrypted response secret and the token from
// ticket granting ticket (from step 1) and ask the service for a
// valid service ticket
// Prepare ticket request
TicketRequest rq = new TicketRequest();
// Set request data with encrypted response and tgt token
rq.TicketGrantingTicket = new TicketGrantingTicket();
rq.TicketGrantingTicket.Secret = response;
rq.TicketGrantingTicket.Token = this.tgtToken;
// Request ticket
TicketResponse rs = service.GetTicket(rq);
// This is our valid service ticket token
string ticketToken = rs.Ticket.Token;
The location service procedure is a fundamental step towards a valid car rental. Naturally, renting a car requires a location where the car is picked up and the customer can depart to start his trip. Consequently, when customer is finished travelling around with his rented car, he arrives at a location where he drops off the car.
Departure And Arrival LocationsOf course this sounds very easy and obvious. However, renting a car, especially by electronic means, is often more complicated as described above. One of the drawbacks in car rental is finding a suitable departure and arrival location for the rental. This is not only reasoned by the geographical position of the locations rather than additional circumstances like desired vehicle category and special equipments, for example.
To fully understand the potential complexity of location selection, a look into the basic requirements might be helpful. First of all, it must be clear that every car rental has a departure and arrival location. Even if the departure and arrival locations are the same (which is a common/standard rental) - both departure and arrival locations have their own treatment. Therefore it is required to electronically process both departure and arrival locations.
Second, the process of finding a location will have to follow a certain flow. The most intuitive and easy way finding a location is to have perform a location selection by user interaction. However, a location selection between thousands of locations is neither easy nor practical. Therefore, a set of locations are geographically grouped into regions. A region is a geographical area where car rental locations are provided. This grouping limits the selection of car rental departure/arrival from thousands to hundreds - but even this grouping may not practical enough. To make distinction and selection between those hundreds of regions easier, regions are again grouped into higher level regions. Consequently, a tree-node-like datastructure (composite) is being created.
As mentioned before, a suitable car rental location is not only defined by finding the correct geographical departure and arrival positions. Car rental locations have certain characteristics which have to be taken into account upon selection.
One of the most obvious properties to consider is the operation time of a location. It is clear that a car rental will be upon request if the desired location is closed upon desired departure or arrival date and time. By default, the CarRentalAgentService will return all possible locations regardless of the operation time of requested location(s).
Note Attention!Location MeetingsIf desired rental time is not within the operation times for a location, the location is not disqualified for car rental. A reservation is possible even if the rental time effectively is out of hour for the desired location.
Moreover, every car rental location has a set of services provided to meet with the customer for car rental pickup or dropoff. From an abstract perspective, a location meeting is a property or physical service of the location. In simple words, location meetings define how the customer will pick up or drop off his car. As for the locations provided by this Web Service, three basic types of meetings are defined:
Type Of Meeting | Description |
---|---|
Meeting At Airport | Meeting at airport means that the customer will arrive/depart by airplane and that the car rental representative expects to meet customer upon airplane arrival at airport. |
Meeting At Counter | Meeting at counter denotes that the location has a counter (or desk) facility where the customer is able to rent a car and will meet the representative to pickup or dropoff the car. |
Meeting At Special Address | Meeting at special address means that the location offers transfer or transportation services to or from a special location the customer specifies. In most cases, this special address is the hotel the customer is checked in. |
Based on customer preference, some of above listed meeting types may be required to fulfill customer's needs. For example, a customer may want to begin his car rental at Munich Airport and would like to finish his rental in Ingolstadt. For this constellation, the departure location (Munich Airport) will have to support meeting at airport. The arrival location (Ingolstadt) will have to support at least meeting at counter, and may optionally support meeting at a special address.
The CarRentalAgentService offers you two methods to perform a location meeting check:
Note Attention!The determination and specification of location meetings is essential to the complete car rental process. To perform a Reservation, you will need to specify the type of location meetings desired used upon departure and arrival.
In certain cases, a car rental customer may want to order additional equipments along with his car rental. For example, a customer who plans to spent his winter holidays in St. Moritz will probably order snow tires/chains as additional equipment. Every car rental location offers a different set of those additional equipments - in most cases in return for an additional fee. For every location query, the CarRentalAgentService will return the available equipments of a location as Equipments property of the location, if the WithEquipments switch is set to true.
This way, your client implementation is able to offer or check against the available equipments and find a suitable location for the customer.
Methods For Location ProcedureThe location procedure is built upon following methods:
Method | Description |
---|---|
GetCountries | Retrieves the set of supported countries. Supported countries are countries where car rental facilities are available. |
GetAirports | Retrieves the set of supported airports. Supported airports are airports for which car rental Locations are available with Sunny Cars. |
GetRegion | Retrieves a geographic region. |
GetRegions | Retrieves a set of geographic regions where Sunny Cars offers car rental locations. |
GetLocation | Retrieves a location. |
GetLocations | Retrieves a set of locations. |
When it comes to the implementation of the location procedure, several possibilities (scenarios) are supported by the CarRentalAgentService. As discussed earlier, the regional structure allows you to find a location by narrowing the area of interest. This method usually is implemented on the client side by "user guidance". In particular, the client asks the user to specify his departure location by selecting a country or region where he wants to start his car rental.
Before discussing all location finding possibilities in detail, a brief list and description follows:
Finding Method | Description |
---|---|
Find By Name |
Find a location by searching it's name. In most cases, this will be the
city name. A city is comparable to the deepest level of region.
Therefore, you can find locations by searching the region's name. A
common scenario would look like this.
|
Find By Geographic Region |
Find a location by locating it within a geographic region. To
accomplish this task, the initial geographic scope (the world) is
narrowed down to smaller geographic scopes (countries, states, cities)
until the desired set location is found. Again, the regional structure
helps to follow a logical process. Typically, a call sequence to the
web service would look like this.
|
Find By Airport (Vicinity Search) |
Find a location at or in vicinity of an airport. This type of finding
is very useful when you want to enable your customer to choose between
a location directly at specified airport and locations in immediate
vicinity of given airport. Note Attention! A typical call sequence for this type of location finding follows:
|
Find By Airport (Exact Search) |
Find a location at an airport. In contract to the previous method, this
type of finding returns only locations which are directly located at
given airport. A typical call sequence for this type of location finding is like the one below:
|
A second possibility would be to ask the user directly for his departure location by letting him enter the city where he wants to depart. In that case, the client implementation requests regions whose name match the city name provided by user.
Another common use case scenario would be to find a car rental location by airport. Since the majority of travellers arrive by airplane, this scenario is probably a frequently used option. To accomplish this task, the client first queries the supported airports and provides the list for user selection. After having the user select his departure airport, a region query is performed to find a suitable region for that airport.
It is important to recognize that all scenarios utilize regions to find a suitable car rental location. This fact will become very important when the evalutation procedure (requesting car rental rates) is discussed later. As for now, it is sufficient to know that the regional structure is designed to find locations.
In addition to the regional location finiding, the service offers direct location query capabilities. You may directly query locations using an IATA three letter airport-code for example.
The third service procedure discussed here is the evaluation service procedure. In context of the entire car rental process, evaluating means to query vehicles, their details and features as well as rates, condition and coverage information.
To get started with this service procedure, it may be useful to summarize the prerequisites required before the evaluation service procedure can be utilized:
Prerequisite | Description |
---|---|
You have information about the departure Region or Location. | You will at least need to know the departure region of the desired car rental to start the procedure. In addition, you may already have located a concrete location where the car rental should begin. |
You have information about the departure Date and Time. | You will have to know when the desired car rental begins. Note that you will have to know both the date and time of departure. |
You have information about the arrival Region or Location. |
You will at least need to know the arrival region of the desired car
rental to start the procedure. In addition, you may already have
located a concrete location where the car rental should end. Unless a one way rental is desired, this region or location is the same as the departure region / location. |
You have information about the arrival Date and Time. | You will have to know when the desired car rental ends. Note that you will have to know both the date and time of arrival. |
You have information about the Currency the customer prefers for rate enquiry and reservation. | You already must have knowledge about the customer currency preference. |
You optionally have information about the preferred VehicleType, air conditioning and automatic gear shifting preference of customer. | Having those customer preferences, you are able to narrow down the vehicle and rate results within rate enquiry and thereby get best suitable results for the customer preference. |
Once you met all those prerequisites, you are able to start the evaluation service procedure.
Vehicles, Vehicle Types and PreferencesWithin this service procedure, Vehicles and VehicleTypes are elementary entities you will work with. A Vehicle defines and describes the car available for rental at a location. It provides you with base information such as code, name, type, door and passenger count, picture references and features. In most cases, a car rental location offers several types of cars within their fleet. Those types (or categories) are reflected using the VehicleType entity. There's a fixed number of types for all vehicles offered by Sunny Cars.
If you perform a rate request for example, you can specify a valid VehicleTypeId to limit the rate search result to the specified type (i.e. "Convertible").
Rates and Rate Service TypesSecond, you will most likely request rates during this service procedure. A Rate is the price for a Vehicle depending on a specific car rental request. The rate price always relies on a Currency, its assigned Vehicle and RateServiceType.
The interesting depedency here is the rate service type. To understand this dependency, a definition of a rate service type is helpful:
>> A rate service type specifies and represents a set of conditions and coverages bound to one or more vehicles, affecting the price of vehicles depending on the number and value of conditions and coverages included in rate service type. <<
Following this definition, this simply means that Sunny Cars offers several different packages of conditions and coverages for one vehicle. A real-life example helps to clarify this circumstance:
Sunny Cars offers car rentals at Miami Airport, in particular a Chevy Metro with automatic gear shifting and air conditioning. This "small size" vehicle is available with two different rate service types:
It's obvious that the "Standard Cover" rate service type includes less coverages than "Super Cover" rate service type. In consequence, the same vehicle is available with both rate service types and therefore different rate prices.
The rate service type is being returned in every rate request, so you can offer your customer both "Coverage Packages" for selection.
"Best Offer" Rate Calculation aka Regional Rate QueryThe best offer rate calculation feature is probably one of the most exciting ones of this Web Service. Before diving into the usage details of this feature, it is essential to understand the difference between a Location and a Region.
A Location is a distinct geographical point where car rentals are offered - more simply: it's just a car rental office.
A Region is a set or collection of Locations, grouped together by means of geographic position - more simply: it's a set of car rental offices located nearly to eachother.
Now imagine following scenario: Your customer wants to rent a car at Frankfurt, Germany. He's near the center of the city at day of car rental, so he decides to pick up the car directly in the car rental office (a location providing counter services). Sunny Cars offers several city offices in Frankfurt. Let's just pick 2 city offices for this example:
Now there's one major difference between both city offices. While Frankfurt Center City Office offers the desired car for € 469,-/week, Frankfurt North City Office offers the same vehicle category for € 419,-/week - a difference of € 50,-! In traditional booking engines, your customer would have to select the desired location first, and afterwards get the fleet and rates for the selected location. Assuming this "classic style", your customer would most probably have chosen Frankfurt Center City Office and have seen it's desired car for € 469,-/week.
This is where the best offer rate calculation comes into the game.
In terms of the CarRentalAgentService, Frankfurt is equal to a deep-leveled, location-assigned Region and the city offices mentioned above are Locations of that Region.
In case you would now perform a request with Region Frankfurt on GetRates, the Web Service automatically would perform a rate and vehicle check on all Locations assigned to the region and would compare the resulting rates on same vehicle categories. Using this real-time comparison, the region-based rate query would return the best offer from all locations.
The best offer calculation and result is a very handsome method to offer the customer the most suitable vehicles upon his preference. However, using the best offer calculation scheme affects the overall car rental process significantly. In detail, the best offer rate query results in a shift of location selection. A comparison of both (location vs. regional rate query) rate calculation schemes reveals the difference:
Location Based Rate Query | Regional Based Rate Query |
---|---|
You must have chosen both departure and arrival locations to perform a rate search. | You only need to chose the departure and arrival regions to perform a rate search. |
The rate results apply to requested departure location only. | The rate results may apply to one or more locations assigned to the departure region. |
All vehicles in the rate result are provided by the requested departure location. | The vehicles in the rate result may be provided by one or more locations assigned to the departure region. |
All vehicles and rates returned are bound to the location services (location meeting types) provided by the departure location. | The vehicles and rates returned may have differing bindings to location services (location meeting types) depending on the location they are assigned to. |
In consequence to above listed differences, the overall process of car rental changes. This is mainly reasoned in the fact, that you only can perform a car rental Reservation if you have determined departure and arrival locations as well as the location meeting types desired by customer. You won't be able to perform a reservation without exactly specifying which locations and meeting types the customer wants for his car rental.
As you can see, the process towards a valid car rental reservation is different for both approaches. It is up to you to decide which process is the best for your business needs. However, Sunny Cars recommends you to use the regional-based rate query approach because it delivers best service to the customer.
Finally, following a list of the Web Service methods which apply to the evaluation service procedure:
Method | Description |
---|---|
GetRates | Retrieves a set of rates. |
GetVehicleTypes | Retrieves the set of supported vehicle types. |
The Rate entity already has been discussed in previous chapters. Until now, it's assumed that a Rate is a representation of a car rental price for a specific vehicle and rental request. However, sometimes Sunny Cars has special offers for certain locations or vehicles. These special offers result in discounted (lower) prices for a specific request.
This is both fine for Sunny Cars's partners as well as the end customer. Nevertheless, the fact of having a discounted rate for a vehicle is not directly visible to customer. To eliminate this disadvantage, the Rate element has a special attribute called BaseValue. This attribute only contains a value if the Value attribute represents a discounted price.
A typical scenario for such a constellation is the following example: A customer wants a car rental in Munich. It's October, and the famous "Oktoberfest" is happening in Munich. For this 2 weeks lasting Mega-Event, Sunny Cars offers special, discounted prices. If you know perform a rate query on Web Service matching the Oktoberfest dates, you'll get the BaseValue filled with the standard pricing as well as the Value filled with the discounted pricing back as response for a certain vehicle.
If you'd perform the same request a month later, only the Value attribute would be returned. Since the Oktoberfest ist not happening anymore, there's no special offer. In result, the standard pricing applies. In this case, the Value attribute represents the standard pricing.
The delineation service procedure is more a client-based procedure rather than a server-based procedure. To be presicely, "delineation" means to provide the customer with essential information regarding the product (which is the car rental or vehicle rate) and second, to gather required infromation from customer to perfrom a valid car rental Reservation.
The first responsibility - providing product information - is just simply to provide the customer the condition and coverage information for the selected Rate. This is achieved by calling the following methods which support this service procedure.
Method | Description |
---|---|
GetRateConditions | Retrieves the set of rate conditions for a specific rate request (vehicle and rate service type). |
GetRateCoverages | Retrieves the set of rate coverages for a specific rate request (vehicle and rate service type). |
The latter responsibility - gathering customer information - is a pure client-based procedure. In this case, it is very important to gather all information depending on the type of car rental reservation you are going to perform. A detailed description about the possible types on the reservation creation process is provided later in the operation service procedure section of this document.
Nevertheless, there's basic information about a car rental which is common to all types of reservation. Following a table of the fundamental car rental reservation infromation which is mandatory:
Data | Description |
---|---|
Departure Date and Time | The date and time the customer wants to begin his car rental. |
Arrival Date and Time | The date and time the customer wants to finish his car rental. |
Departure Location | The departure Location where the customer picks up the car and begins his car rental. |
Arrival Location | The arrival Location where the customer drops off the car and finishes his car rental. |
Departure Location Meeting | The type of meeting the customer wants when picking up the car and beginning his car rental. |
Arrival Location Meeting | The type of meeting the customer wants when droping off the car and finishing his car rental. |
Departure Location Meeting Info | Additional information from customer regarding the fulfillment of requested departure location meeting (not applicable for all). |
Arrival Location Meeting Info | Additional information from customer regarding the fulfillment of requested arrival location meeting (not applicable for all). |
Vehicle | The desired vehicle for car rental. |
Rate Service | The desired rate service (i.e. "Super Cover" or "Standard Cover") for car rental. |
Driver's Personal Data | The gender, first name and last name of the driver. |
Person in Charge for Payment | The person which is going to be charged for reservation payment. |
The last service procedure in the overall car rental process is the operation service procedure. This procedure is used to create and manage car rental reservations at Sunny Cars. Following a list of supported methods for this procedure:
Method | Description |
---|---|
CreateReservation | Creates a reservation. |
CancelReservation | Cancels a reservation. |
GetReservation | Retrieves a car rental reservation. |
The most important and complex part of this procedure is the creation of a car rental Reservation. Naturally, in order to create a reservation you must have passed all preceding service procedures. In consequence, you already have gathered all required informations such as
The existance of all required information is the first step towards a valid car rental reservation. In addition, a car rental reservation and their consequences to business process and workflow may differ on how the reservation is being created. Therefore, this Web Service categorizes those differences as reservation types.
To completely understand all parameters as well as type differences within reservation creation, a look into the main business roles might be helpful:
Role | Description |
---|---|
Operator | The Operator is the person (or party) directly interacting with the Web Service. An operator may perform reservations for himself, an Agency or a Customer. |
Agency | The Agency (or Travel Agency) is the person (or party) registered with Sunny Cars as a travel agency. A registered travel agency has an account number and a contract at Sunny Cars, thus making him eligible to handle car rental reservations. An agency may create reservations for himself or a Customer. |
Customer | The Customer is the person (or party) consuming products and services from Sunny Cars. A customer may create reservations for himself. |
In addition to these three fundamental business roles, the Driver is another essential entity representing a person. A Driver is the person effectively consuming the car rental. In most cases, the Driver is equal to the Customer.
However, in some rare cases, the Driver may be another person than the Customer. Consider a simple example: Your customer's father is going to holiday this summer with his new wife. To make him a valuable present, your customer uses your business service (and effectively this Web Service) and searches for a car rental for his father. Your customer would be the Customer of the car rental, while his father would be the Driver.
Reservation Type | Description |
---|---|
Standard
This is the common type of reservation. |
A standard reservation type is a reservation, where following conditions are met:
|
Agency-Driven-On-Customer
This type of reservation is suitable for agencies performing reservations for their customers, but prefer to handle the payment procedure directly with Sunny Cars. |
A reservation of type "agency, driven on customer" is a reservation. where following conditions are met:
|
Agency-On-Behalf-Of-Customer
This type of reservation is suitable for agencies and web site operators. Here, the agency acts "as a broker" between the customer and Sunny Cars - which in turn means that all document dispatching and payment processes are handled directly with the customer. |
A reservation of type "agency, on behalf of customer" is a reservation, where following conditions are met:
|
Operator-Driven-On-Agency
This type of reservation is suitable for third party booking engine providers and other operators. Here, the operator is able to "impersonate" itself as a registered agency - thus making ther operator to act as that registered agency and perform the same reservation as it would be done directly by impersonated agency. Note |
A reservation of type "operator, driven on agency" is a reservation, where following conditions are met:
|
In consequence to those reservation types, you will have to gather different sets of information to create reservations of different types. However, a car rental reservation has fundamental "core" data, which is required for all types of reservations. The fundamental elements of a reservation are listed below.
Data | Description |
---|---|
Departure Date and Time | The date and time the customer wants to begin his car rental. |
Arrival Date and Time | The date and time the customer wants to finish his car rental. |
Departure Location | The departure Location where the customer picks up the car and begins his car rental. |
Arrival Location | The arrival Location where the customer drops off the car and finishes his car rental. |
Departure Location Meeting | The type of meeting the customer wants when picking up the car and beginning his car rental. |
Arrival Location Meeting | The type of meeting the customer wants when droping off the car and finishing his car rental. |
Departure Location Meeting Info | Additional information from customer regarding the fulfillment of requested departure location meeting (not applicable for all). |
Arrival Location Meeting Info | Additional information from customer regarding the fulfillment of requested arrival location meeting (not applicable for all). |
Vehicle | The desired vehicle for car rental. |
Rate Service | The desired rate service (i.e. "Super Cover" or "Standard Cover") for car rental. |
Driver's Personal Data | The gender, first name and last name of the driver. |
Person in Charge for Payment | The person which is going to be charged for reservation payment. |
In addition to these core data elements, you will have to gather extended information depending on the type of reservation you are going to create. The concrete data to gather is dependent on four so called "type switch" properties. The type switch properties of CreateReservationRequest are essential in creating a valid reservation. Before discussing the extended data and their requirements, a closer look to the type switch properties and their meaning might be useful.
Property | Description |
---|---|
PaymentPersonInCharge |
Specifies which person is going to be charged for payments of the reservation. Possible values:
|
PaymentMethod |
Specifies the method of payment the person in charge prefers for payments of the reservation. NotePossible values:
|
DocumentDispatchPersonToDispatch | Specifies which person is going to receive the documents of the reservation. The documents of the reservation include following elements:
|
DocumentDispatchMethod |
Specifies the document dispatching method the specified person prefers. NotePossible values:
|
The second attribute Status represents the status of the reservation at creation time. The status is always temporary and may change at later time.
Code (Number) | Description |
---|---|
E_INTERNAL_SERVICE (0) | An internal error occured while processing a request. Please contact Sunny Cars and/or ease to resolve this issue. |
E_REQUEST_INVALID (1) | The request is invalid because no request object was found or the request object is in an invalid state. |
E_REQUEST_AMBIGIOUS (2) | The request is ambigious. Occurs when the request object contains parameters excluding or depending on eachother and those parameters are set incorrectly. |
E_TICKET_TOKEN_INVALID (3) | Ticket token invalid or expired. Either the ticket token is malformed or your ticket has expired. |
E_LANGUAGE_NOT_FOUND (4) | The requested language does not exist or is not supported by this service. |
E_CURRENCY_NOT_FOUND (5) | The requested currency does not exist or is not supported by this service. |
E_COUNTRY_NOT_FOUND (6) | The requested country does not exist or is not supported by this service. |
E_AIRPORT_NOT_FOUND (7) | The requested airport does not exist or is not supported by this service. |
E_REGION_NOT_FOUND (8) | The requested region does not exist or is not supported by this service. |
E_PARENT_REGION_NOT_FOUND (9) | The requested parent region does not exist or is not supported by this service. |
E_LOCATION_NOT_FOUND (10) | The requested location does not exist or is not supported by this service. |
E_DEPARTURE_LOCATION_NOT_FOUND (11) | The requested departure location does not exist. |
E_ARRIVAL_LOCATION_NOT_FOUND (12) | The requested departure location does not exist. |
E_RATE_NOT_FOUND (13) | Rate(s) or vehicle(s) for given reference data were not found. No offers available for given reference data. |
E_DEPARTURE_REGION_NOT_FOUND (14) | The requested departure region does not exist. |
E_ARRIVAL_REGION_NOT_FOUND (15) | The requested arrival region does not exist. |
E_RATE_COVERAGE_NOT_FOUND (16) | Rate coverage information for given reference data was not found. |
E_RATE_CONDITION_NOT_FOUND (17) | Rate condition information for given reference data was not found. |
E_VEHICLE_NOT_FOUND (18) | The requested or dependent vehicle was not found. |
E_DEPARTURE_LOCATION_DOES_NOT_SUPPORT_MEETING_TYPE (19) | The given departure location does not support given location meeting type. |
E_ARRIVAL_LOCATION_DOES_NOT_SUPPORT_MEETING_TYPE (20) | The given arrival location does not support given location meeting type. |
E_DEPARTURE_LOCATION_MEETING_INFORMATION_INVALID (21) | The given information is invalid or not sufficient for given departure meeting type. |
E_ARRIVAL_LOCATION_MEETING_INFORMATION_INVALID (22) | The given information is invalid or not sufficient for given arrival meeting type. |
E_DRIVER_DATA_INVALID (23) | Driver data is invalid, missing or incomplete. At least gender, first name and last name are required. |
E_DRIVER_GENDER_INVALID (24) | Driver's gender is invalid. |
E_DRIVER_SALUTATION_TITLE_INVALID (25) | Driver's salutation title is invalid or exceeds maximum length of 10 characters. |
E_DRIVER_QUALIFICATION_TITLE_INVALID (26) | Driver's qualification title is invalid or exceeds maximum length of 10 characters. |
E_DRIVER_FIRST_NAME_INVALID (27) | Driver's first name is invalid or exceeds maximum length of 25 characters. |
E_DRIVER_LAST_NAME_INVALID (28) | Driver's last name is invalid or exceeds maximum length of 50 characters. |
E_EQUIPMENT_NOT_FOUND (29) | The requested equipment(s) were not found. |
E_CUSTOMER_DATA_INVALID (30) | Customer data is invalid, missing or incomplete. At least gender, last name, street and city are required. |
E_CUSTOMER_GENDER_INVALID (31) | Customer's gender is invalid. |
E_CUSTOMER_SALUTATION_TITLE_INVALID (32) | Customer's salutation title is invalid or exceeds maximum length of 10 characters. |
E_CUSTOMER_QUALIFICATION_TITLE_INVALID (33) | Customer's qualification title is invalid or exceeds maximum length of 10 characters. |
E_CUSTOMER_FIRST_NAME_INVALID (34) | Customer's first name is invalid or exceeds maximum length of 25 characters. |
E_CUSTOMER_LAST_NAME_INVALID (35) | Customer's last name is invalid or exceeds maximum length of 50 characters. |
E_CUSTOMER_COMPANY_NAME_INVALID (36) | Customer's company name is invalid or exceeds maximum length of 50 characters. |
E_CUSTOMER_STREET_INVALID (37) | Customer's street is invalid or exceeds maximum length of 50 characters. |
E_CUSTOMER_ZIP_CODE_INVALID (38) | Customer's zip code is invalid or exceeds maximum length of 20 characters. |
E_CUSTOMER_CITY_INVALID (39) | Customer's city is invalid or exceeds maximum length of 50 characters. |
E_CUSTOMER_EMAIL_ADDRESS_INVALID (40) | Customer's email address is invalid or exceeds maximum length of 50 characters. |
E_CUSTOMER_PHONE_NUMBER_INVALID (41) | Customer's phone number is invalid or exceeds maximum length of 12 characters. |
E_CUSTOMER_FAX_NUMBER_INVALID (42) | Customer's fax number is invalid or exceeds maximum length of 12 characters. |
E_CUSTOMER_MOBILE_PHONE_NUMBER_INVALID (43) | Customer's mobile phone number is invalid or exceeds maximum length of 12 characters. |
E_PAYMENT_PERSON_IN_CHARGE_INVALID (44) | The given payment person in charge is invalid. Payment person does not correspond with given and/or configured data. |
E_PAYMENT_METHOD_INVALID (45) | The given payment method is invalid. Payment method does not correspond with given and/or configured data. |
E_CREDIT_CARD_OWNER_INVALID (46) | The given credit card owner is invalid or exceeds maximum length of 30 characters. |
E_CREDIT_CARD_NUMBER_INVALID (47) | The given credit card number is invalid or exceeds maximum length of 16 characters. |
E_CREDIT_CARD_CONTROL_CODE_INVALID (48) | The given credit card control code is invalid or exceeds maximum length of 4 characters. |
E_CREDIT_CARD_VENDOR_INVALID (49) | The given credit card vendor is invalid or not supported. |
E_BANK_TRANSFER_ACCOUNT_OWNER_INVALID (50) | The given bank account owner is invalid or exceeds maximum length of 30 characters. |
E_BANK_TRANSFER_ACCOUNT_NUMBER_INVALID (51) | The given bank account number is invalid or exceeds maximum length of 10 characters. |
E_BANK_TRANSFER_ACCOUNT_BANK_CODE_INVALID (52) | The given bank code is invalid or exceeds maximum length of 8 characters. |
E_BANK_TRANSFER_ACCOUNT_BANK_NAME_INVALID (53) | The given bank name is invalid or exceeds maximum length of 30 characters. |
E_CREDIT_CARD_DATA_INVALID (54) | Credit card data is invalid, missing or incomplete. All credit card information is required. |
E_BANK_ACCOUNT_DATA_INVALID (55) | Bank account data is invalid, missing or incomplete. At least bank account owner, bank account number and bank code are required. |
E_CREDIT_CARD_INVALID (56) | Credit card is invalid. Please check if all given parameters are correct. |
E_BANK_ACCOUNT_INVALID (57) | Bank account is invalid. Please check if all given parameters are correct. |
E_DOCUMENT_DISPATCH_PERSON_TO_DISPATCH_INVALID (58) | The given document dispatch person to dispatch is invalid. Document dispatch person does not correspond with given and/or configured data. |
E_DOCUMENT_DISPATCH_METHOD_INVALID (59) | The given document dispatch method is invalid. Document dispatch method does not correspond with given and/or configured data. |
E_DEPARTURE_DATE_TIME_TOO_EARLY (60) | The given departure date / time is too early. |
E_ARRIVAL_DATE_TIME_TOO_EARLY (61) | The given arrival date / time is too early. |
E_RESERVATION_NOT_FOUND (100) | The requested reservation was not found. |
E_RESERVATION_CREATE_FAILED (101) | Could not create reservation. Please contact Sunny Cars and/or ease to resolve this issue. |
E_RESERVATION_CANCEL_FAILED (102) | Could not cancel reservation. Please contact Sunny Cars and/or ease to resolve this issue. |
E_OPERATOR_KEY_INVALID (10001) | The operator key is not set or invalid. |
E_AUTHENTICATION_FAILED (10002) | Could not authenticate operator. Please check your operator key, operator pass phrase and the given response secret. If the problem persists, please contact Sunny Cars and/or ease to resolve this issue. |
E_IMPERSONATION_FAILED (10003) | Could not impersonate. Please contact Sunny Cars and/or ease to resolve this issue. |
Code (Number) | Description |
---|---|
W_LANGUAGE_NOT_SUPPORTED (1) | The requested language is not supported. Switching to default language. |
W_CURRENCY_NOT_SUPPORTED (2) | The requested currency is not supported. Switching to default currency. |
W_LOCATION_DOES_NOT_PROVIDE_EQUIPMENTS (3) | The requested location does not provide any equipments. |
W_LOCATION_DOES_NOT_PROVIDE_ARRIVAL_LOCATIONS (4) | The requested location does not provide any arrival locations. |
W_SPECIFIC_DATE_TIME_TOO_EARLY (5) | Given specific date and time (effective car rental start time) is too early. Using today instead. |
W_ADDITIONAL_RENTAL_DAY_APPLIED_DUE_24HOUR_RULE (6) | An additional rental day has been applied to the overall rental duration due to 24-hour-rule. |
W_CUSTOMER_COUNTRY_NOT_FOUND (7) | The requested country of customer was not found. Country is ignored. |
Class | Description |
---|---|
CarRentalAgentService | The common Sunny Cars Web Service for Sunny Cars car rentals. |