Skip to content

Cancel a server order

POST/servers/orders/{serverOrder}/cancel

Overview

Cancels an unpaid order. Orders that have already been paid cannot be cancelled here. The response shows the payment deadline brought forward. The order and invoice are closed in the background after a final check for incoming payments. Check the order again until its status is final. Orders belonging to another account or team return 404.

Permissions

Requires the billing.purchase (Make purchases) permission for the selected team. Resources outside that team return 404.

curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/servers/orders/{serverOrder}/cancel' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "uuid": "0e6a7712-98ab-451b-8675-5c5ae96e4d3a",
  "uuid_short": "Uuid short",
  "purchase_uuid": "a930b81e-663e-4e12-a437-001f207d5ac6",
  "purchase_status": "needs_funds",
  "status": "pending_payment",
  "status_label": "Needs funds",
  "is_placed": false,
  "progress_message": "Your balance is 2.00 USD short of the 12.00 USD this order costs. Add funds to continue.",
  "plan_name": "Standard 4 GB",
  "plan_key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
  "vcpu_cores": 4,
  "memory": 4000,
  "disk": 80,
  "bandwidth": 5000,
  "hdd": false,
  "location": "Kansas City, MO",
  "location_id": 3,
  "group_name": "Standard VPS",
  "hostname": "hev-telemetry.blackmesa.example.com",
  "label": "hev-telemetry",
  "template_name": "Ubuntu 24.04",
  "template_icon_url": "/assets/icons/ubuntu.png",
  "billing": {
    "service_id": null,
    "invoice_id": null,
    "invoice_url": null,
    "checkout_uuid": null,
    "invoice_status": null,
    "amount": "12.00",
    "currency": "USD",
    "billing_cycle": "monthly",
    "payment_due_at": "2026-09-14T17:01:47+00:00",
    "payment_window_minutes": 30,
    "paid_at": null
  },
  "server_id": null,
  "can_cancel": true,
  "created_at": "2026-09-14T16:31:47+00:00"
}

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Path parameters

serverOrderstringrequired

The server order uuid short

Response 202

application/json

The request was accepted and is being carried out in the background.

uuidstringrequired

The uuid UUID.

uuid_shortstringrequired

The value of uuid_short.

purchase_uuidstring | nullrequired

The checkout this machine was bought in, shared with every other machine ordered at the same time.

purchase_statusstring | nullrequired

The purchase status, or null for an order without a purchase record.

One of: pending, needs_funds, paid, refused, expired, cancelled, null

statusstringrequired

The value of status.

One of: pending_payment, provisioning, configuring, completed, expired, payment_review, failed, cancelled

status_labelstringrequired

The value of status_label.

is_placedbooleanrequired

Whether the billing system has taken and been paid for this order, which is what separates "still placing" from "being built".

progress_messagestring | nullrequired

The value of progress_message.

plan_namestringrequired

The value of plan_name.

plan_keystringrequired

The value of plan_key.

vcpu_coresintegerrequired

The value of vcpu_cores.

memoryintegerrequired

The value of memory.

diskintegerrequired

The value of disk.

bandwidthintegerrequired

The value of bandwidth.

hddbooleanrequired

The value of hdd.

locationstring | nullrequired

The value of location.

location_idinteger | nullrequired

The location id ID.

group_namestring | nullrequired

The value of group_name.

hostnamestringrequired

The fully qualified hostname.

labelstring | nullrequired

A short label shown to customers.

template_namestring | nullrequired

The value of template_name.

template_icon_urlstring | nullrequired

The value of template_icon_url.

billingobjectrequired

The value of billing.

Show child attributes
service_idinteger | nullrequired

The customer's service number, once a recurring service exists.

invoice_idinteger | nullrequired

The customer's invoice number, once an invoice exists.

invoice_urlstring | nullrequired

A complete URL where the invoice can be paid.

checkout_uuidstring | nullrequired

The checkout UUID, or null when no checkout is available.

checkout_uuid_shortstring | nullrequired

The value of checkout_uuid_short.

invoice_statusstring | nullrequired

The current invoice status, or null before an invoice exists.

amountstring | nullrequired

The amount in the currency shown by currency.

currencystring | nullrequired

The three-letter currency code used for amount.

billing_cyclestring | nullrequired

How often the service renews, or null for a one-time charge.

payment_due_atstring | nullrequired

When payment is due before the reservation is released.

payment_window_minutesinteger | nullrequired

How many minutes the original payment window allowed.

paid_atstring | nullrequired

When the charge was paid, or null while payment is outstanding.

server_idstring | nullrequired

The installed server's short ID, or null until installation finishes.

can_cancelbooleanrequired

Whether the customer can cancel.

created_atstring | nullrequired

The date and time for created at, in UTC.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
404
The resource was not found in the selected team. Resources in another account or team also return 404.
422
A field is missing or invalid, or the resource cannot accept this change in its current state. Check message for details. Field validation also includes an errors object keyed by field name.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.