Order a service


v2.{ITEMTYPE}.order.param - order function

where {ITEMTYPE} - internal name of product type

API functions:

  • v2.vhost.order.param — order a shared hosting service;
  • v2.vds.order.param —  order  aVPS;
  • v2.dedic.order.param — order a dedicated server.

Mandatory parameters:

  • authinfo or auth — authorization data  in a control panel;
  • pricelist — tariff id;
  • datacenter — data center id;
  • order_period — order period. Possible values: an integer which equals the number of months. For example, service order for 1 month — period=1, half-a-year — period=6, 1 year — period=12, etc;
  • sok — order is confirmed.

Additional parameters:

  • domain — service domain name. if this parameter is not specified, BILLmanager will set a random value; 
  • skipbasket — the  skipbasket=on  parameter indicates that the service renewal won't be added into the Cart, but the system will charge the client.
  • autoprolong — auto-renewal period. Possible values: an integer which equals the number of months;
  • ostempl — operating system template for a dedicated server or VPS;
  • recipe —  the system will execute the recipe on a dedicated server or VPS after operating system setup;
  • remoteidunique identifier of the service on the side of the reselling billing platform.

Tariff add-ons are passed via the addon_  parameter. Possible value: addon_5=10, where 5 — add-on id, 10 — value. You can find the add-on id in Tariff plansConfiguration → id field. You can activate the filed in the table settings form.

The example of an API call for a shared hosting order: 

https://billdomain.com/?authinfo=username:password&func=v2.vhost.order.param&autoprolong=1&datacenter=1&domain=domain.name&order_period=1&pricelist=2&skipbasket=on&addon_5=10&sok=ok
CODE

The example of an API call for a VPS order:

https://billdomain.com/?authinfo=username:password&func=v2.vds.order.param&addon_10=6&addon_11=256&addon_12=500&addon_13=1&addon_14=28&addon_15=0&addon_28=1&addon_7=5000&addon_9=5&autoprolong=1& ostempl=ISPsystem%5F%5FCentOS%2D7%2Damd64&order_period=1&pricelist=6&skipbasket=on&domain=vds.test&sok=ok 
XML

The example of an API call for a dedicated server order:

https://billdomain.com/?authinfo=username:password&func=v2.dedic.order.param&order_period=1&pricelist=32&datacenter=1&domain=domain.name&addon_33=1&addon_35=1&sok=ok
XML

The Dragon interface theme basket is different from the Orion basket. To have orders added to the Dragon shopping cart via the API, pass the ISP-Client:Web-interface header and add the theme=dragon parameter.

curl -H "ISP-Client: Web-interface" -F 'func=v2.vds.order.param' -F 'order_period=1' -F 'pricelist=1' -F 'sok=ok' -F 'licence_agreement=on' -F 'theme=dragon' -F 'authinfo=login:password' -k https://billdomain.com/billmgr
CODE
https://billdomain.com/billmgr?func=v2.vhost.order.param&period=1&pricelist=2&sok=ok&licence_agreement=on&clicked_button=finish&theme=dragon&ISP-Client:Web-interface
CODE

Service renewal


Extension services

The service renewal function:

  • service.prolong

Mandatory parameter

  • authinfo or auth — authorization data in a control panel;
  • elid — service id;
  • period — order period. Possible values: an integer which equals the number of months. For example, service order for 1 month — period=1, half-a-year — period=6, 1 year — period=12, etc; 
  • sok — operation confirmation.

Optional parameters:

  • skipbasket — the  ''skipbasket=on'' parameter indicates that the system won't add the service renewal order into the Cart, but will charge the client.

The example of API call for a service renewal:

https://billdomain.com/?authinfo=username:password&func=service.prolong&period=1&elid=958&skipbasket=on&sok=ok
XML

Auto-renew services

API function:

  • vds.edit — change the parameters of the virtual server;
  • dedic.edit — change dedicated server parameters;
  • vhost.edit — change virtual hosting parameters;
  • soft.edit — change license parameters;
  • platform.edit — change platform parameters, etc.

Parameters:

  • autoprolong — parameter for autoprolong, specify period;
  • elid — unique identifier (service id).

Parameter autoprolong is responsible for autoprolong.

Its possible values are:

  • autoprolong=X — when ordering a license, autoprolong will be set for X months;
  • autoprolong=12 — autoprolong for a year;
  • autoprolong=null — no autoprolonging.

A different function is used for each product type. In the example we have set the autoprolong for a month for the product type Licenses (soft.edit function). For auto-renewal of other product types you need to use appropriate function:

Example of a request for auto-renewal of the service for a month

https://billdomain.com/billmgr?func=soft.edit&autoprolong=1&elid=777&sok=ok
CODE

Output the list of client services


List of active services

API functions:

  • vds — virtual server;
  • dedic — dedicated server;
  • vhost — virtual hosting;
  • soft — licenses;
  • platform — platform, etc.

Parameters:

  • filter=on — setting filter by specified parameters
  • out=<format> — output format
  • status=2 — output only active services
  • account — client's name. It is necessary to add all text from the Name field. The query will not work correctly if the data do not correspond to the ones, specified in the field. For example, value "account=Primerovich (example@example.ru)".

Information about active services by product type for the selected client.

Example API call to display active dedicated client servers

https://billdomain.com/billmgr?func=dedic&filter=on&account=<name>&out=json&status=2
CODE

The query will not work correctly if the data does not match the ones specified in the field. For example, the value "account=Primerovich (example@example.ru)".

List of services by product type

API function:

  • vds — virtual server;
  • dedic — dedicated server;
  • vhost — virtual hosting;
  • soft — licenses;
  • platform — platform, etc.

Parameters:

  • out=<format> — output format

Information about services by product type for the selected client.

https://billdomain.com/billmgr?func=dedic&clickstat=yes&out=xml
CODE

Edit service parameters


API functions:

  • vhost.edit — edit shared hosting parameters;
  • vds.edit — edit VPS parameters;
  • dedic.edit — edit dedicated server parameters.

Mandatory parameters:

  • authinfo or auth — authorization data in a control panel;
  • elid — service id;
  • sok — operation confirmation

Optional parameters :

  • addon_ — tariff add-on that should be edited, for example, addon_11=512, where 11 — add-on id, 512 — value. You can find the add-on id in Tariff plansConfiguration → id field. You can activate the filed in the table settings form;
  • autoprolong — auto-renewal period. Possible values: an integer which equals the number of months;
  • skipbasket — the skipbasket=on parameter indicates that the add-on won't be added into the Cart, but the system will charge the client.

More parameters are available in the Admin panel:

  • domain — service domain name;
  • ip — service IP address;
  • username — username in a control panel (e.g. in VMmanager);
  • userpassword — user password in a control panel (e.g. in VMmanager);
  • serverid — server name in a control panel (e.g. in VMmanager);
  • ostempl — OS template for a VPS or dedicated server;
  • recipe — pre-installed software (recipe) for a VPS or dedicated server;

The example of API call to modify parameters of a  shared hosting service :

https://billdomain.com/?authinfo=username:password&func=vhost.edit&addon_34=1024&elid=945&skipbasket=on&sok=ok
XML

The example of API call to modify parameters of a virtual private server:

https://billdomain.com/?authinfo=username:password&func=vds.edit&addon_11=512&elid=958&skipbasket=on&sok=ok
XML

The example of API call to modify the domain name, IP address, and user credentials in a control panel for a  VPS:

https://billdomain.com/?authinfo=admin:password&func=vds.edit&username=user134&userpassword=jYh4nsqe&domain=company.com&ip=8.8.8.8&elid=958&skipbasket=on&sok=ok
XML

The example of API call to modify parameters of a dedicated server:

https://billdomain.com/?authinfo=username:password&func=dedic.edit&addon_26=10&addon_26=10&addon_28=5000&elid=1065&skipbasket=on&sok=ok
XML

Delete a service


API functions:

  • vhost.delete — delete a shared hosting service;
  • vds.delete —  delete a VPS;
  • dedic.delete — delete a dedicated server.

Mandatory parameters:

  • authinfo or auth — authorization data in a control panel;
  • elid — service id;
  • sok — operation confirmation

The example of API call for VPS order:

https://billdomain.com/?authinfo=username:password&func=vds.delete&elid=938&sok=ok
XML

The example of API call for shared hosting order:

https://billdomain.com/?authinfo=username:password&func=vhost.delete&elid=1085&sok=ok
XML

The example of API call for dedicated server order:

https://billdomain.com/?authinfo=username:password&func=dedic.delete&elid=892&sok=ok
XML

Creation of statistical expenditures


service.statdaily — responsible for creating statdaily expenses according to the tariff settings.

Parameters:

  • item — service ID in BILLmanager
  • statdate — date for which the calculation should be made. The format is yyyy-mm-dd
  • force — specify the on value to create an expense if the calculation has already been made for the specified date. Sending a request for the date on which statistical expensesere calculated without force=on will return an error

Example

/usr/local/mgr5/sbin/mgrctl -m billmgr service.statdaily item=5 statdate=2023-12-31 force=on
CODE