Hotel Price Import

Anixe collects hotel pricing and availability data on a daily basis from various suppliers.

Schedule

Prices are collected every day.

Supplier details

Prices and rules Json

 Predicates used to define rules, restrictions, meals and prices:

  date and stays:
     "date_stay_from": "2013-10-01"     #refers to check-in date
     "date_stay_to": "2013-11-30" 
     "date_before_from": "2012-10-18"   #refers to booking date
     "date_before_to": "2014-11-30"
     "days_before_from": 20
     "days_before_to": 30
     "days_stay_from": 7
     "days_stay_to": 14
     "days_of_week": "23456" # 1 for Sunday
     "days_of_week_stay_type": "ALL|ONE" 
        # if ONE only one of stay days must match "days_of_week"
        # if ALL is set all "days_of_week" must match at least one day from stay days
        # default is ONE

  occupancy:
     "min_adt": 1
     "max_adt": 1 
     "min_chd": 0
     "max_chd": 2
     "min_pax": 1
     "max_pax": 3 # maximal number of ALL possible paxes in the room, INCLUDING those coming from rules/extrabeds/etc.
     "pax_type": "ADT"
     "min_age": 12
     "max_age": 99
     "apply_to_pax_number": 3  #discount/supplement should be applied to 3rd person of pax_type in room

  board:
     "meal_code": "BB"

  general:
     "package_only": false,

 Available restrictions:
     MINSTAY
     STOPSALES
     CHECKIN
     CHECKOUT

 Available rules (reductions or extra charges):
     GENERAL
     STAYPAY
     ARRIVAL
     EARLYBIRD
     CHILD
     INFANT
     EXTRABED
     LONGSTAY
     MINSTAY
     FIXEDSTAY
     INDIVIDUALUSE
     LASTMINUTE

 Available room occupancies:
     SR - single
     DR - double
     TR - triple
     QR - quadruple
     xR - any room, x stands for number of adults

 Available meal types:
     SC - no meal
     BB - breakfast
     HB - half board
     FB - full board
     AI - all inclusive

 Price appliances:
     TOTAL   - calculate on total price
     BASE    - calculate on base price
     MEAL    - calculate on meal price
     NIGHT   - calculate on any night price
     1NIGHT  - calculate on first night price

 Example:

[{
    "mh": "BER000001",
    "mhr": "BER00000101",
    "country_code: "DE",
    "rate_code": "NKG_001:CIT3",
    "provider": "GTA",
    "provider_hotel_code": "BERNKG",
    "provider_rate_code": "CIT3",
    "provider_rate_name" : "Dopplezimmer Standard",
    "provider_rate_contract" : "Direct123",
    "provider_city_code" : "NKG",
    "date_stay_from": "2013-01-01",
    "date_stay_to": "2013-12-31",
    "date_before_from": "2012-11-01",
    "date_before_to": "2013-12-28",
    "days_stay_from": 3,
    "days_stay_to": 7,
    "days_before_from": 0,
    "days_before_to": 1,
    "days_of_week": "1234567",
    "room_occupancy": "DR",                     #default room occupancy (number of adults)
    "min_pax": 1,
    "max_pax": 3,
    "min_adt": 1,
    "max_adt": 2,
    "min_chd": 0,
    "max_chd": 2,
    "min_chd_age": 2,
    "max_chd_age": 11,
    "max_rooms": 9,                             #number of available rooms of this type   
    "inf_allowed" : true,                       #are infants allowed in this room
    "inf_apply_to_occupancy" : false,           #should infants be calculated towards room occupancy
    "package_only": false,
    "price": {
        "currency": "EUR",
        "type": "NETNET",
        "prices": [
            {
                "date_stay_from": "2013-01-01", #check-in date from
                "date_stay_to": "2013-03-01",   #check-in date to
                "value": 150.12,
                "per_pax": false,
                "stay_duration": 1              #indicates for how many nights the price applies (divide by it to get price per night)
            },
            {
                "date_stay_from": "2013-03-02",
                "date_stay_to": "2013-11-01",
                "days_before_from": 5,
                "value": 120.01,
                "per_pax": false,
                "stay_duration": 1
            },
            {
                "date_stay_from": "2013-11-02",
                "date_stay_to": "2013-12-31",
                "value": 50,
                "per_pax": true,
                "stay_duration": 3
            }
        ]
    },
    "restrictions": [
        {
            "type": "MINSTAY",
            "date_stay_from": "2013-02-01",
            "date_stay_to": "2013-02-28",
            "days_stay_from": 5,
            "days_stay_to": 5
        },
        {
            "type": "STOPSALES",
            "date_stay_from": "2013-04-01",
            "date_stay_to": "2013-04-10"
        },
        {
            "type": "CHECKIN|CHECKOUT",
            "days_of_week": "67",
            "date_stay_from": "2013-07-01",
            "date_stay_to": "2013-09-30"
        }
    ],
    "meals": [
        {
            "date_stay_from": "2013-01-01",
            "date_stay_to": "2013-12-31",
            "meal_code": "BB",
            "provider_meal_code" : "234",
            "mandatory": true,
            "days_of_week": "12345",
            "provider_meal_name" : "Fruhstueck",
            "price": {
                "value": 0,
                "currency": "EUR",
                "per_pax": true
            }
        },
        {
            "date_stay_from": "2013-07-01",
            "date_stay_to": "2013-08-31",
            "meal_code": "AI",
            "min_age": 11,
            "max_age": 99,
            "pax_type": "ADT",
            "days_of_week": "23456",
            "provider_meal_name" : "Alles Inclusive",
            "price": {
                "percent": 8,
                "calculate_on": "BASE",
                "per_pax": false
            }
        },
        {
            "date_stay_from": "2013-07-01",
            "date_stay_to": "2013-07-02",
            "meal_code": "SC",
            "provider_meal_name" : "No meal",
            "price": {
                "percent": -100,                #meal is free
                "calculate_on": "BASE",
                "per_pax": true
            }
        }
    ],
    "rules": [
        {
            "operator": "OR",
            "rules": [
                {
                    "type": "GENERAL",
                    "date_stay_from": "2013-03-01",
                    "date_stay_to": "2013-06-30",
                    "cumulative_with_other_rules_of_this_type": false,
                    "price": {
                        "percent": -8,
                        "calculate_on": "TOTAL|BASE|MEAL|NIGHT|1NIGHT"
                    }
                },
                {
                    "type": "STAYPAY",
                    "date_stay_from": "2013-07-01",
                    "date_stay_to": "2013-08-31",
                    "days_stay_from": 7,
                    "days_stay_to": 7,
                    "days_of_week": "23456",
                    "days_of_week_stay_type": "ALL|ONE",
                    "price": {
                        "nights": -1,
                        "calculate_on_night": "CHEAPEST|MOSTEXPENSIVE|AVERAGE|FIRST|LAST",
                        "calculate_on": "BASE"
                    }
                }
            ]
        },
        {
            "operator": "OR",
            "rules": [
                {
                    "type": "ARRIVAL",
                    "date_stay_from": "2013-01-01",
                    "date_stay_to": "2013-01-31",
                    "days_of_week": "12467",
                    "price": {
                        "value": 2,
                        "currency": "EUR",
                        "calculate_on": "TOTAL"
                    }
                },
                {
                    "type": "ARRIVAL",
                    "date_stay_from": "2013-12-25",
                    "date_stay_to": "2013-12-25",
                    "price": {
                        "value": 20,
                        "currency": "EUR",
                        "calculate_on": "TOTAL"
                    }
                }
            ]
        },
        {
            "type": "OPERATOR",
            "operator": "AND",
            "rules": [
                {
                    "type": "EARLYBIRD",
                    "days_before_from": 20,
                    "days_before_to": 30,
                    "price": {
                        "value": -5,
                        "currency": "EUR",
                        "calculate_on": "TOTAL"
                    }
                },
                {
                    "type": "CHILD|INFANT",
                    "min_age": 0,
                    "max_age": 2,
                    "meal_code": "BB",
                    "min_adt": 1,
                    "price": {
                        "value": 0,
                        "calculate_on": "TOTAL"
                    }
                },
                {
                    "type": "EXTRABED",
                    "min_pax": 3,
                    "max_pax": 3,
                    "pax_type": "ADT",
                    "apply_to_pax_number": 3,
                    "price": {
                        "percent": -50,
                        "calculate_on": "BASE"
                    }
                },
                {
                    "type": "LONGSTAY",
                    "days_stay_from": 7,
                    "days_stay_to": 14,
                    "pax_type": "ADT",
                    "price": {
                        "percent": -10,
                        "calculate_on": "BASE"
                    }
                },
                {
                    "type": "MINSTAY",
                    "date_stay_from": "2013-10-01",
                    "date_stay_to": "2013-11-30",
                    "days_stay_from": 3,
                    "pax_type": "ADT",
                    "price": {
                        "percent": -5,
                        "calculate_on": "NIGHT"
                    }
                },
                {
                    "type": "FIXEDSTAY",
                    "date_stay_from": "2013-10-01",
                    "date_stay_to": "2013-11-30",
                    "days_stay_from": 6,
                    "days_stay_to": 6,
                    "pax_type": "ADT",
                    "min_age": 12,
                    "max_age": 99,
                    "price": {
                        "percent": -5,
                        "calculate_on": "BASE"
                    }
                },
                {
                    "type": "INDIVIDUALUSE",
                    "max_pax": 1,
                    "price": {
                        "percent": 50,
                        "calculate_on": "BASE"
                    }
                },
                {
                    "type": "LASTMINUTE",
                    "days_before_from": 20,
                    "days_before_to": 30,
                    "max_pax": 1,
                    "price": {
                        "percent": -50,
                        "calculate_on": "BASE",
                        "per_night": true
                    }
                }
            ]
        }
    ]
}]

Products/Hotel/PA (last edited 2014-09-22 12:09:56 by ArturStruzik)

UA-140066296-2