Order a cloud server
curl --request POST \
--url https://my.server.express/api/v1/reseller/orders/cloud \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"planId": "<string>",
"hostname": "<string>",
"location": "<string>",
"os": "<string>",
"app": "<string>",
"appInputs": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
hostname: '<string>',
location: '<string>',
os: '<string>',
app: '<string>',
appInputs: {}
})
};
fetch('https://my.server.express/api/v1/reseller/orders/cloud', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/reseller/orders/cloud"
payload = {
"planId": "<string>",
"hostname": "<string>",
"location": "<string>",
"os": "<string>",
"app": "<string>",
"appInputs": {}
}
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",
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"subtotal": 123,
"total": 123,
"currency": "<string>"
},
"price": {
"list": 123,
"net": 123,
"discountBps": 123
},
"fulfilment": {
"instant": true,
"provisional": true,
"leadTime": "<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": [
"<string>"
]
}
}{
"success": false,
"error": "<string>"
}Reseller
Order a cloud server
Places a real order: a PENDING service and an unpaid invoice at this account’s reseller rate. The VM is cloned once the invoice settles. Same code path as the panel. 428 when the account’s billing details are incomplete; 403 for a restricted billing country.
POST
/
v1
/
reseller
/
orders
/
cloud
Order a cloud server
curl --request POST \
--url https://my.server.express/api/v1/reseller/orders/cloud \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"planId": "<string>",
"hostname": "<string>",
"location": "<string>",
"os": "<string>",
"app": "<string>",
"appInputs": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
hostname: '<string>',
location: '<string>',
os: '<string>',
app: '<string>',
appInputs: {}
})
};
fetch('https://my.server.express/api/v1/reseller/orders/cloud', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/reseller/orders/cloud"
payload = {
"planId": "<string>",
"hostname": "<string>",
"location": "<string>",
"os": "<string>",
"app": "<string>",
"appInputs": {}
}
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",
"invoice": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "<string>",
"subtotal": 123,
"total": 123,
"currency": "<string>"
},
"price": {
"list": 123,
"net": 123,
"discountBps": 123
},
"fulfilment": {
"instant": true,
"provisional": true,
"leadTime": "<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": [
"<string>"
]
}
}{
"success": false,
"error": "<string>"
}Authorizations
bearerAuthapiToken
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Body
application/json