Gritchen Affinity

GAP - Documentation API Safebooking

{{ getInfoData('title') }} {{ getInfoData('version') }}

[ Base URL : https://{{ getData('host') }}{{ getData('basePath') }} ]



{{ section.title }}

Type de connexion : {{ getData('schemes').join(', ') }}

URLs d’accès au webservice :
https://{{ getData('host') }}{{ getData('basePath') }}{{ cleanPath(pathKey) }}
ou en démo https://{{ getData('hostDemo') }}{{ getData('basePath') }}{{ cleanPath(pathKey) }}

Paramètres

Nom Description
{{ parameter.name }}
{{ parameter.schema.type }} {{ parameter.type }}
{{ parameter.schema.format }} {{ parameter.format }}
{{ parameter.description }}* requis

<?xml version="1.0" encoding="utf-8"?>

<?php
$data = "LE FLUX XML OU JSON";
$base_url = "https://{{ getData('host') }}{{ getData('basePath') }}{{ getCurlPath(pathKey, path.parameters) }}";
$username = "IDENTIFIANT WEBSERVICE";
$password = "MOT DE PASSE WEBSERVICE";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $base_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $password);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/plain"));
$result = curl_exec($ch);
$curl_info = curl_getinfo($ch);

/* traitement erreur http */
if($curl_info["http_code"] != 200){
...
}
else{
...
}
?>

Réponses

Codes Description
{{ responseKey }}
{{ section.title }}