Order an add-on
curl --request POST \
--url https://my.server.express/api/v1/dedicated/{id}/addons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addonProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({addonProductId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 1})
};
fetch('https://my.server.express/api/v1/dedicated/{id}/addons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/dedicated/{id}/addons"
payload = {
"addonProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"addonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "GBP"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Dedicated
Order an add-on
Creates a PENDING add-on on the server and an UNPAID invoice for it, due in 7 days, billed to the service owner (not the caller). Tax follows the owner’s billing company when the add-on is taxable. Needs billing access (owner or team ADMIN). Writes an ORDER_ADDON audit entry. A 500 can carry the underlying error message.
POST
/
v1
/
dedicated
/
{id}
/
addons
Order an add-on
curl --request POST \
--url https://my.server.express/api/v1/dedicated/{id}/addons \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addonProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({addonProductId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 1})
};
fetch('https://my.server.express/api/v1/dedicated/{id}/addons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/dedicated/{id}/addons"
payload = {
"addonProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"addonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoiceNumber": "<string>",
"total": 123,
"currency": "GBP"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Path Parameters
The dedicated server's service id.
Body
application/json