## Vue d'ensemble La provision VPS **débite votre wallet** immédiatement. Le serveur est créé de façon **asynchrone** — vous recevez un webhook `vps.activated` lorsqu'il est opérationnel. **Scope requis :** `reseller:vps` ## Plans disponibles Consultez `/api/v1/reseller/catalog` (catégorie `vps`) pour les slugs courants : | Slug | Prix (XAF/an) | |------|---------------| | `vps-start` | 45 000 | | `vps-pro` | 85 000 | | `vps-scale` | 145 000 | ## Commander un VPS ```http POST /api/v1/reseller/clients/{client_id}/vps ``` **Corps de la requête :** | Champ | Type | Requis | Description | |-------|------|--------|-------------| | `plan_slug` | string | Oui | Slug du plan VPS (ex. `vps-start`) | | `location` | string | Oui | Datacenter cible (ex. `eu-west`, `eu-central`) — voir la liste ci-dessous | | `os_image` | string | Oui | Image OS (ex. `ubuntu-22.04`, `debian-12`) | | `hostname` | string | Non | Nom du serveur | ```bash curl -X POST "https://kennhosting.com/api/v1/reseller/clients/1/vps" \ -H "Authorization: Bearer kh_live_YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "plan_slug": "vps-start", "location": "eu-west", "os_image": "ubuntu-24-04", "hostname": "jean-serveur" }' ``` **Réponse live (201) :** ```json { "success": true, "data": { "sandbox": false, "client_id": 1, "order_uuid": "b1912d95-a2b5-479b-9b19-ee8048e24776", "plan": "vps-start", "status": "provisioning", "amount_debited": 45000, "message": "Le VPS est en cours de création. Vous recevrez un webhook lorsqu'il sera actif." } } ``` **Réponse sandbox (201) :** ```json { "success": true, "data": { "sandbox": true, "client_id": 1, "plan": "vps-start", "server_id": "sb_jHvJBFwk", "server_name": "jean-serveur", "location": "eu-west", "os_image": "ubuntu-24-04", "ipv4": "0.0.0.0", "status": "running", "amount_debited": 45000, "message": "VPS sandbox simulé — aucun serveur réel créé." } } ``` ## Consulter un VPS ```http GET /api/v1/reseller/clients/{client_id}/vps/{service_uuid} ``` ## Actions d'alimentation ```http POST /api/v1/reseller/clients/{client_id}/vps/{service_uuid}/{action} ``` Actions disponibles : `reboot`, `power-on`, `power-off` ## Supprimer un VPS ```http DELETE /api/v1/reseller/clients/{client_id}/vps/{service_uuid} ``` ## Datacenters disponibles | Code | Localisation | |------|-------------| | `eu-west` | Europe Ouest | | `eu-central` | Europe Centrale | | `eu-north` | Europe Nord | ## Images OS courantes - `ubuntu-22-04` - `ubuntu-24-04` - `debian-12` - `centos-stream-9` ## Webhook VPS Quand le serveur est actif, KennHosting envoie : ```json { "event": "vps.activated", "sandbox": false, "data": { "order_uuid": "b1912d95-...", "client_id": 1, "server_id": 12345, "ipv4": "1.2.3.4", "status": "running" } } ```