You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-9Lines changed: 35 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,13 @@ Prices in catalog items is displayed as cents (without floating point), e.g: flo
136
136
137
137
This endpoint creates a new service order.
138
138
139
+
**DEPRECATED**
140
+
141
+
To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.
142
+
143
+
To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.
144
+
145
+
139
146
To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
140
147
Coupons also can be provided during order creation.
141
148
@@ -412,7 +419,9 @@ This endpoint retrieves a list of all domains associated with your account.
412
419
413
420
### domains_purchaseNewDomainV1
414
421
415
-
This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to hPanel and check the domain registration status.
422
+
This endpoint allows you to buy (purchase) and register a new domain name.
423
+
424
+
If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status.
416
425
417
426
If no payment method is provided, your default payment method will be used automatically.
418
427
@@ -428,7 +437,7 @@ Some TLDs require `additional_details` to be provided and these will be validate
428
437
429
438
-`domain`: Domain name (required)
430
439
-`item_id`: Catalog price item ID (required)
431
-
-`payment_method_id`: Payment method ID
440
+
-`payment_method_id`: Payment method ID, default will be used if not provided
432
441
-`domain_contacts`: Domain contact information
433
442
-`additional_details`: Additional registration data, possible values depends on TLD
434
443
-`coupons`: Discount coupon codes
@@ -939,6 +948,24 @@ This endpoint retrieves a list of all available virtual machines.
939
948
940
949
941
950
951
+
### VPS_purchaseNewVirtualMachineV1
952
+
953
+
This endpoint allows you to buy (purchase) and setup a new virtual machine.
954
+
955
+
If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.
956
+
957
+
If no payment method is provided, your default payment method will be used automatically.
958
+
959
+
-**Method**: `POST`
960
+
-**Path**: `/api/vps/v1/virtual-machines`
961
+
962
+
**Parameters**:
963
+
964
+
-`item_id`: Catalog price item ID (required)
965
+
-`payment_method_id`: Payment method ID, default will be used if not provided
966
+
-`setup`: setup parameter (required)
967
+
-`coupons`: Discount coupon codes
968
+
942
969
### VPS_getScanMetricsV1
943
970
944
971
This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.
@@ -995,8 +1022,8 @@ It includes the following metrics:
995
1022
**Parameters**:
996
1023
997
1024
-`virtualMachineId`: Virtual Machine ID (required)
998
-
-`date_from`: the date-time notation as defined by RFC 3339, section 5.6 (required)
999
-
-`date_to`: the date-time notation as defined by RFC 3339, section 5.6 (required)
1025
+
-`date_from`: date_from parameter (required)
1026
+
-`date_to`: date_to parameter (required)
1000
1027
1001
1028
### VPS_setNameserversV1
1002
1029
@@ -1133,8 +1160,7 @@ Requirements for the password is the same as in the [recreate virtual machine en
1133
1160
1134
1161
### VPS_setupNewVirtualMachineV1
1135
1162
1136
-
This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state.
1137
-
New virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint.
1163
+
This endpoint will setup newly purchased virtual machine with `initial` state.
Copy file name to clipboardExpand all lines: server.js
+53-13Lines changed: 53 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ const TOOLS = [
48
48
},
49
49
{
50
50
"name": "billing_createNewServiceOrderV1",
51
-
"description": "This endpoint creates a new service order. \n\nTo place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.\nCoupons also can be provided during order creation.\n\nOrders created using this endpoint will be set for automatic renewal.\n\nSome `credit_card` payments might need additional verification, rendering purchase unprocessed.\nWe recommend use other payment methods than `credit_card` if you encounter this issue.",
51
+
"description": "This endpoint creates a new service order. \n\n**DEPRECATED**\n\nTo purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.\n\nTo purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.\n\n\nTo place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.\nCoupons also can be provided during order creation.\n\nOrders created using this endpoint will be set for automatic renewal.\n\nSome `credit_card` payments might need additional verification, rendering purchase unprocessed.\nWe recommend use other payment methods than `credit_card` if you encounter this issue.",
52
52
"method": "POST",
53
53
"path": "/api/billing/v1/orders",
54
54
"inputSchema": {
@@ -739,7 +739,7 @@ const TOOLS = [
739
739
},
740
740
{
741
741
"name": "domains_purchaseNewDomainV1",
742
-
"description": "This endpoint allows you to buy (purchase) and register a new domain name. If registration fails, login to hPanel and check the domain registration status.\n\nIf no payment method is provided, your default payment method will be used automatically.\n\nIf no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. \nBefore making a request, ensure that WHOIS information for the desired TLD exists in your account.\n\nSome TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.",
742
+
"description": "This endpoint allows you to buy (purchase) and register a new domain name. \n\nIf registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check the domain registration status.\n\nIf no payment method is provided, your default payment method will be used automatically.\n\nIf no WHOIS information is provided, the default contact information for that TLD (Top-Level Domain) will be used. \nBefore making a request, ensure that WHOIS information for the desired TLD exists in your account.\n\nSome TLDs require `additional_details` to be provided and these will be validated before completing the purchase. The required additional details vary by TLD.",
743
743
"method": "POST",
744
744
"path": "/api/domains/v1/portfolio",
745
745
"inputSchema": {
@@ -755,7 +755,7 @@ const TOOLS = [
755
755
},
756
756
"payment_method_id": {
757
757
"type": "integer",
758
-
"description": "Payment method ID"
758
+
"description": "Payment method ID, default will be used if not provided"
759
759
},
760
760
"domain_contacts": {
761
761
"type": "object",
@@ -1902,6 +1902,46 @@ const TOOLS = [
1902
1902
}
1903
1903
]
1904
1904
},
1905
+
{
1906
+
"name": "VPS_purchaseNewVirtualMachineV1",
1907
+
"description": "This endpoint allows you to buy (purchase) and setup a new virtual machine.\n\nIf virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.\n\nIf no payment method is provided, your default payment method will be used automatically. ",
1908
+
"method": "POST",
1909
+
"path": "/api/vps/v1/virtual-machines",
1910
+
"inputSchema": {
1911
+
"type": "object",
1912
+
"properties": {
1913
+
"item_id": {
1914
+
"type": "string",
1915
+
"description": "Catalog price item ID"
1916
+
},
1917
+
"payment_method_id": {
1918
+
"type": "integer",
1919
+
"description": "Payment method ID, default will be used if not provided"
1920
+
},
1921
+
"setup": {
1922
+
"type": "string",
1923
+
"description": "setup parameter"
1924
+
},
1925
+
"coupons": {
1926
+
"type": "array",
1927
+
"description": "Discount coupon codes",
1928
+
"items": {
1929
+
"type": "string",
1930
+
"description": "coupons parameter"
1931
+
}
1932
+
}
1933
+
},
1934
+
"required": [
1935
+
"item_id",
1936
+
"setup"
1937
+
]
1938
+
},
1939
+
"security": [
1940
+
{
1941
+
"apiToken": []
1942
+
}
1943
+
]
1944
+
},
1905
1945
{
1906
1946
"name": "VPS_getScanMetricsV1",
1907
1947
"description": "This endpoint retrieves the scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.\nThe scan metrics provide detailed information about the malware scans performed by Monarx, including the number of scans, \ndetected threats, and other relevant statistics. This information is useful for monitoring the security status of the \nvirtual machine and assessing the effectiveness of the malware scanner.",
@@ -1985,11 +2025,11 @@ const TOOLS = [
1985
2025
},
1986
2026
"date_from": {
1987
2027
"type": "string",
1988
-
"description": "the date-time notation as defined by RFC 3339, section 5.6"
2028
+
"description": "date_from parameter"
1989
2029
},
1990
2030
"date_to": {
1991
2031
"type": "string",
1992
-
"description": "the date-time notation as defined by RFC 3339, section 5.6"
2032
+
"description": "date_to parameter"
1993
2033
}
1994
2034
},
1995
2035
"required": [
@@ -2250,7 +2290,7 @@ const TOOLS = [
2250
2290
},
2251
2291
{
2252
2292
"name": "VPS_setupNewVirtualMachineV1",
2253
-
"description": "This endpoint will setup newly purchased virtual machine. Such virtual machines has `initial` state. \nNew virtual machine can be purchased using [`/api/billing/v1/orders`](/#tag/billing-orders/POST/api/billing/v1/orders) endpoint. ",
2293
+
"description": "This endpoint will setup newly purchased virtual machine with `initial` state. ",
0 commit comments