API documentation Web hosting accessible to everyone Visit LWS

Get renewal prices

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

operationIdgetHostingPricerenew

Get the renewal price of the hosting and domain in Euro (€) as well as their status.

Path parameters

hosting string required

The domain name whose renewal price and status you want to retrieve

Example: example.com

Responses

200

Data retrieved successfully

{
  "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"
        }
      }
    }
  ]
}
Response fields 24
  • code integer

    Example: 200

  • info string

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

  • data object[]
  • price object
  • total number

    Total price to pay to renew everything, in Euro (€)

    Example: 91.62

  • hosting number

    Price to renew only the hosting, in Euro (€)

    Example: 6.99

  • domain number

    Price to renew only the domain, in Euro (€)

    Example: 0.75

  • support number

    Price to renew the Technical Support option, in Euro (€)

    Example: 60

  • backup number

    Price to renew the Backup option, in Euro (€)

    Example: 23.88

  • status object
  • hosting_status object

    Details about the hosting status

  • expired integer

    Number of days the hosting has been expired. -1 if not expired

    Example: 6

  • expired_info string

    Informations about the hosting expiration

    Example: Hosting has expired 6 days ago

  • to_renew boolean

    Whether the hosting has to be renewed or not

    Example: false

  • status string

    Current status of the hosting

  • status_info string

    Informations about the hosting status

  • txt string

    Potentially unhandled status

  • domain_status object

    Details about the domain status

  • expired integer

    Number of days the domain has been expired. -1 if not expired

    Example: 4

  • expired_info string

    Informations about the domain expiration

    Example: Domain has expired 4 days ago

  • to_renew boolean

    Whether the domain has to be renewed or not

    Example: true

  • status string

    Current status of the domain

    Example: quarantine

  • status_info string

    Informations about the domain status

    Example: Domain is in quarantine and will soon be deleted

  • txt string

    Potentially unhandled status

314

Domain not found on the account

314 is not a registered HTTP status code. It is specific to this API.

{
  "code": 314,
  "info": "Provided domain has not been found on your account. You must own this domain to manage it."
}
Response fields 2
  • code integer

    Example: 314

  • info string

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

400

Invalid input

{
  "code": 400,
  "info": "No hosting provided",
  "data": []
}
Response fields 3
  • code integer

    Example: 400

  • info string

    Example: No hosting provided

  • data any[]
401

Unauthorized - Missing authentication headers

{
  "code": 401,
  "info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Response fields 2
  • code integer

    Example: 401

  • info string

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

429

Rate limit exceeded

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Response fields 2
  • code integer

    Example: 429

  • info string

    Example: Rate limit exceeded. Please try again later.

500

Internal Server Error

{
  "code": 500,
  "info": "Internal Server Error",
  "data": "Error message"
}
Response fields 3
  • code integer

    Example: 500

  • info string

    Example: Internal Server Error

  • data string

    Example: Error message

502

Bad Gateway

{
  "code": 502,
  "info": "Invalid response from upstream server",
  "data": []
}
Response fields 3
  • code integer

    Example: 502

  • info string

    Example: Invalid response from upstream server

  • data object
Show the code examples and the test console
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)