Documentation API L’hébergement web accessible à tous Visiter LWS

Obtenir les prix de renouvellement

GET https://api.lws.net/v1/hosting/{hosting}/pricerenew

operationIdgetHostingPricerenew

Récupère le prix de renouvellement de l'hébergement et du domaine en Euro (€) ainsi que leur statut.

Paramètres du chemin

hosting string requis

Le nom de domaine dont vous souhaitez récupérer le prix de renouvellement et le statut

Exemple: example.com

Réponses

200

Données récupérées avec succès

{
  "code": 200,
  "info": "Retrieved Hosting and Domain renew prices (Euro (€)/month)",
  "data": [
    {
      "price": {
        "total": 91.62,
        "hosting": 6.99,
        "domain": 0.75,
        "support": 60,
        "backup": 23.88
      },
      "status": {
        "hosting_status": {
          "expired": 6,
          "expired_info": "Hosting has expired 6 days ago",
          "to_renew": false,
          "status": "string",
          "status_info": "string",
          "txt": "string"
        },
        "domain_status": {
          "expired": 4,
          "expired_info": "Domain has expired 4 days ago",
          "to_renew": true,
          "status": "quarantine",
          "status_info": "Domain is in quarantine and will soon be deleted",
          "txt": "string"
        }
      }
    }
  ]
}
Champs de la réponse 24
  • code integer

    Exemple: 200

  • info string

    Exemple: Retrieved Hosting and Domain renew prices (Euro (€)/month)

  • data object[]
  • price object
  • total number

    Prix total à payer pour tout renouveler, en Euro (€)

    Exemple: 91.62

  • hosting number

    Prix de renouvellement de l'hébergement seul, en Euro (€)

    Exemple: 6.99

  • domain number

    Prix de renouvellement du domaine seul, en Euro (€)

    Exemple: 0.75

  • support number

    Prix de renouvellement de l'option Support Technique, en Euro (€)

    Exemple: 60

  • backup number

    Prix de renouvellement de l'option Sauvegarde, en Euro (€)

    Exemple: 23.88

  • status object
  • hosting_status object

    Détails sur le statut de l'hébergement

  • expired integer

    Nombre de jours depuis l'expiration de l'hébergement. -1 s'il n'a pas expiré

    Exemple: 6

  • expired_info string

    Informations sur l'expiration de l'hébergement

    Exemple: Hosting has expired 6 days ago

  • to_renew boolean

    Indique si l'hébergement doit être renouvelé

    Exemple: false

  • status string

    Statut actuel de l'hébergement

  • status_info string

    Informations sur le statut de l'hébergement

  • txt string

    Statut éventuellement non géré

  • domain_status object

    Détails sur le statut du domaine

  • expired integer

    Nombre de jours depuis l'expiration du domaine. -1 s'il n'a pas expiré

    Exemple: 4

  • expired_info string

    Informations sur l'expiration du domaine

    Exemple: Domain has expired 4 days ago

  • to_renew boolean

    Indique si le domaine doit être renouvelé

    Exemple: true

  • status string

    Statut actuel du domaine

    Exemple: quarantine

  • status_info string

    Informations sur le statut du domaine

    Exemple: Domain is in quarantine and will soon be deleted

  • txt string

    Statut éventuellement non géré

314

Domaine introuvable sur le compte

314 n’est pas un code de statut HTTP enregistré. Il est spécifique à cette API.

{
  "code": 314,
  "info": "Provided domain has not been found on your account. You must own this domain to manage it."
}
Champs de la réponse 2
  • code integer

    Exemple: 314

  • info string

    Exemple: Provided domain has not been found on your account. You must own this domain to manage it.

400

Entrée invalide

{
  "code": 400,
  "info": "No hosting provided",
  "data": []
}
Champs de la réponse 3
  • code integer

    Exemple: 400

  • info string

    Exemple: No hosting provided

  • data any[]
401

Non autorisé - En-têtes d'authentification manquants

{
  "code": 401,
  "info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Champs de la réponse 2
  • code integer

    Exemple: 401

  • info string

    Exemple: Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed.

429

Limite de requêtes dépassée

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Champs de la réponse 2
  • code integer

    Exemple: 429

  • info string

    Exemple: Rate limit exceeded. Please try again later.

500

Erreur interne du serveur

{
  "code": 500,
  "info": "Internal Server Error",
  "data": "Error message"
}
Champs de la réponse 3
  • code integer

    Exemple: 500

  • info string

    Exemple: Internal Server Error

  • data string

    Exemple: Error message

502

Passerelle incorrecte

{
  "code": 502,
  "info": "Invalid response from upstream server",
  "data": []
}
Champs de la réponse 3
  • code integer

    Exemple: 502

  • info string

    Exemple: Invalid response from upstream server

  • data object
Afficher les exemples de code et la console de test
GET /hosting/{hosting}/pricerenew
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X GET \  "https://api.lws.net/v1/hosting/example.com/pricerenew" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS"
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/hosting/example.com/pricerenew");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "X-Auth-Login: " . $lwsAuthLogin,    "X-Auth-Pass: " . $lwsAuthPass,]);$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.get(    "https://api.lws.net/v1/hosting/example.com/pricerenew",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/hosting/example.com/pricerenew", {  method: "GET",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,  },});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"req, _ := http.NewRequest("GET",    "https://api.lws.net/v1/hosting/example.com/pricerenew", nil)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)resp, err := http.DefaultClient.Do(req)