Order servers
Overview
Orders 1 to 10 servers from a quote. Send quote_token, quantity, a hostnames list (or hostname for one server), an optional labels list, and the operating system (template_uuid) or an app (marketplace_app), any SSH keys or setup script, and the root password as account_password. Instead of an operating system or an app, you may send iso with the ID of a finished image from your ISO library: the server is built with an empty disk and starts from the image, so you install the system yourself over the console, and the order takes no SSH keys, setup script or root password. Or send backup with the ID of a finished backup of one of your servers: the new server is built and that backup restored onto it, bringing the server's system, files, keys and passwords, so the order takes no SSH keys, setup script or root password. The plan's disk must be at least the size of the disk the backup was taken from, the plan may not have a second disk, and the location must be one the backup can be restored in. A restore copies the whole disk, so it can take a while for a large backup. An app may ask for settings of its own: send them in app_variables, keyed by the name of each app variable that has an input. For an app with uses_domain, an order for one server takes the domain name held with the hold endpoint, and may send custom_domain, a domain that is already a CNAME for that name. Leave the password out to have one generated for each server; the account holder is emailed a link to it when the server is ready, and the link works for 72 hours. To keep the servers on different hosts, send a host group ID as host_group, or a name in host_group_name to create one; a group that already has servers must be in the location and product being ordered. Each server is built on a host with no other member when one has room, and joins the group. In a prepaid team, payment is taken from account credit. In a postpaid team (the quote's postpaid is true), nothing is charged and account credit is not checked: each server is billed by the hour on the monthly postpaid invoice, and the order is refused with 402 if it would take the monthly recurring cost past its limit. Returns the purchase with one order per server. Poll the orders for their status and server ID.
Permissions
Requires the billing.purchase (Make purchases) permission for the selected team. Resources outside that team return 404.
Authorization
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>.
Body
application/jsonThe value of quote_token.
At most 20000 characters
The value of quantity.
1 to 10
The fully qualified hostname.
At most 191 characters
The value of hostnames.
Exactly 1 items
The value of labels.
Exactly 1 items
A short label shown to customers.
At most 191 characters
The template uuid UUID.
The value of marketplace_app.
Exactly 36 characters
The value of iso.
Exactly 36 characters
The value of backup.
Exactly 36 characters
The value of app_variables.
At most 50 items
The value of custom_domain.
At most 253 characters
The value of account_password.
5 to 191 characters
The value of ssh_keys.
At most 25 items
The value of user_script.
Exactly 36 characters
The value of host_group.
The value of host_group_name.
Response 201
application/jsonThe record, as a JSON object. There is no envelope.
The uuid UUID.
The value of status.
One of: pending, needs_funds, paid, refused, expired, cancelled
The value of status_label.
The value of progress_message.
The whole purchase, as a decimal string in currency.
The three-letter currency code used for monetary amounts.
The value of quantity.
The value of orders.
Show child attributesHide child attributes
The uuid UUID.
The value of uuid_short.
The checkout this machine was bought in, shared with every other machine ordered at the same time.
The purchase status, or null for an order without a purchase record.
One of: pending, needs_funds, paid, refused, expired, cancelled, null
The value of status.
One of: pending_payment, provisioning, configuring, completed, expired, payment_review, failed, cancelled
The value of status_label.
Whether the billing system has taken and been paid for this order, which is what separates "still placing" from "being built".
The value of progress_message.
The value of plan_name.
The value of plan_key.
The value of vcpu_cores.
The value of memory.
The value of disk.
The value of bandwidth.
The value of hdd.
The value of location.
The location id ID.
The value of group_name.
The fully qualified hostname.
A short label shown to customers.
The value of template_name.
The value of template_icon_url.
The value of billing.
Show child attributesHide child attributes
The customer's service number, once a recurring service exists.
The customer's invoice number, once an invoice exists.
A complete URL where the invoice can be paid.
The checkout UUID, or null when no checkout is available.
The value of checkout_uuid_short.
The current invoice status, or null before an invoice exists.
The amount in the currency shown by currency.
The three-letter currency code used for amount.
How often the service renews, or null for a one-time charge.
When payment is due before the reservation is released.
How many minutes the original payment window allowed.
When the charge was paid, or null while payment is outstanding.
The installed server's short ID, or null until installation finishes.
Whether the customer can cancel.
The date and time for created at, in UTC.
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.
- 422
- A field is missing or invalid, or the resource cannot accept this change in its current state. Check
messagefor details. Field validation also includes anerrorsobject keyed by field name. - 429
- Too many requests. The
Retry-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown