Order a dedicated server plan
curl --request POST \
--url https://my.server.express/api/v1/client/dedicated/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"planSlug": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": [
"<string>"
],
"sshKeyIds": [
"<string>"
],
"couponCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planSlug: '<string>',
hostname: '<string>',
profileId: 123,
rootPassword: '<string>',
sshKeys: ['<string>'],
sshKeyIds: ['<string>'],
couponCode: '<string>'
})
};
fetch('https://my.server.express/api/v1/client/dedicated/order', 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/dedicated/order"
payload = {
"planSlug": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": ["<string>"],
"sshKeyIds": ["<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>",
"instant": true,
"provisional": true,
"leadTime": "<string>",
"heldUntil": "2023-11-07T05:31:56Z"
}
}{
"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>"
}Dedicated
Order a dedicated server plan
Orders a plan rather than a specific machine. A unit is picked from the plan’s pool and held; the invoice is due when the
hold ends, after which the unpaid order is cancelled. If nothing is racked, a build-to-order slot is reserved instead
(provisional: true, with the plan’s lead time). Pasted sshKeys and saved sshKeyIds are merged, each key once.
Returns 409 when the plan sold out. Requires a complete billing address (428).
POST
/
v1
/
client
/
dedicated
/
order
Order a dedicated server plan
curl --request POST \
--url https://my.server.express/api/v1/client/dedicated/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"planSlug": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": [
"<string>"
],
"sshKeyIds": [
"<string>"
],
"couponCode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planSlug: '<string>',
hostname: '<string>',
profileId: 123,
rootPassword: '<string>',
sshKeys: ['<string>'],
sshKeyIds: ['<string>'],
couponCode: '<string>'
})
};
fetch('https://my.server.express/api/v1/client/dedicated/order', 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/dedicated/order"
payload = {
"planSlug": "<string>",
"hostname": "<string>",
"profileId": 123,
"rootPassword": "<string>",
"sshKeys": ["<string>"],
"sshKeyIds": ["<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>",
"instant": true,
"provisional": true,
"leadTime": "<string>",
"heldUntil": "2023-11-07T05:31:56Z"
}
}{
"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
Case-insensitive.
Minimum string length:
1Install profile id, from GET /v1/client/dedicated/profiles?planSlug=….
Pasted public keys.
Ids of SSH keys saved on the account. A key that isn't yours fails the order with 400.