## Vue d'ensemble L'enregistrement de domaines **débite votre wallet** (live ou sandbox). Le prix est `reseller_price` du plan domaine, ou `price` si `reseller_price` est null. En mode sandbox : prix fixe de **5 000 XAF** par domaine, aucun enregistrement réel. **Scope requis :** `reseller:domains` ## Vérifier la disponibilité ```http GET /api/v1/reseller/domains/check?domain={domain} ``` ```bash curl "https://kennhosting.com/api/v1/reseller/domains/check?domain=mon-client.cm" \ -H "Authorization: Bearer kh_live_YOUR_TOKEN" \ -H "Accept: application/json" ``` **Réponse :** ```json { "success": true, "data": { "domain": "mon-client.cm", "available": true, "price": 5000.0, "currency": "XAF" } } ``` `price` peut être `null` si l'extension n'est pas prise en charge par KennHosting. ## Enregistrer un domaine ```http POST /api/v1/reseller/clients/{client_id}/domains ``` **Corps de la requête :** | Champ | Type | Requis | Description | |-------|------|--------|-------------| | `domain` | string | Oui | Nom de domaine à enregistrer | | `years` | integer | Non | Durée en années (défaut : 1) | | `auto_renew` | boolean | Non | Renouvellement automatique (défaut : `true`) | ```bash curl -X POST "https://kennhosting.com/api/v1/reseller/clients/1/domains" \ -H "Authorization: Bearer kh_live_YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "domain": "jean-site.cm", "years": 1, "auto_renew": true }' ``` **Réponse live (201) :** ```json { "success": true, "data": { "sandbox": false, "domain": "jean-site.cm", "years": 1, "expires_at": "2027-06-12", "amount_debited": 5000 } } ``` **Réponse sandbox (201) :** ```json { "success": true, "data": { "sandbox": true, "domain": "jean-test.cm", "years": 1, "expires_at": "2027-06-12", "amount_debited": 5000, "message": "Domaine sandbox simulé — aucune ressource réelle créée." } } ``` ## Lister les domaines d'un client ```http GET /api/v1/reseller/clients/{client_id}/domains ``` ```json { "success": true, "data": [ { "domain": "jean-site.cm", "expires_at": "2027-06-12", "auto_renew": true, "status": "active" } ] } ``` ## Erreurs spécifiques | Code | Description | |------|-------------| | `domain_unavailable` | Domaine non disponible (déjà pris) | | `insufficient_balance` | Solde wallet insuffisant |