The API URL for accessing stays information is:
https://click-and-travel.com/api/getStays.php
To authenticate with the Click and Travel API, you need to use Basic Authentication. Include the usual login email and password in the Authorization header.
Here is an example using cURL:
curl -X GET -H "Authorization: Basic [BASE64_ENCODED_CREDENTIALS]" https://click-and-travel.com/api/getStays.php
curl -X GET -H "Authorization: Basic [BASE64_ENCODED_CREDENTIALS]" https://click-and-travel.com/api/getStays.php
{
"result": [
{
"type": "OMRA",
"libelle": "Omra Confort PARIS",
// ... Other properties ...
},
{
"type": "SEJOURS",
"libelle": "Circuit Jordan: Discovering Islam",
// ... Other properties ...
},
// ... Other results ...
]
}
type
: Type of stay (OMRA, SEJOURS, HAJJ, etc.)libelle
: Stay labelnbNuit
: Number of nightspension
: Type of pension (breakfast, half board, etc.)placeRestante
: Remaining placestarifs
: Stay pricestarifsBebe
: Prices for babiesdevise
: Currency of pricesVilleDepart
: Departure citydescription
: Stay descriptionenForfait
: Inclusions in the packagehorsForfait
: Out-of-package items<?php
// Replace [BASE64_ENCODED_CREDENTIALS] with Base64-encoded authentication information.
$url = "https://click-and-travel.com/api/getStays.php";
$credentials = "[BASE64_ENCODED_CREDENTIALS]";
$options = [
"http" => [
"header" => "Authorization: Basic $credentials",
"method" => "GET",
],
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
// Error handling
} else {
// Processing JSON result
$decodedResult = json_decode($result, true);
// ... do something with the data ...
}
?>