Product/Service API
The Product/Service API allows you to perform service related actions like create, suspend, unsuspend or terminate a service, as well as fetch service plan and Cloud Linux VPS details.
Create Service
This functionality allows you to create a new service for a customer.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/service/create
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
customer_id | Integer | Required | customer’s id | 652 |
quantity | Integer | Required | number of licences | 1 |
slserverid | Integer | Optional | subscription id | 618e16ad6764 |
serverid | Integer | Optional | server id | 0 |
planid | Integer | Required | product plan id | 172 |
regdate | Date | Required | registration date of service | 23/07/2019 |
amount | Double | Required | recurring amount | 528.14 |
recuring_amount | Double | Required | service purchase amount | 528.14 |
nextduedate | Date | Required | next due date of service | 23/07/2020 |
billingcycle | Char | Required | Billing cycle of service | Annually |
first_plan_price | Double | Required | first plan price | 528.14 |
recuring_plan_price | Double | Required | recurring plan price | 528.14 |
plan_billing_cycle | Char | Required | plan billing cycle | Annually |
firstpayment | Double | Required | first payment amount | 528.14 |
pid | Integer | Optional | partner id | 0 |
For main venture, “partner id“ will be 0.
Listed below are the possible values of billing cycle:
Free
Free Trial
One Time
Hourly
Monthly
Quarterly
Semi-Annually
Annually
Biennially
Triennially
Quadrennial
Quinquennial
Decennial
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[status] => Success
[message] => Service ID: 1334 - Office 365 ( Essential Suite ) service has been created successfully.
) |
In case of any error, an error code key with value along with an error message will be returned.
Suspend Service
This functionality allows you to suspend a service for a customer.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/service/suspend
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
serviceid | Integer | Required | service id | 1287 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[status] => Success
[message] => Service has been suspended successfully.
) |
Unsuspend Service
This functionality allows you to unsuspend a service for a customer.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/service/unsuspend
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
serviceid | Integer | Required | service id | 1287 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Array
(
[status] => Success
[message] => Service has been unuspended successfully.
) |
Terminate Service
This functionality allows you to terminate a service for a customer.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/service/terminate
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
serviceid | Integer | Required | service id | 1287 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Get Plan Detail
This functionality allows you to fetch service plan details.
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/service/planDetail
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
planid | Integer | Required | service plan id | 24 |
currency | Integer | Required | currency id | 1 |
pid | Integer | Optional | partner id | 0 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )
Get Cloud Linux VPS Details
This functionality allows you to fetch cloud details on basis of platform i.e. "Linux" or "Windows".
HTTP Method
POST
Request URL
https://yourdomain.com/api/v2/service/cloud_linux_vps_details
Token
Token is required as an authentication parameter to get response from an API. Detailed Information about Tokens has been provided in the Authentication API Doc.
Request Headers
cache-control: no-cache, Validate: Bearer <Token> |
Parameters
Name | Data Type | Required/Optional | Description | Example |
planid | Integer | Required | service plan id | 24 |
platform | Varchar | Required | service platform | Linux , Windows |
currency_id | Integer | Required | currency id | 1 |
partner_id | Integer | Optional | partner id | 0 |
Response
Returns a JSON response with details as shown below:
( Below displayed response is after decoding JSON )