Skip to main content
This action creates a new order through the API.

Method / Endpoint

POST {{API_URL}}/buy
For Hostrox, the full URL is:
POST https://client.hostrox.net/api/reseller/buy

Request parameters

NameRequiredDescription
keyYesAPI Key
typeYesProduct type. Possible values: hosting, server, software, special, sms
idYesProduct ID number
period_typeYesBilling period type. Possible values: none, year, month, week, day, hour
period_durationYesLength of the billing period
optionsOptionalArray of additional values (e.g. domain, hostname, nameserver, password, IP) if the order requires them

Example cURL request

curl --location 'https://client.hostrox.net/api/reseller/buy' \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "UzZBSlBWeWk0UEcrVWxlU0RjS1B1dz09",
    "type": "hosting",
    "id": 33,
    "period_type": "month",
    "period_duration": 1,
    "options": {
      "domain": "example123.com"
    }
  }'

Example JSON response

{
  "status": "successful",
  "invoice_id": 3,
  "order_id": 3,
  "fee": "14.0000",
  "fee_formatted": "$14"
}

Response fields

The fee is deducted from your reseller balance. Use Check Balance to make sure you have enough credit before placing the order.