ACCESSING THE BOOKFLOW

White label partners can access CV Villas availability and deep-link their customers into an online booking

Custom Bookflow Header and Footer

Before directing any customers to the bookflow please send a html header and footer to the Cv Villas team, this will be rendered in place of the Cv Villas header and footer. 

  • Use absolute urls in links and images.
  • Use https assets only to avoid mixed content warnings.
  • Use inline styles.


Airports and Durations

To facilitate a departure airport drop down list and a duration selection list the following API request can be used to provide availability aware options. The airport group "-" represents Villa Only durations.

Endpoint: 

GET /umbraco/api/destinationsapi/Departure/

Parameters

NameTypeComments
indiscriminateIdsint[]The indiscriminateIds parameter is a comma separated list of AccommodationCmsId. Country, Region and Resort Ids are also accepted. 
adultsintThe number of adults to consider when checking availability.
childrenintThe number of children to consider when checking availability.

Result

{
    options: [{
            name: "London (All)",
            originId: 25031,
            selected: false,
            hide: false,
            selectable: true,
            options: [{
                    name: "London City",
                    code: "LCY",
                    selected: false,
                    selectable: false,
                    durations: []
                }, {
                    name: "London Gatwick",
                    code: "LGW",
                    selected: false,
                    selectable: true,
                    durations: [ 7, 14, 21 ]
                }, {
                    name: "London Stansted",
                    code: "STN",
                    selected: false,
                    selectable: true,
                    durations: [ 7 ]
                }
            ]
        },    {
            name: "Scotland (All)",
            originId: 45286,
            selected: false,
            hide: false,
            selectable: true,
            options: [{
                    name: "Aberdeen",
                    code: "ABZ",
                    selected: false,
                    selectable: false,
                    durations: []
                }, 
            ]        
        }, {
            name: "-",
            originId: 0,
            selected: false,
            hide: true,
            selectable: false,
            options: [{
                    name: "-",
                    code: "-",
                    selected: false,
                    selectable: false,
                    durations: [ 3, 4, 5, 7, 8, 9, 10, 13, 14, 21 ]
                },
            ]
        }
    ]
}


Availability

To facilitate an availability calendar or list the following request will give day by day prices for the desired villa.

Endpoint: 

GET /umbraco/Api/AvailabilityApi/GetAvailabilityOnDays/

Parameters

NameTypeComments
nights
intThe duration of the desired stay.
adultsintThe number of adults to consider when checking availability.
childrenintThe number of children to consider when checking availability.
infants
int
The number of infants to consider when checking availability.
departure
int?
OriginId of the desired airport (optional).
accommodationId
intAccommodationCmsId of the desired villa.

Result

[
    [
        "2022-05-02", {
            price: "£1,932",
            personPrice: "£966",
            villaPrice: "£1,276",
            offerPrice: null,
            offer: null,
            departureIds: [
                24886,
                24890,
                24892,
                24898,
                24914,
                24923,
                24944,
                24950,
                24989
            ],
            durations: [
                7
            ],
            cacheId: "754c553b-ecd3-4053-bdd8-eeb1a305c125",
            checkIn: "02 May 2022 at 15:00",
            checkOut: "09 May 2022 at 09:00",
            nights: 7,
            villaOnly: false,
            flights: {
                departureTime: "06:05",
                departureDate: "02 May 22",
                arrivalTime: "11:15",
                arrivalDate: "02 May 22",
                departureLocationName: "Birmingham",
                arrivalLocationName: "Corfu Kerkyra Airport",
                returnDepartureTime: "12:15",
                returnDepartureDate: "09 May 22",
                returnArrivalTime: "13:35",
                returnArrivalDate: "09 May 22",
                reference: "TOM7112",
                airlineCode: "TOM"
            }
        }
    ],
    ...
]


Bookflow

Your user should be directed via POST to the flights page. If the package is Villa Only then they will automatically be redirected to the car hire page.

Endpoint: 

POST /flights/

Parameters

NameTypeComments
apiKey
string
Your whitelabel GUID. If this is not provided there will be no booking note to associate this reservation with your organisation.
adultsintThe number of adults.
childAgesint[]The ages of the children. The total number of children and infants in inferred from this.
villaPackageId
string
The cacheId GUID from the previous step.
includeFlightsboolean
This can be used to turn a Villa + Flight package into a Villa Only package, it cannot be used to add a flight to a Villa Only package.