Loading...

Knowledge Base

Add a VPS Linux KVM Order Using the API

When you want to place a VPS Linux KVM order using the API. This article explains VPS plan parameters, operating system options, add-ons, billing settings, and API request details for order creation.

 

Description

Places a VPS Linux KVM Order for the specified domain name.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
domain-nameStringRequiredThe domain name for which the Order is to be placed
customer-idIntegerRequiredCustomer ID of the Customer under whom the Order should be added
monthsIntegerRequiredThe number of months for which the Order is to be placed
plan-idIntegerRequiredThe plan under which the Order should be added. To fetch the plan details i.e., plan-id etc., use this method.
osStringOptionalThe OS required for the VPS. Values can be:
  • For SSD-based plans & NVMe-based plans include (cPanel optional)

    • alma_9  
    • alma_8  
    • rocky_9
    • rocky_8
    • ubuntu_20
    • ubuntu_22
  • For HDD-based plans (cPanel included):

    • Not Required

Note

If this parameter is not mentioned, alma_8 will be provisioned by default.

addonArray of StringsOptionalAdditional Add-ons to be purchased. Values can be:
  • For SSD-based plans (cPanel optional):

    • cpanel (only with Alma8, Alma9, Rocky8, Rocky9)
    • plesk_10_domain (only with Ubuntu,Rocky8,Alma8)
    • plesk_30_domain (only with Ubuntu,Rocky8,Alma8)
    • plesk_unlimited_domain (only with Ubuntu,Rocky8,Alma8)
    • ipaddress
    • whmcs
  • For SSD-based plans (cPanel included):

    • ipaddress
    • whmcs
  • For HDD-based plans (cPanel included):

    • ipaddress
    • storage_1
    • storage_2
    • storage_3
    • storage_4
    • storage_5
    • whmcs
auto-renewBooleanRequired

Enables / Disables the Auto Renewal setting for the Order

Note

Auto-Renewal

invoice-optionStringRequiredThis parameter will decide how the Customer Invoices will be handled. Values can be: NoInvoice, PayInvoice, KeepInvoice, OnlyAdd
discount-amountFloatOptionalDiscount amount for the order value.

HTTP Method

POST

Example Test URL Request

US Server https://test.httpapi.com/api/virtualserver/linux/us/add.json?auth-userid=0&api-key=key&domain-name=name&customer-id=0&months=0&plan-id=0&invoice-option=NoInvoice&discount-amount=0.00
India Server https://test.httpapi.com/api/virtualserver/linux/in/add.json?auth-userid=0&api-key=key&domain-name=name&customer-id=0&months=0&plan-id=0&invoice-option=NoInvoice&discount-amount=0.00

Response

Returns a hash map containing the below details:

  • Domain Name (description)

  • Order ID of the VPS Order (entityid)

  • Action Type (actiontype)

  • Description of the VPS Order Add Action (actiontypedesc)

  • Action ID of the VPS Order Add Action (eaqid)

  • VPS Linux KVM Order Add Action Status (actionstatus)

  • Description of the VPS Order Add Action Status (actionstatusdesc)

  • Invoice ID of the VPS Order Add Invoice (invoiceid)

  • Selling Currency of the Reseller (sellingcurrencysymbol)

  • Transaction Amount in the Selling Currency (sellingamount)

  • Unutilised Transaction Amount in the Selling Currency (unutilisedsellingamount)

  • Customer ID associated with the VPS Order (customerid)

  • Discount Amount (discount-amount)

Note

invoiceid, sellingcurrencysymbol, sellingamount, unutilisedsellingamount and customerid will not be returned if invoice-option is set to NoInvoice.

In case of any errors, a status key with value as ERROR alongwith an error message will be returned.