Skip to main content
POST
/
servers
Create a server order
curl --request POST \
  --url https://console.wenium.com/api/servers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "selectedTypeId": 1,
  "selectedLocationId": 2,
  "billingCycle": "monthly",
  "instanceCount": 1,
  "isCustom": false,
  "selectedSoftwareId": "ubuntu-22.04",
  "hostname": "web-server-01",
  "promoCode": "WELCOME50",
  "selectedPlanId": 4,
  "customSpec": {
    "cpu": 2,
    "ram": 2,
    "disk": 40,
    "bandwidth": 100
  },
  "addons": {
    "additional_ips": 0,
    "backups": true,
    "ipv6": false
  }
}
'
{
  "status": true,
  "message": "Order created successfully.",
  "invoice_id": 123,
  "amount": 21,
  "currency": "USD"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
selectedTypeId
integer
required
Example:

1

selectedLocationId
integer
required
Example:

2

billingCycle
enum<string>
required
Available options:
hourly,
monthly,
quarterly,
semi_annually,
yearly
Example:

"monthly"

instanceCount
integer
required
Required range: 1 <= x <= 10
Example:

1

isCustom
boolean
required
Example:

false

selectedSoftwareId
string
required
Example:

"ubuntu-22.04"

hostname
string
Example:

"web-server-01"

promoCode
string
Example:

"WELCOME50"

selectedPlanId
integer | null

Required if isCustom is false (prebuilt plan order). Nullable if ordering a custom spec server.

Example:

4

customSpec
object
addons
object

Response

200 - application/json

Order created successfully

status
boolean
Example:

true

message
string
Example:

"Order created successfully."

invoice_id
integer
Example:

123

amount
number
Example:

21

currency
string
Example:

"USD"