7. Book

Version 3.1 by Giorgi Mdivnishvili on 2024/02/26 16:23

https://restapi.rustaronline.com/v1.01/api/book

Method: POST

Parameters to pass (IN URL): agented and agentpassword

Sample URL:

https://restapi.rustaronline.com/v1.01/api/book?agentid=test.test&agentpassword=TestP@ssw0rd

The method registers a booking request from the agent into Rustar’s database

Post value example:

{
 "reservationcode": "RES001",
 "customers": [{
     "customercode": "1",
     "title": "Mr",
     "gender": "M",
     "firstname": "John",
     "lastname": "Smith",
     "birthdate": "1990-01-01T00:00:00",
     "citizenship": "AE",
     "visarequired": true,
     "arrivaldate": "2018-03-20T13:00:00",
     "arrivalflightnumber": "FL001",
     "arrivalairport": "DXB",
     "departuredate": "2018-03-25T15:00:00",
     "departureflightnumber": "FL002",
     "departureairport": "DXB",
     "countryaccesscode": "971",
     "areacitycode": "4",
     "phonenumber": "000-00-00",
     "email": "",
     "passportnumber": "",
     "passporttype": "",
     "issuedate": null,
     "expirydate": null,
     "issuecity": null,
     "note": ""
    },{
     "customercode": "2",
     "title": "Mrs",
     "gender": "F",
     "firstname": "Jane",
     "lastname": "Smith",
     "birthdate": "1990-02-02T00:00:00",
     "citizenship": "AE",
     "visarequired": true,
     "arrivaldate": "2018-03-20T13:00:00",
     "arrivalflightnumber": "FL001",
     "arrivalairport": "DXB",
     "departuredate": "2018-03-25T15:00:00",
     "departureflightnumber": "FL002",
     "departureairport": "DXB",
     "countryaccesscode": "971",
     "areacitycode": "4",
     "phonenumber": "000-00-00",
     "email": "",
     "passportnumber": "",
     "passporttype": "",
     "issuedate": null,
     "expirydate": null,
     "issuecity": null,
     "note": ""
    }
  ],
 "hotels": [{
     "hotelname": "Rixos Premium Dubai",
     "checkindate": "2018-03-20T00:00:00",
     "checkoutdate": "2018-03-25T00:00:00",
     "placement": "DBL",
     "roomcategoryname": "1 B/R Deluxe Suite",
     "promotioncodes": "",
     "mealplan": "BB",
     "adults": 2,
     "children": 0,
     "infants": 0,
     "hotelnote": "VIP Guest",
     "customercodes": [
       "1","2"
      ]
    }
  ],
 "transfers": [{
     "transferdate": "2018-03-20T00:00:00",
     "transfertype": "GROUP",
     "fromairport": "DXB",
     "toairport": null,
     "tohotelname": "Rixos Premium Dubai",
     "customercodes": [
       "1","2"
      ]
    },{
     "transferdate": "2018-03-25T00:00:00",
     "transfertype": "GROUP",
     "fromairport": null,
     "fromhotelname": "Rixos Premium Dubai",
     "toairport": "DXB",
     "tohotelid": null,
     "customercodes": [
       "1","2"
      ]
    }
  ],
 "hotelextras": []
}

reservationcode:  string. Reservation/Booking ID from Agent’s system. Might be null

customers:  Array of all tourists of this booking

  customercode:  string. Unique ID of the customer from Agent. Mandatory

  title:  string. Tile (“Mr”, “Mrs”…). Optional

  gender:  string. “M” or “F” only. Mandatory

  firstname:  First name of the customer. Mandatory

  lastname:  Last name of the customer. Mandatory

  birthdate:  Birth date of the customer. Optional. If empty, then the customer will be registered as adult

  citizenship:  string. ISO2 format of the country code. For example “KZ”, “UA”. . Mandatory

  visarequired:  Boolean. Is customer applying for a visa service from rustar. Mandatory

  arrivaldate:  datetime. Mandatory. Addival date AND time of the customer

  arrivalflightnumber:  string. Mandatory. Flight code of the customer for arrival

  arrivalairport:  string. IATA 3 character code of the airpot. Mandatory. Example: “DXB”,”SHJ”

  departuredate:  datetime. Mandatory. Departure date AND time of the customer

  departureflightnumber:  string. Mandatory. Flight code of the customer for arrival

  departureairport:  string. IATA 3 character code of the airpot. Mandatory. Example: “DXB”,”SHJ”

  countryaccesscode:  string. Phone code for the country. Optional. Example: “971”

  areacitycode:  string. Phone code for city or mobile operator. Optional. Example: “050”

  phonenumber:  string. Phone number of the customer. Optional

  email:  string. Email address of the customer. Optional

  passportnumber:  string. Passport number of the customer. Optional

  passporttype:  string. “ID” or “PS”. Optional. Passport type.

  issuedate:  date. Optional. Issue date of the passport

  expirydate:  date. Optional. Expire date of the passport

  issuecity:  string. Optional. City where the passport was issued

  note:  string. Optional.

hotels:  Array of the hotels to book for this reservation

  hotelid:  guid. Optional. Hotelid returned by “hotels” method (page 2)

  hotelname:  string. Optional. Hotel name. Will be taken from hotelid if empty

  placement:  string. Mandatory. Placement returned by hotelprices method. (see page 4)

  roomcategory:  guid. Optional. Room category ID returned by hotelprices method. (see page 4)

  roomcategoryname:  string. Optional. Room type name. Will be taken from roomcategory if empty

  priceid:  guid. Optional. Priceid returned by hotelprices method. (see page 4)

  promotioncodes: string. Optional. PromotionCodes separated by “;” to book

  mealplan:  string. Optional. Meal plan of the price. Will be taken from priceid if empty

  checkindate:  date. Mandatory. Check in date for this price. Must be within the range of the price

  checkoutdate:  date. Mandatory. Check out date for this price. Must be within the range of the price

  adults:  int. Mandatory. Number of adults in booking

  children:  int. Number of children in booking

  infants:  int. Number of infants in booking

  hotelnote:  string. Note for the booking. Optional

  customercodes:  array of strings. Codes of the customers staying in this hotel reservation for these dates

transfers:  Array of the transfers for this booking

  transferdate:  date. Mandatory. Date of the transfer

  transfertype:  string. Mandatory. VehicleName taken from vehicletypes method. Page 15 (“GROUP”, “TOYOTA PREVIA”…)

  fromairport:  string. IATA code of the airport to pick up the tourists

  fromhotelid:  guid. Hotelid returned by hotels method. Hotel to pick up the tourists.

  fromhotelname:  string. HotelName returned by hotels method.

  toairport:  string. IATA code of the airport to drop the tourists

  tohotelid:  guid. Hotelid returned by hotels method. Hotel to drop the tourists.

  tohotelname:  string. HotelName returned by hotels method.

  customercodes:  array of strings. Codes of the customers for this transfer

hotelextras:  Array of the extra services, like gala dinners for this booking

  servicedate:  date. Mandatory. Date of the service/gala dinner

  extraserviceid:  guid. Mandatory. extraserviceid returned by hotelextras method. Page 9

  customerprices:  array of customercodes and priceid-s from hotelextras

    customercode:  string. Mandatory. CustomerCode from Customer’s object.

    priceid:  guid. Mandatory. Price id from Adult, Teen, Child, Infant from hotelextras

Return value example:

{
 "Code": "00",
 "Message": "",
 "Timestamp": "2018-01-06T03:35:50.0365078+04:00",
 "Version": "1.01",
 "ResponseID": "506decf4-7deb-46fd-b10f-35d8baf6ee3f",
 "Data": {
   "ReservationID": "b36f6534-c5ce-4bc7-b8b6-8ee39fc6f913",
   "ReservationNumber": "68440",
   "ReservationDate": "2018-01-06T03:35:46.257",
   "ReservationAmount": 6877.00,
   "ReservationStatus": 0,
   "ReservationStatusName": "Draft",
   "ReservationTourists": [{
     "TouristID": "942dd874-cd3b-4f3c-b3bc-c2a92b38c392",
     "FirstName": "John",
     "LastName": "Smith",
     "ChildFlag": 0,
     "BirthDate": "1990-01-01T00:00:00",
     "CountryCode": "AE",
     "CountryID": "fead4059-3958-42d9-ab98-4446de89c0f1",
     "CountryAccessCode": "971",
     "AreaCityCode": "4",
     "PhoneNumber": "000-00-00",
     "Gender": 1,
     "ArrivalDate": "2018-03-20T13:00:00",
     "ArrivalFlightNumber": "FL001",
     "ArrivalTerminalName": "DXB",
     "DepartureDate": "2018-03-25T15:00:00",
     "DepartureFlightNumber": "FL002",
     "DepartureTerminalName": "DXB",
     "Email": "",
     "PassportNumber": "",
     "PassportType": "",
     "IssueCity": null,
     "IssueDate": null,
     "ExpiryDate": null,
     "Note": ""
    }, {
     "TouristID": "18c4ac33-05e6-49b5-b9cd-3f3cc1a30b61",
     "FirstName": "Jane",
     "LastName": "Smith",
     "ChildFlag": 0,
     "BirthDate": "1990-02-02T00:00:00",
     "CountryCode": "AE",
     "CountryID": "fead4059-3958-42d9-ab98-4446de89c0f1",
     "CountryAccessCode": "971",
     "AreaCityCode": "4",
     "PhoneNumber": "000-00-00",
     "Gender": 2,
     "ArrivalDate": "2018-03-20T13:00:00",
     "ArrivalFlightNumber": "FL001",
     "ArrivalTerminalName": "DXB",
     "DepartureDate": "2018-03-25T15:00:00",
     "DepartureFlightNumber": "FL002",
     "DepartureTerminalName": "DXB",
     "Email": "",
     "PassportNumber": "",
     "PassportType": "",
     "IssueCity": null,
     "IssueDate": null,
     "ExpiryDate": null,
     "Note": ""
    }],
   "ReservationHotels": [{
     "ReservationHotelID": "19be0332-a305-4343-b2a2-ff2f012461d9",
     "AgentConfirmationNumber": "RES001",
     "CheckInDate": "2018-03-20T00:00:00",
     "CheckOutDate": "2018-03-25T00:00:00",
     "HotelID": "ed1b48cc-c0d1-47f4-8b17-03e509f705bc",
     "HotelName": "Rixos Premium Dubai",
     "RoomCategoryID": "64c30364-80db-4634-ad24-5b15eb1adf44",
     "RoomCategoryName": "1 B/R Deluxe Suite",
     "PriceID": "5ed4e543-9af3-42b3-b367-b4dfce0b2042",
     "MealPlanName": "BB",
     "Placement": 3,
     "PlacementTypeName": "DBL",
     "Note": "VIP Guest",
     "Tourists": ["942dd874-cd3b-4f3c-b3bc-c2a92b38c392", "18c4ac33-05e6-49b5-b9cd-3f3cc1a30b61"]
    }],
   "ReservationTransferServices": [{
     "ReservationTransferID": "47608d83-7205-4a60-9498-055516ad4328",
     "TouristID": "942dd874-cd3b-4f3c-b3bc-c2a92b38c392",
     "TransferDate": "2018-03-25T00:00:00",
     "ServiceName": "DEPARTURE",
     "FromTerminalName": null,
     "ToTerminalName": "DXB",
     "FromHotelID": "ed1b48cc-c0d1-47f4-8b17-03e509f705bc",
     "FromHotelName": "Rixos Premium Dubai",
     "ToHotelID": null,
     "ToHotelName": null,
     "VehicleTypeId": "a9252005-0a92-4ed1-9603-0f2f14295c29",
     "VehicleTypeName": "GROUP"
    }, {
     "ReservationTransferID": "14730745-5ce8-4045-b032-b3c0fe956a96",
     "TouristID": "942dd874-cd3b-4f3c-b3bc-c2a92b38c392",
     "TransferDate": "2018-03-20T00:00:00",
     "ServiceName": "ARRIVAL",
     "FromTerminalName": "DXB",
     "ToTerminalName": null,
     "FromHotelID": null,
     "FromHotelName": null,
     "ToHotelID": "ed1b48cc-c0d1-47f4-8b17-03e509f705bc",
     "ToHotelName": "Rixos Premium Dubai",
     "VehicleTypeId": "a9252005-0a92-4ed1-9603-0f2f14295c29",
     "VehicleTypeName": "GROUP"
    }, {
     "ReservationTransferID": "128930a5-996e-4581-8be0-0126a4d460ec",
     "TouristID": "18c4ac33-05e6-49b5-b9cd-3f3cc1a30b61",
     "TransferDate": "2018-03-20T00:00:00",
     "ServiceName": "ARRIVAL",
     "FromTerminalName": "DXB",
     "ToTerminalName": null,
     "FromHotelID": null,
     "FromHotelName": null,
     "ToHotelID": "ed1b48cc-c0d1-47f4-8b17-03e509f705bc",
     "ToHotelName": "Rixos Premium Dubai",
     "VehicleTypeId": "a9252005-0a92-4ed1-9603-0f2f14295c29",
     "VehicleTypeName": "GROUP"
    }, {
     "ReservationTransferID": "1d0630a4-547e-452d-b0c9-448b5423fe94",
     "TouristID": "18c4ac33-05e6-49b5-b9cd-3f3cc1a30b61",
     "TransferDate": "2018-03-25T00:00:00",
     "ServiceName": "DEPARTURE",
     "FromTerminalName": null,
     "ToTerminalName": "DXB",
     "FromHotelID": "ed1b48cc-c0d1-47f4-8b17-03e509f705bc",
     "FromHotelName": "Rixos Premium Dubai",
     "ToHotelID": null,
     "ToHotelName": null,
     "VehicleTypeId": "a9252005-0a92-4ed1-9603-0f2f14295c29",
     "VehicleTypeName": "GROUP"
    }],
   "ReservationServices": [{
     "ReservationServiceID": "d026ba62-c193-4c5b-956d-458dc5e6a00a",
     "TouristID": "18c4ac33-05e6-49b5-b9cd-3f3cc1a30b61",
     "ServiceDate": "2018-03-20T13:00:00",
     "ServiceName": "Visa / Visa Charges"
    }, {
     "ReservationServiceID": "180538a7-34f5-4899-a47c-f732cf1e29fd",
     "TouristID": "942dd874-cd3b-4f3c-b3bc-c2a92b38c392",
     "ServiceDate": "2018-03-20T13:00:00",
     "ServiceName": "Visa / Visa Charges"
    }]
  }
}

The values are self-descriptive and most of them just are the same as passed to this booking. The values to pay attention apart crosschecking the booking parameters are:

ReservationID: guid. Unique ID assigned to the booking by Rustar

ReservationNumber: string. Unique booking number assigned by Rustar. Can be used for searching on web portal

ReservationDate: date and time of the reservation.

ReservationAmount: decimal. Total amount of the booking in USD

ReservationStatus: int. Status id of the reservation.

ReservationStatusName: string. Description of the status of the reservation