Documentation of the CarRentalAgentService

CarRentalAgentService. Method 

Edits a car rental Reservation.

public EditReservationResponse (
   EditReservationRequest request
);

Parameters

EditReservationRequest
A EditReservationRequest containing the necessary reservation data.

Return Value

A EditReservationResponse containing the modified Reservation.

Remarks

Use this method to edit a car rental Reservation at Sunny Cars. This method typically is one of the last methods you will invoke during the entire car rental process.

To completely understand all parameters required to perform a reservation creation, a look into the main business roles might be helpful:

Business Roles

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 edit reservations for himself or a Customer.
Customer The Customer is the person (or party) consuming products and services from Sunny Cars. A customer may edit 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 Types

In dependence of above methioned roles, the're a number of different ways to edit a reservation. In result, several reservation types are possible.
Reservation Type Description
Standard

This is the common type of reservation.

A standard reservation type is a reservation, where following conditions are met:
  • The performing Operator is a registered Agency.
  • The person in charge for the reservation payment is the Agency.
  • The person for document dispatch is the Agency.
  • The method of payment is the default method for the Agency.
  • The method of document dispatch is the default method for the Agency.
  • The Customer is the Driver.
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:
  • The performing Operator is a registered Agency.
  • The person in charge for the reservation payment is the Agency.
  • The person for document dispatch may be either Agency or Customer.
  • The method of payment is the default method for the Agency.
  • The method of document dispatch is defined by either Agency or Customer
  • The Customer may be, but is not required to be the Driver.
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:
  • The performing Operator is a registered Agency.
  • The person in charge for the reservation payment is the Customer.
  • The person for document dispatch is the Customer.
  • The method of payment is defined by the Customer.
  • The method of document dispatch is defined by the Customer.
  • The Customer may be, but is not required to be the Driver.
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   

You need explicit permissions to edit reservations of this type. An operator key and operator pass phrase do not authorize you to impersonate as an agency and perform such a type of operation.

A reservation of type "operator, driven on agency" is a reservation, where following conditions are met:
  • The performing Operator is acting in substitute to a registered Agency (using impersonation).
  • The person in charge for the reservation payment may be either Agency or Customer.
  • The person for document dispatch may be either Agency or Customer.
  • The method of payment is defined by either Agency or Customer.
  • The method of document dispatch is defined by either Agency or Customer.
  • The Customer may be, but is not required to be the Driver.

In consequence to those reservation types, you will have to gather different sets of information to edit 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.

Fundamental Reservation Data

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 edit. The concrete data to gather is dependent on four so called "type switch" properties. The type switch properties of EditReservationRequest 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.

Reservation Type Switch Properties

Property Description
PaymentPersonInCharge

Specifies which person is going to be charged for payments of the reservation.

Possible values:
  • Agency - Specifies that the agency is the person in charge.

    In most cases, the calling operator is the perfroming agency at the same time. In consequence, using this option will not require you to supply additional information because the required payment data is already exisiting in Sunny Cars database.

  • Customer - Specifies that the customer is the person in charge.

    In result, setting this option means that the payment procedure is handled directly between customer and Sunny Cars.

    Hence, you will be required to supply additional information about the customer as well as the PaymentMethod the customer prefers.

  • Operator - Specifies that the operator is the person in charge.

    Setting this option is only applicable upon explicit permission from Sunny Cars. If you do not have proper permissions, the creation process will fail.

    For detailed information about this feature and its consequences, please contact Sunny Cars directly.

PaymentMethod

Specifies the method of payment the person in charge prefers for payments of the reservation.

Note   

This option is only applicable if the PaymentPersonInCharge is set to Customer. For all other persons in charge this switch is ignored.

Possible values:
  • CreditCard - Specifies that the payment person in charge (customer) prefers payment by creditcard.

    Setting this option will require you to supply additional information about the customer's creditcard along with customer's personal data.

  • BankTransfer - Specifies that the payment person in charge (customer) prefers payment by banktransfer.

    Setting this option will require you to supply additional information about the customer's bank account along with customer's personal data.

DocumentDispatchPersonToDispatch Specifies which person is going to receive the documents of the reservation.

The documents of the reservation include following elements:

  1. The invoice
  2. The car rental voucher
  3. Information about coverages and conditions
  4. General terms and conditions

Possible values:
  • Agency - Specifies that the agency is the person to receive the documents.

    In most cases, the calling operator is the perfroming agency at the same time. In consequence, using this option will not require you to supply additional information because the required payment data is already exisiting in Sunny Cars database.

  • Customer - Specifies that the customer is the person to receive the documents.

    In result, setting this option means that the documents will be sent directly to customer.

    Hence, you will be required to supply additional information about the customer as well as the DispatchMethod the customer prefers.

  • Operator - Specifies that the operator is the person to receive the documents.

    Setting this option is only applicable upon explicit permission from Sunny Cars. If you do not have proper permissions, the creation process will fail.

    For detailed information about this feature and its consequences, please contact Sunny Cars directly.

DocumentDispatchMethod

Specifies the document dispatching method the specified person prefers.

Note   

This option is only applicable if the DocumentDispatchPersonToDispatch is set to Customer. For all other persons this switch is ignored.

Possible values:
  • RegularMail - Specifies that the specified person (customer) prefers document dispatching by regular mail.

    Setting this option will require you to supply additional information about customer's personal data.

  • ElectronicMail - Specifies that the specified person (customer) prefers document dispatching by email.

    Setting this option will require you to supply customer's email address along with customer's personal data.

  • Fax - Specifies that the specified person (customer) prefers document dispatching by fax.

    Setting this option will require you to supply customer's fax number (fully qualified) along with customer's personal data.

List Of Errors Returned

Error Code Description
E_INTERNAL_SERVICE An internal service error occured during the process.
E_TICKET_TOKEN_INVALID The provided token is invalid.

This error occurs if:

  • The token is in invalid format.
  • The token is expired.
  • The token was not found.

E_RESERVATION_EDIT_FAILED Could not edit reservation. Please contact manufacturer to resolve this issue.
E_RATE_NOT_FOUND Rate or vehicle for given reference data was not found.

This error occurs if:

  • The vehicle / rate service type combined with the rental location and rental time did not result in an offer. Reservation not possible.

E_DEPARTURE_DATE_TIME_TOO_EARLY The given departure date / time is too early.

This error occurs if:

  • The date / time is in past relative to tomorrow.

E_ARRIVAL_DATE_TIME_TOO_EARLY The given arrival date / time is too early.

This error occurs if:

  • The date / time is in past relative to departure date / time.

E_RENTAL_DURATION_TOO_SHORT The rental duration is too short.

This error occurs if:

  • The departure and arrival date / time are equal.

E_RENTAL_DURATION_TOO_LONG The rental duration is too long.

This error occurs if:

  • The departure and arrival date / time specify a duration longer than 45 days.

E_DEPARTURE_LOCATION_DOES_NOT_SUPPORT_MEETING_TYPE The given departure location does not support the requested meeting type.
E_ARRIVAL_LOCATION_DOES_NOT_SUPPORT_MEETING_TYPE The given arrival location does not support the requested meeting type.
E_DEPARTURE_LOCATION_MEETING_INFORMATION_INVALID The given departure location meeting information is invalid.

This error occurs if:

  • The departurelocation meeting information is required but not given.

E_ARRIVAL_LOCATION_MEETING_INFORMATION_INVALID The given arrival location meeting information is invalid.

This error occurs if:

  • The arrival location meeting information is required but not given.

E_DRIVER_DATA_INVALID Driver data is invalid, missing or incomplete. At least gender, first name and last name are required.
E_DRIVER_GENDER_INVALID Driver's gender is invalid.
E_DRIVER_SALUTATION_TITLE_INVALID Driver's salutation title is invalid or exceeds maximum length of 10 characters.
E_DRIVER_QUALIFICATION_TITLE_INVALID Driver's qualification title is invalid or exceeds maximum length of 10 characters.
E_DRIVER_FIRST_NAME_INVALID Driver's first name is invalid or exceeds maximum length of 25 characters.
E_DRIVER_LAST_NAME_INVALID Driver's last name is invalid or exceeds maximum length of 50 characters.
E_CUSTOMER_DATA_INVALID Customer data is invalid, missing or incomplete. At least gender, last name, street and city are required.
E_CUSTOMER_GENDER_INVALID Customer's gender is invalid.
E_CUSTOMER_SALUTATION_TITLE_INVALID Customer's salutation title is invalid or exceeds maximum length of 10 characters.
E_CUSTOMER_QUALIFICATION_TITLE_INVALID Customer's qualification title is invalid or exceeds maximum length of 10 characters.
E_CUSTOMER_FIRST_NAME_INVALID Customer's first name is invalid or exceeds maximum length of 25 characters.
E_CUSTOMER_LAST_NAME_INVALID Customer's last name is invalid or exceeds maximum length of 50 characters.
E_CUSTOMER_COMPANY_NAME_INVALID Customer's company name is invalid or exceeds maximum length of 50 characters.
E_CUSTOMER_STREET_INVALID Customer's street is invalid or exceeds maximum length of 50 characters.
E_CUSTOMER_ZIP_CODE_INVALID Customer's zip code is invalid or exceeds maximum length of 20 characters.
E_CUSTOMER_CITY_INVALID Customer's city is invalid or exceeds maximum length of 50 characters.
E_CUSTOMER_EMAIL_ADDRESS_INVALID Customer's email address is invalid or exceeds maximum length of 50 characters.
E_CUSTOMER_PHONE_NUMBER_INVALID Customer's phone number is invalid or exceeds maximum length of 12 characters.
E_CUSTOMER_FAX_NUMBER_INVALID Customer's fax number is invalid or exceeds maximum length of 12 characters.
E_CUSTOMER_MOBILE_PHONE_NUMBER_INVALID Customer's mobile phone number is invalid or exceeds maximum length of 12 characters.
E_PAYMENT_PERSON_IN_CHARGE_INVALID The given payment person in charge is invalid. Payment person does not correspond with given and/or configured data.

This error occurs if:

  • The given value is not one of Agency, Customer or Operator.
  • The executing operator trying to set the person in charge to Operator has no permissions to do so.

E_PAYMENT_METHOD_INVALID The given payment method is invalid. Payment method does not correspond with given and/or configured data.

This error occurs if:

  • The given value is not one of CreditCard or BankTransfer.

E_DOCUMENT_PERSON_TO_DISPATCH_INVALID The given document dispatch person to dispatch is invalid. Document dispatch person does not correspond with given and/or configured data.

This error occurs if:

  • The given value is not one of Agency, Customer or Operator.
  • The executing operator trying to set the person in charge to Operator has no permissions to do so.

E_DOCUMENT_DISPATCH_METHOD_INVALID The given document dispatch method is invalid. Document dispatch method does not correspond with given and/or configured data.

This error occurs if:

  • The given value is not one of RegularMail, ElectronicMail or Fax.

E_CREDIT_CARD_DATA_INVALID Credit card data is invalid, missing or incomplete. All credit card information is required.
E_CREDIT_CARD_INVALID Credit card is invalid. Please check if all given parameters are correct.
E_CREDIT_CARD_OWNER_INVALID The given credit card owner is invalid or exceeds maximum length of 30 characters.
E_CREDIT_CARD_NUMBER_INVALID The given credit card number is invalid or exceeds maximum length of 16 characters.
E_CREDIT_CARD_CONTROL_CODE_INVALID The given credit card control code is invalid or exceeds maximum length of 4 characters.
E_CREDIT_CARD_VENDOR_INVALID The given credit card vendor is invalid or not supported.
E_BANK_ACCOUNT_DATA_INVALID Bank account data is invalid, missing or incomplete. At least bank account owner, bank account number and bank code are required.
E_BANK_ACCOUNT_INVALID Bank account is invalid. Please check if all given parameters are correct.
E_BANK_TRANSFER_ACCOUNT_OWNER_INVALID The given bank account owner is invalid or exceeds maximum length of 30 characters.
E_BANK_TRANSFER_ACCOUNT_NUMBER_INVALID The given bank account number is invalid or exceeds maximum length of 10 characters.
E_BANK_TRANSFER_ACCOUNT_BANK_CODE_INVALID The given bank code is invalid or exceeds maximum length of 8 characters.
E_BANK_TRANSFER_ACCOUNT_BANK_NAME_INVALID The given bank name is invalid or exceeds maximum length of 30 characters.
E_REQUEST_INVALID The performed request is invalid or malformed.

List Of Warnings Returned

Warning Code Description
W_CURRENCY_NOT_SUPPORTED The requested currency code is not supported for reservation creation. Using default currency instead.

See Also

CarRentalAgentService Class | SunnyCars.Services.Osi.WsReservation Namespace