Buying an hosting/domain
Deferred Paid action
POST
https://api.lws.net/v1/
operationIdpostHostingBuy
Buy a domain or an hosting on your account. 'package' is the name of the hosting to buy (choose 'domaine' to buy only the domain).
This request is processed in the background: it answers immediately while the work continues. Follow it with the task or request endpoints.
This is a paid action. Your prepaid account will be debited.
Request body
application/json
-
packagestringoptionalWhich hosting to buy among all LWS hostings
-
domainstringoptionalDomain name to associate the hosting to
-
ownerintegeroptionalOwner of the hosting
-
typestringoptionalAll options will buy the selected hosting. 'buy' will also purchase the domain ; 'host' will only buy the hosting, assuming you already possess the domain ; 'transfer' will transfer an existing domain from another registrar to LWS.
-
periodintegeroptionalPeriod of the hosting
Example request
{
"package": "LWS Perso",
"domain": "example.com",
"owner": 565487,
"type": "buy",
"period": 12
}
Responses
200
Hosting created successfully
{
"code": 200,
"info": "Your domain example.com has been bought with the hosting LWS Perso.",
"data": []
}
Response fields 3
-
codeinteger -
infostring -
dataobject
400
Invalid input
{
"code": 400,
"info": {
"domain": "Required field"
},
"data": {
"domain": "/^(?!-)([A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,15}$/"
}
}
Response fields 3
-
codeinteger -
infoobject -
dataobject
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
-
codeinteger -
infostring
429
Rate limit exceeded
{
"code": 429,
"info": "Rate limit exceeded. Please try again later."
}
Response fields 2
-
codeinteger -
infostring
500
Internal Server Error
{
"code": 500,
"info": "Internal Server Error",
"data": "Error message"
}
Response fields 3
-
codeinteger -
infostring -
datastring
502
Bad Gateway
{
"code": 502,
"info": "Invalid response from upstream server",
"data": []
}
Response fields 3
-
codeinteger -
infostring -
dataobject