Order a web hosting plan
curl --request POST \
--url https://my.server.express/api/v1/client/hosting/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"planId": "<string>",
"domain": "<string>",
"location": "<string>",
"couponCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
domain: '<string>',
location: '<string>',
couponCode: '<string>'
})
};
fetch('https://my.server.express/api/v1/client/hosting/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/hosting/buy"
payload = {
"planId": "<string>",
"domain": "<string>",
"location": "<string>",
"couponCode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}Web Hosting
Order a web hosting plan
Reserves a hosting plan: a PENDING service and an UNPAID invoice. The Plesk subscription is created once the invoice settles.
The domain is lowercased and a leading www. stripped; a domain already hosted with us (not terminated) is rejected with 409,
as is a full location. Unexpected failures return 500 with the underlying error message. Requires a complete billing
address (428).
POST
/
v1
/
client
/
hosting
/
buy
Order a web hosting plan
curl --request POST \
--url https://my.server.express/api/v1/client/hosting/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"planId": "<string>",
"domain": "<string>",
"location": "<string>",
"couponCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
domain: '<string>',
location: '<string>',
couponCode: '<string>'
})
};
fetch('https://my.server.express/api/v1/client/hosting/buy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/hosting/buy"
payload = {
"planId": "<string>",
"domain": "<string>",
"location": "<string>",
"couponCode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>",
"data": {
"billingDetailsRequired": true,
"missing": [
"addressLine1"
]
}
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Body
application/json