API V2 Documentation - AbracadaRoom

API Endpoints

Introduction

  • The base URL for all calls is https://vacation.unicstay.com/api/v1/abcd/v2
  • All calls without error return an HTTP 200 code with a default JSON object (unless the documentation mentions a specific case).
    It is possible to receive a response in the XML format by adding the ?format=xml parameter during the call of each endpoint (example : https://vacation.unicstay.com/api/v1/abcd/v2/types?format=xml)
  • All API endpoints require authentication (unless the documentation mentions a specific case). In the event of an authentication error, the call returns an HTTP 403 code and a JSON object with the "details" property containing the error message.

Endpoints list

GET /accommodations Get the full list of accommodations with their unavailabilities (cold data)

Returns the full list of accommodations accepting bookings, with their characteristics and their unavailabilities. This endpoint does not return unavailabilities in real-time, since its result is cached for 12 hours. To check real-time availabilities, please see the GET /availabilities endpoint

With a test account (see Authentication), this endpoint will only return up to 20 accommodations.

Return values

A table of N objects of type Accommodation

Objects filtering

This endpoint makes it possible to use the following filters (see Filters for more information):

  • area_code: Department number (for example, for the Rhône department: ?filtering[area_code]=69)
  • country_code: ISO 3166-1 code of the country (for example, for France: ?filtering[country_code]=FR)
  • type_id : id of a Type object (example for the "Boat" type : ?filtering[type_id]=24)
  • theme_id : id of a Theme object (example for the "Waterfalls" theme: ?filtering[theme_id]=20)

GET /properties Get the full list of properties that offer accommodations

Returns the full lists of properties that offer accommodations.

With a test account (see Authentication), this endpoint will only return up to 10 properties.

Return values

A table of N objects of type Property

Objects filtering

This endpoint makes it possible to use the following filters (see Filters for more information):

  • area_code: Department number (for example, for the Rhône department: ?filtering[area_code]=69)
  • country_code: ISO 3166-1 code of the country (for example, for France: ?filtering[country_code]=FR)

GET /types Get the full list of types of accommodations

Returns the full list of types of accommodations.

Return values

A table of N objects of type Type

GET /themes Get the full list of thematics

Returns the full list of thematics.

Return values

A table of N objects of type Theme

GET /property_facilities Get the full list of the property's equipments.

Returns the full list of the property's equipments.

Return values

A table of N objects of type PropertyFacility

GET /nearby_facilities Get the full list of activities near the property

Returns the full list of activities near the property.

Return values

A table of N objects of type NearbyFacility

GET /availabilities Get the real-time availabilities of a list of accommodations passed as parameters

Returns the real-time availabilities and unavailabilities of a list of accommodations passed as parameters. For performance reasons, this endpoint can only handle 10 accommodations at once.

With a test account (see Authentication), this endpoint will not return any availability.

Parameters

Parameters must be passed in the Query String
(example : /availabilities?lang=fr&checkin=2018-12-12&checkout=2018-12-13&accommodations=1325|1326&nb_adults=2)

Mandatory parameters

  • checkin: arrival date, YYYY-MM-DD format
  • checkout: departure date, YYYY-MM-DD format
  • accommodations: list of accommodations' IDs (can be a table or a unique value in which the IDs are separated by the | symbol)

Optional parameters

  • lang: query language (allows to localise error messages). By default, messages are in French.
  • nb_adults: number of adults (0 by default)
  • nb_children: nomber of children (0 by default)
  • nb_babies: number of babies (0 by default)

Return values

An object containing the following data:

Data Description
checkin Reminder of the requested arrival date
checkout Reminder of the requested departure date
nb_adults Reminder of the number of adults requested
nb_children Reminder of the number of children requested
nb_babies Reminder of the number of babies requested
nb_guests Total number of people requested
lang Reminder of the query language (or fr if no query language requested)
available A table of Available responses, one response for each available accommodation (see format below)
unavailable A table of Unavailable responses, one response for each unavailable accommodation (see format below)

The Available response format is the following:

  • id: accommodation ID
  • code: the code "1", indicating that the accommodation is available
  • price: Total price, including taxes

The Unavailable response format is the following:

  • id: accommodation ID
  • code: response code, values can be:
    • 0: problem related to a parameter (missing or inconsistent data, see details for more information)
    • 2: accommodation cannot be booked online (can be temporary)
    • 3: accommodation unavailable at the requested dates
    • 4: accommodation deactivated, not available to rent
    • 5: the total number of people exceed the accommodation's capacity
    • 6: specific conditions don't allow to book this accommodation as per the sent parameters (see details for more information)
  • details: Response details, in the language passed as parameter