Offer operations

Offer is an individual bookable entry in our system. They are returned by dates search request. Each offer is uniquely identified by two components:

  • Tour operator code (expressed as TourOperator in response)
  • Offer hash code (expressed as HashCode in response)

Those two entries together give you a unique way of identifying every offer in our system and to do actions on that offer.

Examples of actions would be:

  • Check of offer availability
  • Register a booking on that offer
  • Register an option (if Tour Operator supports it)

Endpoint for every specific offer is at: /offer/<TourOperator>/<HashCode>/<action>.

Basic information

Sending GET request without any action will return information about that hash code as you would execute search request but target exactly that offer:

For example: /offer/SON/5d732c3c1b55244a4f066f5fbf831b77:1576886400:1/

This would return the same output as dates request, but without paging or filtering information. In response, an additional field is present called connection, which is the connection name that this request was routed to.

Example response:

{
    "Products": [
        {
            "Product": {
                "OfferName": "Dunajski val\u010dek in vonj po cimetu ter sladkih dobrotah",
                "GiataID": 3331586590492,
                "Picture": {
                    "Thumbnail": "http:\/\/ors.si\/giata-pics3\/3331586590492\/thumb.jpg",
                    "Full": "http:\/\/ors.si\/giata-pics3\/3331586590492\/full.jpg"
                },
                "Location": {
                    "RegionGroupID": "572",
                    "RegionGroupName": "Austria",
                    "RegionID": 701,
                    "RegionName": "Vienna & vicinity"
                }
            },
            "OfferID": 0
        }
    ],
    "Dates": [
        {
            "OfferID": 0,
            "StartDate": "2019-12-21",
            "EndDate": "2019-12-21",
            "TourOperator": "SON",
            "TourOperatorName": "Son\u010dek",
            "ProductCode": "8947",
            "ProductName": "Dunajski val\u010dek in vonj po cimetu ter sladkih dobrotah",
            "ServiceCode": "35915",
            "Duration": 1,
            "HashCode": "5d732c3c1b55244a4f066f5fbf831b77:1576886400:1",
            "OfferSubType": "trip",
            "Price": 35,
            "MinOccupancy": 2,
            "MaxOccupancy": 2,
            "MinAdults": 1,
            "MaxAdults": 2,
            "MinChildren": 0,
            "MaxChildren": 1
        }
    ],
    "Connection": "sellit"
}

Request structure

When performing check, booking or any other operation on offer you will have to provide a list of services, passenger names and any other information required.

Request structure looks like:

typedef Request = struct{
    # Requested language
    Language   string

    # Number of adults and age of children. This field is not
    # required when Travellers field is populated
    AdultCount  int
    ChildrenAge array{int}

    # Number of Rooms (if you wish to verify/book more then 1 room)
    # NOTE! not all suppliers allows booking of more then 1 room.
    RoomCount   int

    # Detailed list of travelers. This field is
    # required for booking.
    Travelers array{struct{
        # Type of passenger. Type determines sex or other property of
        # passenger. Available types are:
        #   - H : Male
        #   - D : 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 (when the birth date is provided, this field can be
        # skipped). Note that some tour operators require a birth
        # date not just age.
        Age           int

        # Passenger birth date (Y-m-d format)
        BirthDate     string
    }}

    # Any additional comments
    Comments string

    # Customer information
    Customer  struct{
        Id            int    # customer id is only shown when this customer
                             # is saved in ORS.
        Address       string
        ZIPCode       string
        City          string
        Telephone     string
        Mobile        string
        Email         string
        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
    }
}

Response structure

For all actions, responses are structured the same way, both when creating booking and accessing already existing booking:

typedef BookingResponse = struct{
    # This field is only present when accessing existing booking.
    # Contains information on who finalized the booking. This is only
    # applicable when already existing booking is accessed.
    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:
        #  - 1 : Operation was succesfully completed.
        #  - 2 : Operation is related to an offer that is on RQ (Request).
        #  - 3 : An error or operation not possible. For example,
        #        while doing verify, this field is set to 3 for unavailable offers.
        #  - 4 : Informational message
        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

        # 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

        # Hash code of offer that this operation was performed on
        HashCode                string
    }

    # Some connections set the offer type this booking was made.
    OfferType string

    # 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
    }

    # Additional customer comments
    Comments 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}
    }}

    # Contains same structure as when requesting
    # basic information on offer.
    OfferInfo DatesResponse


    # Option expiration date (YYYY-MM-DD). Not supplied for all tour operators
    OptionDate string

    # Customer information
    Customer  struct{
        Address       string
        ZIPCode       string
        City          string
        Telephone     string
        Mobile        string
        Email         string
        FirstName     string
        LastName      string
        Country       string
        Sex           string
        ClientNumber  string
        Additional    string
    }

    # 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
        }
    }

    # 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

            # Textual description of travellers on this service
            Travelers          string

            # List of travellers IDs on this service
            TravelersList      array{int}

            # 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
        }
    }

    # Connection name this request was routed to
    Connection string
}

Example response:

{
    "RequestID": "d17c4dcc-5dfca0935db6b834652972",
    "StatusCode": {
        "Status": 1,
        "ID": 206,
        "Text": "Rezervacija na vpra\u0161anje (RQ)"
    },
    "Price": {
        "Currency": "EUR",
        "TotalPrice": "1698",
        "PricePerPerson": "849"
    },
    "Operator": {
        "BookingCode": "20191220121834240",
        "RemoteBookingCode": "5528139",
        "Action": "BA",
        "TourOperator": "PALM",
        "Agenture": "707967",
        "HashCode": "2a60da391139a406eaa6f65b16388a66"
    },
    "ServiceDesc": [
        {
            "Type": "hotel",
            "StartDate": "2020-02-08",
            "EndDate": "2020-02-15",
            "HotelCode": "126017",
            "ServiceCode": "ZIHUR00120",
            "Services": [
                1,
                2
            ]
        }
    ],
    "OfferInfo": {
        "Products": [
            {
                "Product": {
                    "OfferName": "The Cascades Golf Resort 5*",
                    "GiataID": 36600,
                    "Picture": {
                        "Thumbnail": "http:\/\/ors.si\/giata-pics\/36600\/thumb.jpg",
                        "Full": "http:\/\/ors.si\/giata-pics\/36600\/full.jpg"
                    },
                    "RecommendationPercentage": 91,
                    "Location": {
                        "LocationName": "Safaga",
                        "LocationID": 8,
                        "RegionGroupID": "651",
                        "RegionGroupName": "Egipt",
                        "RegionID": 1031,
                        "RegionName": "Rde\u010de morje",
                        "Latitude": 26.858973568496,
                        "Longitude": 33.992836475372
                    },
                    "Facts": {
                        "ben": "v bli\u017eini pla\u017ee (cca. 100-500m)",
                        "chf": "dru\u017eini prijazno",
                        "clb": "klub hotel",
                        "ani": "animacijski program",
                        "spt": "bogata \u0161portna ponudba",
                        "wel": "bogata wellness ponudba",
                        "pol": "bazen",
                        "wms": "masa\u017ea",
                        "wth": "thalasso",
                        "wcu": "cure application",
                        "wsn": "steam bath (tur\u0161ka kopel)",
                        "wbf": "beauty farm",
                        "sws": "vodni \u0161porti",
                        "sbs": "\u0161porti z \u017eogo",
                        "sgl": "golf",
                        "sae": "aerobika",
                        "sfr": "fitness",
                        "stn": "tenis",
                        "sdv": "potapljanje",
                        "sth": "ostale \u0161portne aktivnosti",
                        "wifi": "wifi",
                        "air": "klima",
                        "park": "parkiri\u0161\u010de"
                    }
                },
                "OfferID": 0
            }
        ],
        "Dates": [
            {
                "OfferID": 0,
                "StartDate": "2020-02-08",
                "EndDate": "2020-02-15",
                "TourOperator": "PALM",
                "TourOperatorName": "Palma",
                "ProductCode": "126017",
                "ProductName": "The Cascades Golf Resort 5*",
                "ServiceCode": "ZIHUR00120",
                "Duration": 7,
                "HashCode": "2a60da391139a406eaa6f65b16388a66",
                "OfferSubType": "catalog",
                "Price": 849,
                "ServiceType": "AI",
                "ServiceName": "all inclusive",
                "RoomType": "DZ",
                "RoomName": "dvoposteljna soba",
                "ArrivalAirport": "HRG",
                "ArrivalAirportName": "Hurgada",
                "DepartureAirport": "LJU",
                "DepartureAirportName": "Ljubljana",
                "RoomDetails": "standard, stranski pogled na morje, standard, vse vklju\u010deno",
                "MinOccupancy": 1,
                "MaxOccupancy": 3,
                "MinAdults": 1,
                "MaxAdults": 2,
                "MinChildren": 0,
                "MaxChildren": 1
            }
        ]
    },
    "Customer": {
        "Address": "Fake street",
        "ZIPCode": "SI-12345",
        "City": "Fake city",
        "Telephone": "038640637987",
        "Email": "fake.news@ors.si",
        "FirstName": "Fake",
        "LastName": "News",
        "Sex": "H"
    },
    "Info": [
        "H 126017 ZIHUR00120: ",
        "  The Cascades Golf Resort 5*",
        "  Product code: 126017",
        "  Service code: ZIHUR00120",
        "  Period: 08.02.2020 - 15.02.2020",
        "  Meal: all inclusive",
        "  Details: standard, stranski pogled na morje, standard, vse vklju\u010deno",
        "  --------------------------------------------------------------",
        "  Price breakdown",
        "   * Odrasla oseba .. 1 x 849 : 849",
        "   * Odrasla oseba .. 1 x 849 : 849",
        "   Total: 1698",
        "  --------------------------------------------------------------",
        "  Supplements (bookable with action TD):",
        "   * vizum z asistenco lokalnega partnerja 30 EUR",
        "   * ZUNANJE PARKIRNO MESTO P1\/P2 30 EUR",
        "  --------------------------------------------------------------",
        "  Flight Info:",
        "  *  Typ Dep                 Arr              Flight    ",
        "  => O   08.02. 19:30 LJU .. 09.02. 00:30 HRG UJ-6381   ",
        "  <= V   15.02. 15:00 HRG .. 15.02. 18:15 LJU UJ-6380   ",
        "  These timetables are informative and can be changed.",
        "  You will be notified of the exact timetables 5-7 days before departure with the final travel notice.",
        "",
        "Request ID: d17c4dcc-5dfca0935db6b834652972",
        "CRS powered by ORS"
    ],
    "Travelers": {
        "1": {
            "PassengerType": "H",
            "FirstName": "OTHCCSC",
            "LastName": "UDEDWXY",
            "Age": "201274",
            "BirthDate": "1974-12-20",
            "Price": "849"
        },
        "2": {
            "PassengerType": "H",
            "FirstName": "UGZDKBW",
            "LastName": "IEXRCIV",
            "Age": "201274",
            "BirthDate": "1974-12-20",
            "Price": "849"
        }
    },
    "Services": {
        "1": {
            "Type": "H",
            "Code": "126017",
            "Paramaters": "ZIHUR00120",
            "StartDate": "08022020",
            "EndDate": "15022020",
            "Status": "OK",
            "Price": "1698"
        },
        "2": {
            "Type": "F",
            "Code": "LJU HRG",
            "Paramaters": "ZIHUR00120",
            "StartDate": "08022020",
            "EndDate": "15022020",
            "Status": "OK"
        }
    },
    "Connection": "turist"
}