Guide d'Intégration API REST Universel (Tous Projets)
Référence complète de l'API REST pour intégrer l'autocomplétion BAN et le moteur d'éligibilité multi-technologies dans n'importe quelle application (Node.js, React, Python, PHP, Mobile, cURL).
1. Spécification & Authentification
L'API Telxora est une API REST standard fournissant des données au format JSON UTF-8. Elle est accessible depuis n'importe quel langage serveur ou application cliente disposant d'un client HTTP.
1X-API-Key: telecom_live_sk_partner_sample_20262Accept: application/json2. Liste Exhaustive des Endpoints
/api/v1/search/autocompleteAutocomplétion BAN officielle. Paramètres : q (min 2 chars), limit (défaut 5).
/api/v1/eligibilityCalcul d'éligibilité multi-technologies. Paramètres : ban_id, partner.
/api/v1/search/imbRésolution directe d'identifiant immeuble ARCEP. Paramètre : imb_id.
3. Exemple Node.js / TypeScript (Fetch / Axios)
1const API_KEY = 'telecom_live_sk_partner_sample_2026';2const BASE_URL = 'https://backend.eligentra.telxora.com/api/v1';34async function checkEligibility(banId, partner = 'XIWO') {5 const url = `${BASE_URL}/eligibility?ban_id=${encodeURIComponent(banId)}&partner=${encodeURIComponent(partner)}`;6 const response = await fetch(url, {7 method: 'GET',8 headers: {9 'X-API-Key': API_KEY,10 'Accept': 'application/json'11 }12 });1314 if (!response.ok) {15 throw new Error(`Erreur API: ${response.status}`);16 }1718 const data = await response.json();19 return data;20}2122// Appel d'exemple23checkEligibility('75102_7065_00012')24 .then(res => console.log('Résultat Éligibilité :', res))25 .catch(err => console.error(err));4. Exemple Python (HTTPX / Requests)
1import httpx23API_KEY = "telecom_live_sk_partner_sample_2026"4BASE_URL = "https://backend.eligentra.telxora.com/api/v1"56def check_eligibility(ban_id: str, partner: str = "XIWO") -> dict:7 headers = {8 "X-API-Key": API_KEY,9 "Accept": "application/json"10 }11 with httpx.Client(base_url=BASE_URL, headers=headers, timeout=10.0) as client:12 response = client.get("/eligibility", params={"ban_id": ban_id, "partner": partner})13 response.raise_for_status()14 return response.json()1516if __name__ == "__main__":17 result = check_eligibility("75102_7065_00012")18 print("Eligible:", result.get("eligible"))19 print("Technologies:", result.get("technologies"))5. Exemple PHP Natif (cURL)
1<?php2$apiKey = 'telecom_live_sk_partner_sample_2026';3$banId = '75102_7065_00012';4$url = 'https://backend.eligentra.telxora.com/api/v1/eligibility?ban_id=' . urlencode($banId) . '&partner=XIWO';56$ch = curl_init($url);7curl_setopt_array($ch, [8 CURLOPT_RETURNTRANSFER => true,9 CURLOPT_HTTPHEADER => [10 'X-API-Key: ' . $apiKey,11 'Accept: application/json'12 ],13 CURLOPT_TIMEOUT => 8,14]);1516$response = curl_exec($ch);17$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);18curl_close($ch);1920if ($httpCode === 200) {21 $data = json_decode($response, true);22 print_r($data);23} else {24 echo "Erreur HTTP : " . $httpCode;25}6. Hiérarchie & Normalisation des Technologies
Le résultat de l'API priorise toujours l'accès offrant le meilleur débit garanti :
7. Infrastructures & Partenaires
L'API fait la distinction entre l'Opérateur d'Infrastructure (OI, déployeur du réseau physique tel qu'Orange, SFR, Altitude, Axione) et l'Opérateur Commercial (OC, fournisseur de services tel que XIWO, Free, Bouygues). En cas de conflit, la base nationale ARCEP fait foi.
