Devis domaine seul
curl --request GET \
  --url https://kennhosting.com/api/v1/domains/quote \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://kennhosting.com/api/v1/domains/quote"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://kennhosting.com/api/v1/domains/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://kennhosting.com/api/v1/domains/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://kennhosting.com/api/v1/domains/quote"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://kennhosting.com/api/v1/domains/quote")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://kennhosting.com/api/v1/domains/quote")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body

Requête

GET /v1/domains/quote?domain=monsite.com&years=1
Authorization: Bearer kh_live_xxxx
Accept: application/json
ParamètreTypeRequisDescription
domainstringOuiNom de domaine complet
yearsintegerNonDurée d’enregistrement, 1 à 10 (défaut 1)
Le montant est calculé côté serveur à partir du prix d’achat registrar (USD) pour la période, majoré de 30 % (configurable), puis converti en XAF pour le paiement.

Réponse — succès (200)

{
  "success": true,
  "data": {
    "domain": "monsite.com",
    "years": 1,
    "premium": false,
    "amount_xaf": 16000,
    "amount_eur": 24.39,
    "currency": "XAF"
  }
}
  • premium : indique un domaine premium côté registrar (prix généralement plus élevé).
  • amount_eur : équivalent indicatif pour affichage ; le paiement client reste piloté en XAF.
Les routes sont exposées sous /api/v1 (ex. GET /api/v1/domains/quote).

Erreurs (422)

error.codeCas
unavailableDomaine non disponible
pricing_unavailablePrix introuvable pour ce TLD / cette réponse registrar
invalid_domainDomaine vide
registrar_unavailableRegistrar non configuré

Permissions requises

domains:read