Creates a new reservation for the specified services and passenger details. Since these requests can potentially get very long, we recommend using a POST request instead of GET.
Input
transtype
- AlwaysBOOK
login
- API user's usernamepassword
- API user's passwordbookrequest
- A JSON object string containing an array ofbookcommand
objects, an array ofpassenger
objects, and an array ofreference
objects.gateway
- string - If booking air + land rates and services, make sure to include your origination gateway for the correct services and rates. If left blank or omitted, system will book land-only rates and services. If your Softrip provider doesn't offer different rates and services for air + land vs. land-only bookings, you can omit this member.bookasfi
- Boolean - Make the booking FI, booking the generic/base routing as PENDING air.origin - string - The origin/book source of the booking to be made. Note: Must use the GUID that is saved in the Softrip system.
bookcommands
- A JSON array ofbookcommand
objects, as described above in theSHOP
response. Member fields and values will be returned by theSHOP
request; just copy thebookcommand
for selected services into this array. Note that if you are using a price/rate feed and are skipping theSHOP
step, thebookcommand
is one of the properties returned in the rate feed. Just replace placeholders for variable members (departuredate
,duration
, andmask
). Services to be booked can be referenced byitemnumber
andinclusionnumber
, or bysupplierid
andserviceid
. If a request includes all four parameters, theitemnumber
andinclusionnumber
will be used and thesupplierid
andserviceid
will be ignored.productcode
- string - The product code for the selected servicebrandid
- string - The Brand ID for the selected serviceitemnumber
- integer - The ItemNumber for the selected service (from SHOP)inclusionnumber
- integer - The InclusionNumber for the selected service (from SHOP)supplierid
- string - The ID of the supplier providing the selected service (from RateFeed)serviceid
- string - The ID of the selected service (from RateFeed)departuredate
- date - The start date for the selected service (e.g. check-in date for hotels)duration
- integer - The duration of the selected service (e.g. number of nights for hotels). When booking one-time services (e.g. one-way transfers, sightseeing etc.), use a duration of 1.mask
- string - The mask for the selected service. See above for a description of masks and how to built them.qcurrency
- string, 3 characters - The selling currency code for the selected service (e.g. "USD")sellmethod
- string - The selling channel (usually "WEB" or "CALL"). Check with your Softrip provider to determine which SellMethod to use.extsvcref
- string - Alphanumeric string to hold your service reference number. This will be returned in the response, to help match request services to response services.roomsassigned
- string - TheRoomsAssisgned
string indicating the assignment of passengers to this service. This is a specially-formatted string; see https://softrip.atlassian.net/wiki/spaces/KBPUB/pages/76185714/JSON+API+-+SETRESASSIGNMENTS#RoomsAssigned-Format for format definition.
passengers
- A JSON array of passenger objects, as described below in the GETRES response. Note that required fields for passengers will be different for each Softrip client. Check with your Softrip provider to determine which fields are required.title
- string - The passenger's title/salutationlastname
- string - The passenger's last namefirstname
- string - The passenger's first name and middle name or initialmiddlename
- string - The passenger's middle name (Note: This is dependent on the setup of each client if they use the middle name separately from first name)nomiddlename
- Boolean - Pass True if the passenger does not have a middle name. False or null will be treated the samegender
- string - The passenger's gender. Must be either "F" (female) or "M" (male).email
- string - The passenger's email addressphone
- string - The passenger's home/main phone numbermobilephone
- string - The passenger's mobile phone numberfax
- string - The passenger's fax numberHotelRequest
- String - Free text field for hotel-related requests (smoking room, lower floor, disabled access etc.)AirRequest
- String - Free text field for air-related requests (Vegetarian meals, aisle/window seat etc.)GeneralRequest
- String - Free text field for all other passenger requestsIf your front end does not have three distinct fields for these types of special requests, put them all in the "generalrequest" field
There is NO guarantee that any special requests will be met by suppliers. It is up to the third-party API consumer to notify their passengers that requests may not be met.
address
- Address object for this passenger's addressaddress1
- string - The passenger's address' first lineaddress2
- string - The passenger's address' second linecity
- string - The passenger's address' citystate
- string - The passenger's address' statezip
- string - The passenger's address' zip/postal codecountry
- string - The passenger's address' country. Must be in international standard 2-letter format ("US" for United States, "FR" for France, "DE" for Germany etc.)
paxtype
- string - The passenger type. "A" for adult, "C" for childbirthdate
- date - The passenger's birth date (see above for date formats)specialrequests
- Special Requests object for this passenger's request (array)id
- integer - The preference ID that relates to the special request to save (This must be provided by Softrip for each type of request you want)type
- string - The type of request/preference that this isvalue
- string - The value entered by the passenger for the request
passengerforms
- Passenger Form object for this passenger's request (array)type
- string - The type for the request (This must be provided by Softrip for each form and could be per brand)description
- string - The description/text to be saved against the formformid
- string - The Form ID that the contact/passenger filled out (This must be provided by Softrip for each form and could be per brand)
references
- A JSON array of references. Contact your Softrip provider to determine which reference questions are available.keyid
- string - A unique identifier for this reference question (e.g. "REFERENCENUMBER")key
- string - A description of this reference question (e.g. "Enter your reference number")value
- string - The value for this reference question (e.g. "1234")
promotions
- A JSON array of promotion/coupon codes to be applied to the bookingpromotionid
- string - The promotion/coupon code to be appliedfailifinvalid
- boolean - Indicates whether the booking should fail if the promotion is invalid. If set to false, the booking will go through even if the promotion is inapplicable. If set to true, the booking will fail if the promotion is inapplicable.
discounts
- A JSON array of discounts to be applied to the booking. Discounts are entered as manual services on the reservation, with the associated description. Note that a discount may not be for more than the total price of the reservation.discount
- integer - The value of the discount to be applied. This should be a positive amount (e.g. "50.00" for a $50 discount, not "-50.00"). This amount is per reservation.description
- string - The description of the discount to be applied. If left blank, the discount will be entered with the description "Discount".
resmemos
- A JSON array of memos to be applied to the bookingmemotext
- string - The text of the memo to be applied
paymentamount
- decimal - The amount that should be applied as payment to the booking (ONLY to be used if processing the payment through a 3rd party processor)pnreference
- string - The reference number provided by the payment processorauthcode
- string - The authorization code provided by the payment processorcardtype
- string - The 2-letter card type of the card that was charged (VI=Visa,MC=MasterCard,AX=American Express, etc.)
Output
reservationscreated
- integer - The number of reservations successfully created (one per distinct selling currency in the request)[currency]rescreated
- boolean - Indicates whether a reservation with the specified currency was created. When booking services in multiple currencies (e.g. CAD and USD), there will be one value for each currency (e.g. "cadrescreated = true, usdrescreated = true)reservations
- An array of reservation objects representing the reservations that were created by theBOOK
request. See “GETRES
" response below