ORS Reservation Mask
ORS Reservation Mask (ORM) is an API that allows direct interaction with an Tour Operator system.
Warning
For use on IBE we recommend the booking wrappers as described in previous chapters. This API is mostly used our SMART B2B Application. If you intent to use this API we recommend to contact us first as it has less strict backward-compatiblity guarantees.
It's API is located at /orm
endpoint.
Request / Response structure
The request and response share the same structure. For sucsesfull request, generally only Services, Travellers and Operator are required, altough that may not always be the case.
typedef RequestResponse = struct{
# Contains information on who finalized the booking.
Booker struct{
AgencyID int # Unique ID of an agency that performed this booking
AgencyName string # Agency name that performed this booking
AgencyEmail string # Agency email address
BranchID int # Branch Office ID that performed this booking
BranchName string # Branch Office name
BranchEmail string # Branch Office email address
UserName string # Agent name that finalized this booking
UserEmail string # E-Mail address of agent that performed this booking
UserID int # Internal ID of an agent that performed this booking
}
# Status code contains resulting status after an operation
StatusCode struct{
# Status of the operation. Statuses are the following:
# - 0 : Offer is not available
# - 1 : Offer is free (available to book)
# - 2 : Offer is on request. When the offer is on request, booking
# is still possible, but customer must wait for a confirmation
# from the tour operator.
# - 3 : Communication error (something went wrong when communicating
# with tour operator system)
# - 4 : Offer is sold out (same as status 0)
# - 5 : Booking is not possible, check the detailed description
# and corresponding Info fields for description of a problem.
Status int
# Detailed status code
ID int
# Detailed status description
Text string
}
# Contains pricing information
Price struct{
# Currency price is being calculated in (usually EUR)
Currency string
# Total price. This is the price the customer has to pay.
TotalPrice float
# Price per person. This field is not always present.
PricePerPerson float
# Total amount of discounts applied. This field is not
# always present.
Discounts float
}
Operator struct{
# Booking code generated internally by our system
BookingCode string
# Booking code generated by tour operator system
RemoteBookingCode string
# Invoice ID from remote source (ie. minimax)
RemoteInvoiceId string
# Registration booking code generated when creating a registration (register booking).
# This information is visible when your reservation was made directly from a registration.
RegistrationBookingCode string
# Action code performed on this operation
Action string
# Tour operator code
TourOperator string
# Agenture number for this agency
Agenture string
# Sequence number (for page selection in some connections)
SequenceNumber int
}
# Contains information on status of this booking. This is only applicable
# when already existing booking is accessed.
Record struct{
# Contains timestamp on when was this booking created (Y-m-d h:m:s)
Created string
# Contains timestamp on when was this booking last modified (Y-m-d h:m:s)
Modified string
# Contains record status:
# - S : Booking is canceled
# - R : Booking is on request
# - O : Booking is an option
# - B : Booking is booked
Status string
# If error occured working with ORS bookings database,
# this will displayed the error message.
# In case of an DB error, StatusCode will not change! This is so that you will know
# that everything is still OK with the reservation on TourOperator side.
Error string
}
# Additional customer comments
Comments string
# Internal Remark (for ORS use)
InternalRemark string
# Offer description that is provided by a tour operator
ServiceDesc array{struct{
# Additional data provided by tour operator
map{string => string}
# List of services this description is applicable to
Services array{int}
}}
# Customer information
Customer struct{
Id int # customer id is only shown when this customer
# is saved in ORS.
IsCompany bool # (default=true) set to false, if this is B2C customer
Address string
ZIPCode string
City string
Telephone string
Mobile string
Email string
TaxCode string # you can set company VAT number here
FirstName string
LastName string
Country string
ClientNumber string # this can be customer personal ID or passport ID
ClientNumberType string # this is a type of ClientNumber.
# Can be one of the values: identity_card, passport.
Additional string # additional information
Sex string # Sex is of the same value as H/D in PassengerType
BirthDate string # Customer birth date (Y-m-d format)
Locale string # Customer locale
}
# Human readable multiline text returned by the tour operator.
# This text usually includes a summary of the offer being booked
# with additional notes provided by the tour operator
Info array{string}
# Detailed list of travelers
Travelers map{
# Key is an passenger sequential ID (starting at 1!)
string => struct{
# Type of passenger. Type determines sex or other property of
# passenger. Available types are:
# - H : Male
# - F : Female
# - K : Children (generally up to 18 yr)
# - B : Baby (generally up to 2 yr)
PassengerType string
# Passenger first name
FirstName string
# Passenger last name
LastName string
# Passenger age
Age int
# Passenger birth date
BirthDate string
# Passenger price. This field can be empty
Price float
}
}
# Added in response to print ORM command
PrintInfo struct{
# Confirmation information
Confirmation array{string}
# User readable text regarding agency information
AgencyInfo array{string}
# Additional comments
Remark array{string}
# Booking details
Details array{string}
# Additional information regarding given booking
Header struct{
# Booking type (pauschal, hotel, trip...)
BookingType string
# Starting date of reservation
StartDate string
}
}
# Services are the structures that describe what
# is contained in the offer
Services map{
# Key is service sequential ID (starting at 1!)
string => struct{
# Marker field for service manipulation. Usually empty
MarkerField string
# Service type. This denotes what type of service is requested
# (eg. H is for Hotel, F is for flight, EX is for extras, etc...)
Type string
# Service code (usually product code)
Code string
# Additional service paramaters (usually service code)
Paramaters string
# Additional optional paramaters
OptionalParamaters string
# Service allocation parameter (usually empty)
Allocation string
# Number of items requested
Count string
# Travellers on this service. Value is an IDs of travelers
# as provided in Travellers map (eg: "1,2" would mean that
# travelers with ID 1 and 2 use this service)
Travelers string
# Service starting date
StartDate string
# Service ending date
EndDate string
# Service status (eg. OK - Booked, XX - canceled)
Status string
# Service price (can be empty)
Price float
}
}
# Some connections set the offer type this booking was made.
OfferType string
# Option expiration date (yyyy-mm-dd)
OptionDate string
# URL To Sell-IT generated voucher
VoucherURL string
# Additional programmable input mask
SubMask SubMaskRequestResponse
# Connection name this request was routed to
Connection string
}
SubMask
SubMask is an programmable input mask. It format allows us to specify additional input forms that will be dynamically rendered on client side.
To submit the required data the same structure is send back on the request.
typedef SubMaskElements = struct{
# Textual label
TextLabel array{struct{
Column int
Size int
Text string
}}
# Input element
Input array{struct{
Column int
Size int
Type enum{input, button, radio, area, link}
Text string
Height int
Enabled bool
}}
# Straight line
Line array{struct{
Column int
Size int
Type enum{DrawLine}
Text string
}}
# Select input element
Select array{struct{
Column int
Size int
Type enum{single, multiple}
Text string
Height int
Enabled bool
Options array{struct{
InputID string
Text string
Enabled bool
}}
}}
# Image element
Image array{struct{
Column int
Size int
Text string
URL string
Height int
Type enum{input, button, radio, area, link}
}}
}
typedef SubMaskRequestResponse = struct{
# Submask type
Type string
# Is this submask enabled?
Enabled bool
Title struct{
# Title ID
ID int
# Mask Title text
Text string
}
# Operation result
Result struct{
# Numerical result ID
ID int
# Resulting text
Text string
}
# Element ID where on rendering input focus shold be
FocusElementID string
# SubMask contents
Mask struct{
SubRow array{struct{
# Row ID
RowID string
# Elemenets contained in this mask
Elements SubMaskElements
}}
# Navigational input section
Navigation struct{
# Current page code
PageCode string
# Elemenets contained for navigation purposes
Elements SubMaskElements
}
# Those elements should not be displayed on input mask,
# but their contents should be still submitted back
HiddenElements SubMaskElements
}
}