Welcome to the ICDSoft API documentation.
The ICDSoft API allows you to retrieve data for your services and clients. It also allows you to place orders from your own CRM system or application using POST/GET/JSON requests.
The API documentation will start with information about authenticating to the API and the request/response format. It is followed by reference information about specific endpoints.
The API address is: https://api.suresupport.com
# Simple API_TOKEN example
curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
# HMAC Example
curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN",
"nonce": "43b3d51ad97d7906bdd79771cd0df012",
"ts": "1580468086",
"signature": "ef1498910eaf5a5ad51247c0c841ef076aa72a8b88489064eccd0f132add3fb7"
}'
There are two ways to authenticate to the ICDSoft API. The first option is to use a store API authentication key. It allows you to work with that store only.
The second one is to use your reseller account API authentication key. It allows you to work with all stores you have created.
For increased security, the API supports HMAC authentication with an additional HMAC secret key.
You can enable and configure the API access for your stores using the Online Stores -> Management section of the reseller Account Panel.
If you need a global API key for your reseller account, you can enable and configure it using the My Accounts -> API Settings section of the reseller Account Panel.
The API key can be passed as part of the payload as parameter auth_token or as an X-Auth-Token HTTP header.
The HMAC signature can also be passed as an X-Auth-Signature HTTP header instead of passing signature as a payload parameter. The rest of the HMAC payload parameters (nonce and ts) need to be in the payload.
The PHP example shows how to generate the nonce, ts, and signature parameters.
<?php
define('HMAC_SECRET', 'API_HMAC_SECRET');
define('API_TOKEN', 'API_TOKEN');
$cmd = "account-list";
// payload params
$params = [];
// Add HMAC signature fields to the request payload
$params['auth_token'] = API_TOKEN;
$params = hmac_sign($cmd, $params);
function hmac_sign($cmd, $params) {
$params['nonce'] = md5(rand());
$params['ts'] = time();
$params['signature'] = hash_hmac('sha256', $cmd . '?' . http_build_query($params), HMAC_SECRET);
return $params;
}
# GET Example
curl -X GET 'https://api.suresupport.com/account-list?auth_token=API_TOKEN' -k -g
# POST example
curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
.....
},
"messages": []
}
The API can be accessed with GET or POST HTTP methods. When using POST, you can send the request payload as JSON (application/json), application/x-www-form-urlencoded, or multipart/form-data.
In the following documentation, all examples are provided by using POST with a request payload in JSON format.
The API responses are in JSON format. The response structure has the following properties:
Property | Description |
---|---|
ttl | Time to live for caching purposes. Can be used by remote systems to decide how long to keep the returned data before requesting a fresh set. |
status | Shows if the operation was successful. True on success, false on error. |
data | The requested data. |
messages | Contains error, success or warning messages as a result of the operation. |
curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"filter": {
"username": "test"
},
"limit": "100",
"page": "2",
"with": [
"resources"
],
"order_by": {
"account_id": "asc"
},
"auth_token": "API_TOKEN"
}'
# Example with a custom filter condition
curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"filter": {
"username:like%": "test"
},
"limit": "100",
"page": "2",
"with": [
"resources"
],
"order_by": {
"account_id": "asc"
},
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"account_id": "asc"
},
"limit": 100,
"page": 2,
"count": "1",
"pages": 1,
"data": [
..........................
]
},
"messages": []
}
Parameter | Type | Description | Example |
---|---|---|---|
auth_token | String | Required | auth_token=API_TOKEN |
nonce | String | Optional, see Authentication | nonce=43b3d51ad97d7906bdd79771cd0df012 |
ts | Integer | Optional, Timestamp, see Authentication | ts=1580468086 |
signature | String | Optional, HMAC signature, see Authentication | signature=ef1498910eaf5a5ad51247c0c841ef076aa72a8b88489064eccd0f132add3fb7 |
Parameter | Type | Description | Example |
---|---|---|---|
tz | String | Optional, Timezone, Default UTC | tz=Asia/Singapore |
user_ip | String | Optional, used to track users interacting with an app or an interface using the API | user_ip=1.2.3.4 |
All object List endpoints use a common set of request and response parameters designed to filter, sort and limit the number of results returned.
Parameter | Type | Description | Example |
---|---|---|---|
filter | Array | Optional, set of filter criteria | filter=['username'=>'exampleuser','hostname'=>'example.com'] |
limit | Integer | Optional, number of items to return in the result set, default 25 | limit=1 |
page | Integer | Optional, page number from the result set, default 1 | page=1 |
order_by | Array | Optional, set of properties to sort the result set | order_by=['username'=>'asc'] |
with | Array | Optional, set of relations to include in the result set | with=['resources'] |
Parameter | Type | Description |
---|---|---|
order_by | Array | Shows the order_by parameter passed with the request or the default sort order of the command |
limit | Integer | Shows the limit parameter passed with the request or the default limit of the command |
page | Integer | Shows the current page of the result set |
count | Integer | Shows the total number of objects in the result set |
pages | Integer | Shows the total number of pages in the result set based on the limit parameter passed with the request |
The filter parameter can be used to filter the results returned by a List command based on one or more criteria. It can be used with any property of the returned objects in the result set, except for the relations. The equal (=) and not equal (!) filter conditions are available for all properties. For some List commands, additional filter options are available such as 'like%' (wildcard), greater/less than (>/<) ! (not), range, daterange. These are explicitly listed in the corresponding List command documentation. To use a custom filter condition, the property that shoud be filtered upon is passed as a concatenated string with the custom condition. For example, if one wants to search for a hosting account with a username that starts with "test", the filter property should be defined as username:like% (see the example). The template for custom condition is in the form of property_key:filter_condtion.
The order_by parameter can be used to sort the results based on one or more properites. It can be used with any property of the returned objects, except for the relations. Order_by accepts two methods: asc (sort ascending) and desc (sort descending)
Relations are a way to retrieve a given object from the API along with related objects in a single call, without making additional API calls. For every object in this API a set of relations, if available, is described in the relevant documenation section. For example, see the hosting account object relations.
curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"account_id": "desc"
},
"limit": 25,
"page": 1,
"count": "1",
"pages": 1,
"data": [
{
"account_id": "81314",
"resource_id": "139951",
"username": "test2020",
"server": "s801.sureserver.com",
"datacenter": "centurylink",
"hostname": "example.org",
"billing_status": "active",
"service_status": "running",
"start_date": "2019-10-24 10:12:14",
"end_date": "2021-10-10 05:00:00",
"days_to_expire": "617",
"main_domain_end_date": null,
"plan": "economy",
"storage_used": "0.00",
"traffic_used": "0.00",
"inodes_used": "0",
"cpu_limit_used": "0.00",
"mysql_limit_used": "0.00",
"ssl_status": "0",
"periodicity": "YR",
"product_id": "1",
"plan_name": "Economy",
"store_name": "Example Store",
"store_id": "6",
"resold": "1",
"client_reseller_id": "74898",
"parent_id": null
}
]
},
"messages": []
}
Command endpoint: /account-list
Get a list of hosting accounts.
Parameter | Type | Required | Description |
---|---|---|---|
usage_overview | Integer | no | View details about the resource usage of the returned list of hosting accounts: 0 - not active, 1 - active |
The account list can be filtered by any property in the returned result set.
The = and ! conditions are available for all properties. Additional filter conditions are available for the following properties:
Property | Condition | Type | Example |
---|---|---|---|
username | !, =, like% | String | filter[username:like%]=test |
hostname | !, =, like% | String | filter[hostname:=]=example.com |
server | !, =, like% | String | filter[server:like%]=%.sureserver.com |
end_date | !, =, >, <, >=, <=, daterange | Date | filter[end_date:daterange]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
storage_used | !, =, >, <, >=, <=, range | Float | filter[storage_used:range]=10,101.5 |
traffic_used | !, =, >, <, >=, <=, range | Float | filter[traffic_used:<=]=99999.99 |
inodes_used | !, =, >, <, >=, <=, range | Integer | filter[inodes_used:>=]=1000 |
cpu_limit_used | !, =, >, <, >=, <=, range | Float | filter[cpu_limit_used:>=]=10.00 |
mysql_limit_used | !, =, >, <, >=, <=, range | Float | filter[mysql_limit_used:<]=20.00 |
periodicity | !, = | Enum: yr|mo | filter[period_unit:=]=mo |
days_to_expire | !, =, >, <, >=, <=, range | Integer | filter[days_to_expire:<=]=30 |
main_domain_end_date | !, =, >, <, >=, <=, daterange | Date | filter[main_domain_end_date:>]=2018-05-01 |
plan | !, =, like%, %like% | String | filter[plan:like%]=multivps |
plan_name | !, =, like%, %like% | String | filter[plan:like%]=mycustomplan |
A relation can be included by adding a with parameter to the request payload.
curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"filter": {
"username:like%": "test"
},
"with": [
"resources"
],
"auth_token": "API_TOKEN"
}'
Relation | Description |
---|---|
services | A list of the available services for the selected entity. For example, for hosting accounts you can expect the following services: db, dns, ftp, mail, ssh, web. |
resources | A list of the available resources for the selected entity. For example, for hosting accounts you can expect the following resources: storage, mysql_db, traffic, domain_parking, subdomain, ftp_account, mailing_list. |
usage | Usage parameters: space and traffic. |
registered_domains | A list of the registered domain names associated with the account. |
parked_domains | A list of the domain names associated with the account (main and parked). |
ip_addresses | A list of the IP addresses purchased for the account. |
registered_certificates | A list of the certificates purchased for the account. |
installed_certificates | A list of the certificates installed at the account. |
notes | Notes entered via the reseller Account Panel for the selected entity. |
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"account_id": "desc"
},
"limit": 100,
"page": 1,
"count": "1",
"pages": 1,
"data": [
{
"account_id": "81314",
"resource_id": "139951",
"username": "test2020",
"server": "s801.sureserver.com",
"datacenter": "centurylink",
"hostname": "example.org",
"billing_status": "active",
"service_status": "running",
"start_date": "2019-10-24 10:12:14",
"end_date": "2021-10-10 05:00:00",
"days_to_expire": "617",
"main_domain_end_date": null,
"plan": "economy",
"storage_used": "0.00",
"traffic_used": "0.00",
"ssl_status": "0",
"periodicity": "YR",
"product_id": "1",
"plan_name": "Economy",
"store_name": "Example Store",
"store_id": "6",
"resold": "1",
"client_reseller_id": "74898",
"resources": [
{
"id": "680272",
"account_id": "81314",
"status": "active",
"name": "storage",
"value": "1",
"unit": "GB",
"used": "",
"extra": ""
},
{
"id": "680273",
"account_id": "81314",
"status": "active",
"name": "traffic",
"value": "500",
"unit": "GB\/MO",
"used": "",
"extra": ""
}
.........
]
}
]
},
"messages": []
}
curl -X POST 'https://api.suresupport.com/account-details' -H 'Content-Type: application/json' -k -g -d \
'{
"account_id": "81314",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"account_id": "81314",
"resource_id": "139951",
"username": "test2020",
"server": "s801.sureserver.com",
"datacenter": "centurylink",
"hostname": "example.org",
"billing_status": "active",
"service_status": "running",
"start_date": "2019-10-24 10:12:14",
"end_date": "2021-10-10 05:00:00",
"firstname": "Peter",
"lastname": "Pan",
"company": "None",
"job": "",
"address": "65 New Hosting Str.",
"address2": "House 34",
"city": "Los Angeles",
"state": "California",
"zip": "12345",
"country": "US",
"email": "info@example.org",
"email2": "",
"phone_country": "US",
"phone": "1234567890",
"fax_country": "US",
"fax": "1234567890",
"plan": "economy",
"storage_used": "0.00",
"traffic_used": "0.00",
"inodes_used": "0",
"cpu_limit_used": "0.00",
"mysql_limit_used": "0.00",
"periodicity": "YR",
"product_id": "1",
"product_sku": "economy",
"client_reseller_id": "74898",
"days_to_expire": "617",
"plan_name": "Economy",
"store_name": "Example Store",
"store_id": "6",
"main_domain_end_date": null,
"parent_id": null
},
"messages": []
}
Command endpoint: /account-details
Get the full details of a hosting account.
Parameter | Type | Required | Description |
---|---|---|---|
account_id | Integer | yes | id of the hosting account |
with | Array | optional | A list of relations to be included with the response, see the List accounts command for the available relations |
usage_overview | Integer | no | View details about the resource usage of the hosting account: 0 - not active, 1 - active |
Property | Description | Example |
---|---|---|
account_id | id of the hosting account (primary key) | 81314 |
resource_id | Resource object id | 139951 |
parent_id | Parent account Resource id (used for VPS accounts) | 123 |
username | Account username | test2020 |
server | Hosting server hostname | s801.sureserver.com |
datacenter | Datacenter sku | centurylink |
hostname | Account hostname | example.org |
billing_status | Subscription status | active |
service_status | Service status | running |
start_date | Creation date | 2019-10-24 10:12:14 |
end_date | Expiration date | 2021-10-10 05:00:00 |
firstname | Contact first name | Peter |
lastname | Contact last name | Pan |
company | Company name | None |
job | Job description | |
address | Address line 1 | 65 New Hosting Str. |
address2 | Address line 2 | House 34 |
city | City | Los Angeles |
state | State or province | California |
zip | Zip or Postal code | 12345 |
country | Country code ISO2 | US |
info@example.org | ||
email2 | Alternative e-mail | |
phone_country | Phone country ISO2 | US |
phone | Phone number | 1234567890 |
fax_country | Fax country ISO2 | US |
fax | Fax number | 1234567890 |
plan | Product sku | economy |
storage_used | Disk space usage | 2.33 |
traffic_used | Traffic usage | 5.31 |
inodes_used | Inodes usage | 5472 |
cpu_limit_used | CPU time usage | 1.23 |
mysql_limit_used | MySQL time usage | 3.21 |
periodicity | Billing periodicity | YR |
product_id | Product id | 1 |
product_sku | Product sku | economy |
client_reseller_id | Client id | 74898 |
days_to_expire | Days until expiration | 617 |
plan_name | Product name | Economy |
store_name | Store name | Example Store |
store_id | Store id | 6 |
main_domain_end_date | Expiration date of the main domain for the account | 2021-10-10 05:00:00 |
curl -X POST 'https://api.suresupport.com/account-enums' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"datacenter": {
"centurylink": "USA",
"neterra": "Europe",
"iadvantage": "Hong Kong"
},
"billing_status": {
"expiring": "expiring",
"expired": "expired",
"blocked": "blocked",
"canceled": "canceled",
"active": "active"
},
"service_status": {
"running": "running",
"limited": "limited",
"stopped": "stopped"
},
"has_ssl": {
"yes": "yes",
"no": "no"
},
"plan": {
"economy": "Economy"
},
"store_id": {
"6": "Example Store",
.........
}
},
"messages": []
}
Command endpoint: /account-enums
Lists the possible values for some of the hosting account object properties returned by the hosting accounts List command.
curl -X POST 'https://api.suresupport.com/democp-url' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": "https:\/\/cp.example.com\/login.php?myuser=democp&autologin=.........",
"messages": []
}
Command endpoint: /democp-url
Get а one-time login link for the Demo Control Panel.
curl -X POST 'https://api.suresupport.com/domain-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": [],
"limit": 25,
"page": 1,
"count": "1",
"pages": 1,
"data": [
{
"domain_id": "121475",
"domain": "example.org",
"status": "ok",
"idn": "",
"resource_id": "137114",
"start_date": "2017-12-05 05:28:33",
"end_date": "2021-12-05 05:28:33",
"days_to_expire": "422",
"product": "info",
"parent_product": "bonus:domain",
"account_id": "81314",
"park_status": "standalone"
}
]
},
"messages": []
}
Command endpoint: /domain-list
Get a list of domain names.
The domain names list can be filtered by any property in the returned resultset.
The = and ! conditions are available for all properties. Additional filter conditions are available for the following properties:
Property | Condition | Type | Example |
---|---|---|---|
domain | !, =, like% | String | filter[domain:like%]=example |
start_date | !, =, >, <, >=, <=, daterange | Date | filter[start_date:daterange]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
end_date | !, =, >, <, >=, <=, daterange | Date | filter[end_date:daterange]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
days_to_expire | !, =, >, <, >=, <=, range | Integer | filter[days_to_expire:<=]=30 |
product | !, =, like% | String | Product sku. For example, filter[product]=com will list only .com domains |
parent_product | !, =, like% | String | Parent product sku. For example, filter[parent_product]=bonus:domain will list only bonus domains |
A relation can be included by adding a with parameter to the request payload.
Relation | Description |
---|---|
services | List where the domain is hosted/parked |
account | Details for the parent hosting account of this domain |
resource | Resource details |
curl -X POST 'https://api.suresupport.com/domain-details' -H 'Content-Type: application/json' -k -g -d \
'{
"domain_id": "121475",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": "121475",
"resource_id": "137114",
"account_id": "81314",
"root_id": "139951",
"sld": "example",
"tld": "org",
"domain": "example.org",
"status": "ok",
"ns1": "ns1.sureserver.com",
"ns2": "ns2.sureserver.com",
"ns3": "",
"ns4": "",
"ns5": "",
"start_date": "2017-12-05 05:28:33",
"end_date": "2022-12-05 05:28:33",
"registrant_firstname": "SureSupport",
"registrant_lastname": "Privacy",
"registrant_company": "SureSupport Privacy Service",
"registrant_jobtitle": "",
"registrant_address": "66 High Street",
"registrant_address2": "",
"registrant_city": "Eremia",
"registrant_state": "California",
"registrant_sp_choice": "",
"registrant_zip": "12345",
"registrant_country": "US",
"registrant_email": "user@example.com",
"registrant_phone": "+1.1234567",
"registrant_fax": "+1.1234567",
"admin_firstname": "SureSupport",
"admin_lastname": "Privacy",
"admin_company": "SureSupport Privacy Service",
"admin_jobtitle": "",
"admin_address": "Eremia",
"admin_address2": "",
"admin_city": "Eremia",
"admin_state": "California",
"admin_sp_choice": "",
"admin_zip": "12345",
"admin_country": "US",
"admin_email": "user@example.com",
"admin_phone": "+1.1234567",
"admin_fax": "+1.1234567",
"tech_firstname": "SureSupport",
"tech_lastname": "Privacy",
"tech_company": "SureSupport Privacy Service",
"tech_jobtitle": "",
"tech_address": "Eremia",
"tech_address2": "",
"tech_city": "Eremia",
"tech_state": "California",
"tech_sp_choice": "",
"tech_zip": "12345",
"tech_country": "US",
"tech_email": "user@example.com",
"tech_phone": "+1.1234567",
"tech_fax": "+1.1234567",
"billing_firstname": "SureSupport",
"billing_lastname": "Privacy",
"billing_company": "SureSupport Privacy Service",
"billing_jobtitle": "",
"billing_address": "Eremia",
"billing_address2": "",
"billing_city": "Eremia",
"billing_state": "California",
"billing_sp_choice": "",
"billing_zip": "12345",
"billing_country": "US",
"billing_email": "user@example.com",
"billing_phone": "+1.1234567",
"billing_fax": "+1.1234567",
},
"messages": []
}
Command endpoint: /domain-details
Get the details of a domain. It can be called with domain_id, domain or sld & tld. For example, a domain 'test.com' with id = 1234 can be accessed by passing one of the following parameters:
Parameter | Type | Required | Description |
---|---|---|---|
domain_id | Integer | No | id of the Domain name |
domain | String | No | The full hostname of the domain. |
sld | String | No | The part of the domain before the dot. Used together with tld. |
tld | String | No | The TLD of the domain. |
with | Array | optional | A list of relations to be added to the response, see the List domains command for the available relations. |
Property | Description | Example |
---|---|---|
id | Object id | 121475 |
resource_id | Resource object id | 137114 |
account_id | Linked hosting account id | 81314 |
root_id | Root resource object id | 139951 |
sld | Second level domain | example |
tld | Top level domain | org |
domain | Full domain | example.org |
status | Status | ok |
ns1 | Nameserver | ns1.sureserver.com |
ns2 | Nameserver | ns1.sureserver.com |
ns3 | Nameserver | |
ns4 | Nameserver | |
ns5 | Nameserver | |
start_date | Domain registration | 2017-12-05 05:28:33 |
end_date | Expiration date | 2022-12-05 05:28:33 |
WHOIS Contact fields (each group is prefixed with the contact type, which can be registrant, admin, billing, tech); see the example response | ||
registrant_firstname | Registrant first name | SureSupport |
registrant_lastname | Registrant last name | Privacy |
registrant_company | Registrant company | SureSupport Privacy Service |
registrant_jobtitle | Registrant job title | |
registrant_address | Registrant address | Eremia |
registrant_address2 | Registrant address 2 | |
registrant_city | Registrant city | Eremia |
registrant_state | Registrant state or province | California |
registrant_sp_choice | State or Province? S indicates State; P indicates Province | P |
registrant_zip | Registrant zip or postal code | 12345 |
registrant_country | Registrant country ISO2 | US |
registrant_email | Registrant e-mail | user@example.com |
registrant_phone | Registrant phone with country code | +1.1234567 |
registrant_fax | Registrant fax with country code | +1.1234567 |
# Domain check
curl -X POST 'https://api.suresupport.com/domain-check' -H 'Content-Type: application/json' -k -g -d \
'{
"domain": "example.com",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"domain": "example.com",
"available": 1,
"transfer": 0,
"offered": 1,
"icann": 1,
"epp": 1,
"hosted": 0
},
"messages": []
}
Check if a domain name is available for registration. It can be called with domain or sld & tld. One of them is required.
Parameter | Type | Required | Description |
---|---|---|---|
domain | String | No | Domain name to check, e.g example.com, |
tld | String | No | TLD of the domain to check, e.g com |
sld | String | No | SLD of the domain to check, e.g example |
Property | Description |
---|---|
domain | The checked domain. |
available | 0|1 indicates if the domain is available. |
transfer | 0|1 indicates if the domain name can be transferred. |
offered | 0|1 indicates if the domain name can be purchased. |
icann | 0|1 indicates if the domain name is an ICANN-governed TLD. |
epp | 0|1 indicates if an EPP transfer is possible. |
hosted | 0|1 shows if the domain name is already hosted on our servers. |
curl -X POST 'https://api.suresupport.com/domain-tldsld' -H 'Content-Type: application/json' -k -g -d \
'{
"hostname": "example.com",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"tld": "com",
"sld": "example"
},
"messages": []
}
Command: /domain-tldsld
Get the SLD and TLD parts of a domain name.
Parameter | Type | Required | Description |
---|---|---|---|
hostname | String | Required | Hostname to parse, e.g example.com, |
Propery | Description |
---|---|
tld | Top level domain |
sld | Second level domain |
curl -X POST 'https://api.suresupport.com/certificate-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": [],
"limit": 25,
"page": 1,
"count": "7",
"pages": 1,
"data": [
{
"certificate_id": "2023",
"resource_id": "136939",
"service_id": null,
"hostname": "example.com",
"alt_name": "",
"end_date": "2021-10-04 04:24:03",
"days_to_expire": "486",
"certificate_type": "sectigo_essential",
"provider": "our",
"registration_status": "processing"
},
{
"certificate_id": "2024",
"resource_id": "136940",
"service_id": null,
"hostname": "test.example.com",
"alt_name": "test.example.com",
"end_date": "2021-10-04 11:46:30",
"days_to_expire": "485",
"certificate_type": "geotrust_rapidssl",
"provider": "our",
"registration_status": "ok"
},
........
]
},
"messages": []
}
Command endpoint: /certificate-list
Get a list of certificates.
The certificate list can be filtered by any property in the returned result set.
The = and ! conditions are available for all properties. Additional filter conditions are available for some of the following properties:
Property | Condition | Type | Example |
---|---|---|---|
hostname | !, =, %like% | String | filter[hostname:like%]=example.com |
alt_name | !, =, %like% | String | filter[altname:like%]=example |
end_date | !, =, >, <, >=, <=, daterange | Date | filter[end_date:daterange]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
days_to_expire | !, =, >, <, >=, <=, range | Integer | filter[days_to_expire:<=]=30 |
hostnames | !, =, %like% | String | Combined filter for hostname and alt_name. For example, filter[hostnames:%like%]=example.com will search for this hostname in both hostname and alt_name. Does not show in the output. |
hosted | !, = | Integer | 0 for not hosted certificates, 1 for hosted certificates. For example, filter[hosted]=1 will list only hosted certificates. Does not show in the output. |
provider | !, = | String | 'foreign' or 'our'. For example, filter[provider]=our will list only certificates registered through ICDSoft. |
account_id | !, = | Integer | List the certificates hosted on a hosting account with this account_id. |
A relation can be included by adding a with parameter to the request payload.
Relation | Description |
---|---|
services | List the service where the certificate is hosted/installed |
details | Full certificate details |
curl -X POST 'https://api.suresupport.com/certificate-details' -H 'Content-Type: application/json' -k -g -d \
'{
"certificate_id": "2023",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": "2023",
"resource_id": "136939",
"root_id": null,
"hostname": "example.com",
"alt_name": "",
"status": "processing",
"certificate_type": "sectigo_essential",
"start_date": "2017-10-04 04:24:03",
"end_date": "2021-10-04 04:24:03",
"approver_email": "admin@example.com",
"country": "CA",
"city": "Sofia",
"state": "Sofia",
"organization": "My Company",
"organization_unit": "Online Sales",
"zip": "1000",
"address": "My Address 123"
},
"messages": []
}
Command endpoint: /certificate-details
Get the details of an SSL certificate.
Parameter | Type | Required | Descritpion |
---|---|---|---|
certificate_id | Integer | yes | id of the certificate |
with | Array | optional | A list of relations to be added to the response, see the List command for the available relations |
Property | Description | Example |
---|---|---|
id | Object id | 2023 |
resource_id | Resource object id | 136939 |
root_id | Root resource object id | |
hostname | Certificate common name | example.com |
alt_name | Certificate alternative hostname | www.example.com |
status | Status | processing |
certificate_type | Product sku | sectigo_essential |
start_date | Start date | 2017-10-04 04:24:03 |
end_date | End date | 2018-10-04 04:24:03 |
approver_email | Certificate approver email | user@example.com |
country | Country ISO2 | CA |
city | City | Sofia |
state | State | Sofia |
organization | Organization name | My Company |
organization_unit | Organization unit | Online Sales |
zip | Zip or postal code | 1000 |
address | Address | 55 High Street |
curl -X POST 'https://api.suresupport.com/ssl-approver-emails' -H 'Content-Type: application/json' -k -g -d \
'{
"hostname": "example.com",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"emails": [
"postmaster@example.com",
"admin@example.com",
"administrator@example.com",
"hostmaster@example.com",
"webmaster@example.com"
]
},
"messages": []
}
Command endpoint: /ssl-approver-emails
Get a list of the possible approver e-mail addresses when ordering an SSL certificate.
Parameter | Type | Required | Descritpion |
---|---|---|---|
hostname | String | yes | Certificate common name / hostname |
Property | Description |
---|---|
emails | Array of possible approver email addresses |
Resources are an abstract object representing the billing details of a web hosting service. Every hosting service such as a Hosting account, Domain, SSL Certificate, Dedicated IP, Advanced Security, etc. has a resource object. It describes the service billing details, such as signup/expiration dates, catalog product, periodicity, owner(s), as well as relations between different services when they are purchased in a package. For example, a bonus domain registration or an SSL certificate bundled with a hosting account.
curl -X POST 'https://api.suresupport.com/resource-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"id": "desc"
},
"limit": 50,
"page": 1,
"count": "26",
"pages": 1,
"data": [
{
"id": "139953",
"parent_id": null,
"store_id": "6",
"client_reseller_id": "74898",
"catalog_id": "45",
"product_id": "2",
"periodicity": "YR",
"resource": "1",
"resource_unit": "COUNT",
"quantity": "1",
"start_date": "2019-10-24 10:19:43",
"end_date": "2020-10-24 10:19:38",
"root_id": null,
"parent_type": "",
"parent_product": "",
"display_name": "example:s801.sureserver.com:example.com",
"display_name_idn": "",
"account_id": "81316",
"product_type": "hosting",
"product": "economy",
"datacenter_id": "2",
"datacenter": "neterra"
}
.............
]
},
"messages": []
}
Command endpoint: /resource-list
Get a list of Resources.
The resource list can be filtered by any property in the returned result set.
The = and ! conditions are available for all properties. Additional filter conditions are available for the following properties:
Property | Condition | Type | Example |
---|---|---|---|
display_name | !, =, like%, %like% | String | filter[display_name:like%]=example |
start_date | !, =, <, >, =, <=, >=, daterange | Date | filter[start_date:daterange]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
end_date | !, =, <, >, =, <=, >=, daterange | Date | filter[end_date:daterange]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
A relation can be included by adding a with parameter to the request payload.
Relation | Description |
---|---|
account | Hosting account |
domain | Domain |
ip | IP Address |
certificate | SSL Certificate |
service | Advanced Service |
parent | Parent resource node |
parent_account | Hosting account linked to the parent resource node |
client | Client/Owner of the resource |
curl -X POST 'https://api.suresupport.com/resource-details' -H 'Content-Type: application/json' -k -g -d \
'{
"id": "139953",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": "139953",
"parent_id": null,
"store_id": "6",
"client_reseller_id": "74898",
"catalog_id": "45",
"product_id": "2",
"periodicity": "YR",
"resource": "1",
"resource_unit": "COUNT",
"quantity": "1",
"start_date": "2019-10-24 10:19:43",
"end_date": "2020-10-24 10:19:38",
"root_id": null,
"parent_type": "",
"parent_product": "",
"display_name": "example:s801.sureserver.com:example.com",
"display_name_idn": "",
"account_id": "81316",
"product_type": "hosting",
"product": "economy",
"datacenter_id": "2",
"datacenter": "neterra"
},
"messages": []
}
Command endpoint: /resource-details
Parameter | Type | Required | Description |
---|---|---|---|
id | Integer | yes | id of the Resource |
with | Array | optional | A list of relations to be added to the response. See the List command for the available relations. |
Property | Description | Example |
---|---|---|
id | Object id | 139953 |
parent_id | Parent Resource object id | |
store_id | Store the resource is purchased in | 6 |
client_reseller_id | Client id | 74898 |
catalog_id | Catalog id | 45 |
product_id | Product id | 2 |
periodicity | Billing period | YR |
resource | Resource value (e.g. count) | 1 |
resource_unit | Resource unit | COUNT |
quantity | Quantity | 1 |
start_date | Start date | 2019-10-24 10:19:43 |
end_date | End date | 2020-10-24 10:19:38 |
root_id | Root Resource object id | |
parent_type | Parent resource node/product type | |
parent_product | Parent resource product | |
display_name | Display name for easier keyword search. Consists of username, server name and domian name. | username:s801.sureserver.com:example.org |
display_name_idn | Display name IDN | |
account_id | Hosting account object id | 81316 |
product_type | Product type | hosting |
product | Product sku | economy |
datacenter_id | Datacenter id | 2 |
datacenter | Datacenter sku | neterra |
curl -X POST 'https://api.suresupport.com/client-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": [],
"limit": 50,
"page": 1,
"count": "1",
"pages": 1,
"data": [
{
"id": "74898",
"user": "client20169",
"status": "active",
"name": "John Doe",
"email": "john@example.com",
"organization": "",
"address": "My Address 1",
"address2": "My Address 2",
"city": "Eremia",
"state": "California",
"zip": "12345",
"country": "US",
"phone": "+1.1234567890",
"phonecode": "US",
"fax": "+1.1234567890",
"faxcode": "US",
"vendor_store_id": "6",
"vendor_reseller_id": "21",
"last_login": null
}
]
},
"messages": []
}
Command endpoint: /client-list
Get a list of the reseller clients.
The client list can be filtered by any property in the returned result set.
The = and ! conditions are available for all properties. Additional filter conditions are available for the following properties:
Property | Condition | Type | Example |
---|---|---|---|
name | !, =, like%, %like% | String | filter[name:like%]=example |
!, =, like%, %like% | String | filter[email:like%]=example | |
organization | !, =, like%, %like% | String | filter[organization:like%]=example |
A relation can be included by adding a with parameter to the request payload.
Relation | Description |
---|---|
resources | List of Resource objects belonging to this Client |
curl -X POST 'https://api.suresupport.com/client-details' -H 'Content-Type: application/json' -k -g -d \
'{
"id": "74898",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": "74898",
"user": "test20169",
"status": "active",
"name": "John Doe",
"email": "john@example.com",
"organization": "Company name",
"address": "My Address 1",
"address2": "My Address 2",
"city": "Eremia",
"state": "California",
"zip": "1234",
"country": "US",
"phone": "+1.1234567890",
"phonecode": "DE",
"fax": "+49.1234567890",
"faxcode": "DE",
"vendor_store_id": "6",
"vendor_reseller_id": "21",
"last_login": null
},
"messages": []
}
Command endpoint: /client-details
Parameter | Type | Required | Descritpion |
---|---|---|---|
id | Integer | yes | id of the Client |
with | Array | optional | A list of relations to be added to the response, see the List command for the available relations |
Property | Description | Example |
---|---|---|
id | Object id | 74898 |
user | Username for Account Panel login | test20169 |
status | Status, can be active/suspended | active |
name | Client name | John Doe |
john@example.com | ||
organization | Client company name | |
address | Address line 1 | My Address 1 |
address2 | Address line 2 | My Address 2 |
city | City | Eremia |
state | State or province | California |
zip | Zip or postal code | 12345 |
country | Country | US |
phone | Phone | +1.1234567890 |
phonecode | Phone country code ISO2 | DE |
fax | Fax | +1.1234567890 |
faxcode | Fax country code ISO2 | US |
vendor_store_id | Client store | 6 |
vendor_reseller_id | Client vendor | 21 |
last_login | Last Account panel login time |
curl -X POST 'https://api.suresupport.com/service-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": [],
"limit": 50,
"page": 1,
"count": "1",
"pages": 1,
"data": [
{
"id": "12",
"resource_id": "138679",
"type": "advanced_security",
"status": "active",
"start_date": "2019-07-22 14:50:42",
"end_date": "2021-10-10 13:00:00",
"account_id": "79923",
"account_hostname": "example.org",
"product": "advanced_security",
"client_reseller_id": "74746",
"server": "s801.sureserver.com",
"username": "example456",
"account_active": "running"
}
]
},
"messages": []
}
Command endpoint: /service-list
Get a list of advanced services, such as Advanced security.
The account list can be filtered by any property in the returned result set.
The = and ! conditions are available for all properties. Additional filter conditions are available for the following properties:
Property | Condition | Type | Example |
---|---|---|---|
account_hostname | !, =, like%, %like% | String | filter[account_hostname:like%]=example |
A relation can be included by adding a with parameter to the request payload.
Relation | Description |
---|---|
resource | Resource object |
account | Hosting acount |
service_data | Service details |
curl -X POST 'https://api.suresupport.com/service-details' -H 'Content-Type: application/json' -k -g -d \
'{
"id": "12",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": "12",
"resource_id": "138679",
"type": "advanced_security",
"status": "active",
"start_date": "2019-07-22 14:50:42",
"end_date": "2021-10-10 13:00:00",
"account_id": "79923",
"account_hostname": "example.org",
"product": "advanced_security",
"client_reseller_id": "74746",
"server": "s801.sureserver.com",
"username": "example456",
"account_active": "running"
},
"messages": []
}
Command endpoint: /service-details
Get the details of an advanced service, such as Advanced security.
Parameter | Type | Required | Descritpion |
---|---|---|---|
id | Integer | yes | id of the service |
with | Array | optional | A list of relations to be added to the response, see the List command for the available relations |
Property | Description | Example |
---|---|---|
id | Object id | 12 |
resource_id | Resource id | 138679 |
type | Service type | advanced_security |
status | Service status | active |
start_date | Service start date | 2019-07-22 14:50:42 |
end_date | Service end date | 2021-10-10 13:00:00 |
account_id | Hosting Account id | 79923 |
account_hostname | Configured hostname | example.com |
product | Product sku | advanced_security |
client_reseller_id | Client id | 74746 |
server | Hosting account server | s801.sureserver.com |
username | Hosting account username | example456 |
account_active | Hosting account service status | running |
curl -X POST 'https://api.suresupport.com/countries' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"data": {
"countries": {
"AG": {
"id": "4",
"iso2": "AG",
"iso3": "ATG",
"phone_code": "+1",
"eu": "0",
"eea": "0",
"vat_prefix": null,
"vat": "0",
"lat": "17.06081600",
"lng": "-61.79642800",
"continent": "NA",
"currency": "XCD",
"tld": "ag",
"bot": "0",
"seq": "0",
"language": "en",
"country": "Antigua and Barbuda"
},
"AQ": {
"id": "9",
"iso2": "AQ",
"iso3": "ATA",
"phone_code": "+672",
"eu": "0",
"eea": "0",
"vat_prefix": null,
"vat": "0",
"lat": "-75.25097300",
"lng": "-0.07138900",
"continent": "AN",
"currency": "",
"tld": "aq",
"bot": "0",
"seq": "1",
"language": "en",
"country": "Antarctica"
},
.............
}
},
"messages": [],
"status": true,
"ttl": 3600
}
Command endpoint: /countries
Get a list of countries. The command does not have any request parameters.
Property | Description | Example |
---|---|---|
id | Object id | 233 |
iso2 | ISO2 country code | US |
iso3 | ISO3 country code | USA |
phone_code | International phone code | +1 |
eu | EU Country, possible values: 0 or 1 | 0 |
eea | EEA Country, possible values: 0 or 1 | 0 |
vat_prefix | VAT prefix for EU countries, when different from ISO2 | |
vat | VAT rate (for EU countries) | 0 |
lat | Latitude | 37.09024000 |
lng | Longitude | -95.71289100 |
continent | Continent code | NA |
currency | Currency abbreviation | USD |
tld | Top level domain | us |
bot | British Overseas Territory country, can be 0 or 1 | 0 |
seq | Sequence | 1 |
language | Language | en |
country | Country name in English | United States |
curl -X POST 'https://api.suresupport.com/datacenters' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 3600,
"status": true,
"data": {
"datacenters": {
"centurylink": {
"name": "USA",
"country_iso2": "US",
"sku": "centurylink"
},
"neterra": {
"name": "Europe",
"country_iso2": "BG",
"sku": "neterra"
},
"iadvantage": {
"name": "Hong Kong",
"country_iso2": "HK",
"sku": "iadvantage"
}
}
},
"messages": []
}
Command endpoint: /datacenters
Get a list of the hosting data centers. The command does have any request parameters.
Property | Description | Example |
---|---|---|
name | Data center name in English | USA |
country_iso2 | Data center country | US |
sku | Data center sku | centurylink |
curl -X POST 'https://api.suresupport.com/tlds' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"data": {
"tlds": {
"com": {
"tld": "com",
"transfer": "1",
"id_protect": "1",
"idn": "1",
"epp": "1",
"rgp": "1",
"min_period": "1",
"max_period": "10",
"icann": "1",
"extra_attributes": ""
},
"net": {
"tld": "net",
"transfer": "1",
"id_protect": "1",
"idn": "1",
"epp": "1",
"rgp": "1",
"min_period": "1",
"max_period": "10",
"icann": "1",
"extra_attributes": ""
},
"eu": {
"tld": "eu",
"transfer": "0",
"id_protect": "0",
"idn": "0",
"epp": "1",
"rgp": "1",
"min_period": "1",
"max_period": "10",
"icann": "0",
"extra_attributes": {
"eu_adr_lang": {
"type": "select",
"required": "1",
"label": "Alternate Dispute Resolution",
"options": {
"en": {
"label": "English"
},
"es": {
"label": "Spanish"
},
"et": {
"label": "Estonian"
},
..........
}
},
"eu_country_of_citizenship": {
"type": "select",
"required": "0",
"label": "EU Country of Citizenship",
"options": {
"AT": {
"label": "Austria"
},
"BE": {
"label": "Belgium"
},
.........
},
"placeholder": "Leave blank if your country of residence is in the EU or EEA"
}
}
},
.......
}
},
"messages": [],
"status": true,
"ttl": 3600
}
Command endpoint: /tlds
Get a list of top-level domain names available in the API. The command does not have any request parameters.
Property | Description | Example |
---|---|---|
tld | Top-level domain | com |
transfer | Domain transfer supported | 1 |
id_protect | WHOIS privacy supported | 1 |
idn | IDN names supported | 1 |
epp | EPP Transfer authorization code supported | 1 |
rgp | RGP period available | 1 |
min_period | Minimum registration period | 1 |
max_period | Maximum registration period | 10 |
icann | ICANN TLD | 1 |
extra_attributes | Array, optional | See eu TLD response example |
Some top-level domains require a set of specific properties to be passed to the registry during registration. These properties and their possible values are returned as a structure in the extra_attributes property. The structure follows a key=>value format: property_key => specification.
Property | Description | Example |
---|---|---|
type | Shows the user interface element to be used (html form field type). Possible values are: select, hidden, checkbox, text. | select |
required | Shows if the attribute is required. | 1 |
label | Attribute label in English. | Nexus Category |
options | A key=>label list of possible options for the attribute in English. | ['en'=> 'English', 'es' => 'Spanish',....] |
value | Default value. | C11 |
placeholder | A placeholder to use on interfaces where a user is prompted to input data or make a selection. | Leave blank if your country of residence is in the EU or EEA |
select_type | Link to a specific object in the API. Its options should be based on data provided by the API object. The only supported option at the moment is country, where the expected value is the country ISO2 code. | country |
curl -X POST 'https://api.suresupport.com/currencyrates' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 3600,
"status": true,
"data": {
"rates": {
"AUD": {
"AUD": "1.000000",
"BGN": "1.183840",
"CAD": "0.886566",
"EUR": "0.605288",
"GBP": "0.523241",
"HKD": "5.201544",
"MXN": "12.850831",
"USD": "0.669812"
},
"EUR": {
"AUD": "1.652107",
"BGN": "1.955830",
"CAD": "1.464702",
"EUR": "1.000000",
"GBP": "0.844979",
"HKD": "8.593506",
"MXN": "20.752725",
"USD": "1.106601"
},
"USD": {
"AUD": "1.492956",
"BGN": "1.767420",
"CAD": "1.323603",
"EUR": "0.903668",
"GBP": "0.761861",
"HKD": "7.800000",
"MXN": "18.711333",
"USD": "1.000000"
},
.........
}
},
"messages": []
}
Command endpoint: /currencyrates
Get a list of currencies and their cross rates. The command will return a list of all supported API currencies and their current cross rates.
Code | Currency |
---|---|
AUD | Australian dollar |
BGN | Bulgarian lev |
CAD | Canadian dollar |
EUR | Euro |
GBP | British pound |
HKD | Hong Kong dollar |
JPY | Japanese yen |
MXN | Mexican peso |
USD | United States dollar |
curl -X POST 'https://api.suresupport.com/store-list' -H 'Content-Type: application/json' -k -g -d '{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"date": "desc"
},
"limit": 50,
"page": 1,
"count": "1",
"pages": 1,
"data": [
{
"id": "123",
"reseller_id": "12345",
"currency": "USD",
"name": "examplestore",
"title": "Example Reseller Store",
"contact_email": "store@example.com",
"hostname": "",
"widget_url": "http:\/\/example.com\/store",
"front_setup": "widget",
"autoprocess": "1",
"billing_url": "http:\/\/example.com\/store"
}
]
},
"messages": []
}
Command endpoint: /store-list
Get a list of the online stores in the reseller panel. When using store level API key, it will return a single store.
The account list can be filtered by any property in the returned result set. The = and ! conditions are available for all properties.
curl -X POST 'https://api.suresupport.com/store-details' -H 'Content-Type: application/json' -k -g -d \
'{
"id": "593",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": "123",
"reseller_id": "12345",
"currency": "USD",
"name": "examplestore",
"title": "Example Reseller Store",
"contact_email": "store@example.com",
"hostname": "",
"widget_url": "http:\/\/example.com\/store",
"front_setup": "widget",
"autoprocess": "1",
"billing_url": "http:\/\/example.com\/store"
},
"messages": []
}
Command endpoint: /store-details
Get the details of an online store.
Parameter | Type | Required | Description |
---|---|---|---|
id | Integer | yes | id of the store |
Property | Description | Example |
---|---|---|
id | Object id | 123 |
reseller_id | Owner id | 12345 |
currency | Store currency | USD |
name | Store slug | examplestore |
title | Store title | Example Stroe |
contact_email | Contact email address | store@example.com |
hostname | Hosted storefront custom domain (used when front_setup is set to custom) | example.com |
widget_url | The URL of the storefront when front_setup is set to widget | https://example.com/store |
front_setup |
default: When the storefront is using the hosted solution. custom: When the storefront is using the hosted solution with a custom domain. widget: When the store is using the widget or the WordPress plugin. |
default |
autoprocess | Try autoprocessing orders in the online store when sufficient reseller balance is available | 1 |
billing_url | The public URL of the online store | https://example.surebillingnetwork.com |
curl -X POST 'https://api.suresupport.com/product-list' -H 'Content-Type: application/json' -k -g -d '{
"with": [
"resources"
],
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": [],
"limit": 50,
"page": 1,
"count": "120",
"pages": 3,
"data": [
{
"product_id": "1",
"product": "economy",
"label": "",
"type": "hosting",
"datacenter": "centurylink",
"periodicity": "YR",
"unit": "COUNT",
"value": "1",
"max_order_period": "10",
"max_renewal_period": "10",
"custom_product": 0,
"resources": [
{
"product_id": "1",
"name": "storage",
"value": "10",
"unit": "GB",
"type": "part",
"info": ""
},
.............
]
},
........
]
}
}
Command endpoint: /product-list
Get a list of available products.
A relation can be included by adding a with parameter to the request payload.
Relation | Description |
---|---|
resources | Product resources |
Product resources represent features/limits for a given product. Currently, only hosting products have product resources describing their features, such as storage space, traffic limit, etc. Product resources with type part are an integral part of the hosting package. Resources with type main define upgrade options.
Feature | Type | Unit | Description |
---|---|---|---|
accounts | part | COUNT | Number of accounts (VPS plans) |
backup | part | PROP | Backup retention |
cpu_limit | part | MIN/DAY | CPU Minutes per day |
dedicated_cpu | part | COUNT | CPU Cores (VPS Plans) |
dedicated_ip | main | COUNT | Dedicated IP |
dedicated_ram | part | GB | RAM (VPS Plans) |
domain_parking | main,part | COUNT | Domain parking slots |
ftp_account | main,part | COUNT | Number of FTP accounts |
inodes | part | COUNT | Inodes limit |
lets_encrypt | part | PROP | Let's Encrypt availability |
mailbox_size | main | GB | Maximum mailbox size |
mailing_list | main,part | COUNT | Number of mailing lists |
memory_limit | part | MB | Memory limit per process |
mysql_db | main,part | COUNT | Number of MySQL databases |
nproc | part | COUNT | Number of simultaneous processes |
ssh_access | part | PROP | SSH access availability |
storage | part | GB | Storage space |
subdomain | main,part | COUNT | Number of subdomains |
traffic | main,part | GB/MO | Traffic limit per month |
curl -X POST 'https://api.suresupport.com/product-details' -H 'Content-Type: application/json' -k -g -d '{
"product_id": "1",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"product_id": "1",
"product": "economy",
"label": "",
"type": "hosting",
"datacenter": "centurylink",
"periodicity": "YR",
"custom_product": "0",
"unit": "COUNT",
"value": "1",
"max_order_period": "10",
"max_renewal_period": "10"
},
"messages": []
}
Command endpoint: /product-details
Get the details of a product.
Parameter | Type | Required | Description |
---|---|---|---|
product_id | Integer | yes | id of the product |
Property | Description | Example |
---|---|---|
product_id | Product object id | 1 |
product | Product sku | economy |
label | Label in English | |
type | Product type | hosting |
datacenter | Data center sku | centurylink |
periodicity | Periodicity | YR |
custom_product | Reseller created product (1) or base product (0) | 0 |
unit | Unit | COUNT |
value | Value | 1 |
max_order_period | Maximum allowed order period | 10 |
max_renewal_period | Maximum allowed renewal period | 10 |
curl -X POST 'https://api.suresupport.com/catalog' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 3600,
"status": true,
"data": {
"products": {
"1": {
"product": "economy",
"label": "",
"type": "hosting",
"datacenter": "centurylink",
"periodicity": "YR",
"resource_unit": "COUNT",
"resource_value": "1",
"max_order_period": 10,
"max_renewal_period": 10,
"calculated_periods": 0,
"resources": [
{
"name": "storage",
"value": "10",
"unit": "GB",
"desc": ""
},
...........
]
},
.......
},
"catalog": {
"1": {
"parent_id": null,
"product_id": "1",
"name": "Economy",
"optional": "1",
"min": null,
"max": null,
"quantity": "1",
"packages": [],
"prices": {
"order": {
"1": 72,
"2": 129.6
},
"renewal": {
"1": 57.6,
"2": 115.2
}
},
"children": {
"2": {
"parent_id": "1",
"product_id": "46",
"name": "Discounted Domain",
"optional": "1",
"min": "0",
"max": "1",
"quantity": "1",
"packages": [],
"prices": null,
"children": {
......
},
},
....
}
},
.........
}
}
}
# Catalog node with packages property
.....
"1233": {
"parent_id": "1210",
"product_id": "28",
"name": "Domain Parking",
"optional": "1",
"min": "0",
"max": "30",
"quantity": "1",
"packages": [
"1",
"2",
"3",
"4",
"5",
"10",
"15",
"20",
"30"
],
"prices": {
"order": {
"1": 4.79
}
},
"children": []
},
.....
Command endpoint: /catalog
Retrieve hosting products and product catalog structure.
Parameter | Type | Required | Description |
---|---|---|---|
store_id | Integer | Optional (Required) | id of the store. Required when using a reseller level API key. |
active | Integer | Optional, values 0|1 | Default 1. Filters active prices. When set to 0, will return both active and disabled prices. |
flat | Integer | Optional, values 0|1 | Default 0. When set to 0, the returned catalog structure will be a flat list. |
currency | String | Optional, currency code | When passed, catalog prices will be converted from the store currency to the passed currency. |
multiply_catalog_years | Integer | Optional, values 0|1 | Default 0. When set to 1, will multiply the prices up to the max allowed periods. |
Property | Description |
---|---|
products | A list of all available products. |
catalog |
Catalog structure. The catalog data is organized in a hierarchical tree structure that describes the different hosting packages, their prices, and the prices of the products that are part of a hosting package. |
Тhe catalog data is a hierarchical tree structure. Its nodes are based on Product objects extended with price properties and other package information. That is, each node of the catalog is linked to a Product object. Some nodes that are linked to a node with property type set to group are a collection of products. Such nodes cannot be ordered - their purpose is to group a list of possible products and to define some common properties for the group (e.g. number of domains that can be ordered at a discounted price). For example, the Discounted domain node in the Economy package node lists a collection of domain products that can be ordered at a discounted price along with Economy hosting package.
Property | Type | Description |
---|---|---|
parent_id | Integer | Parent catalog node id |
product_id | Integer | Product object id |
name | String | Node label in English |
optional | Integer | When placing an order, it defines a node/product as optional. |
min | Integer | Minimum allowed quantity of a product in this group. |
max | Integer | Maximum allowed quantity of a product in this group. For example, a hosting package can have only 1 domain from the "Discounted domain" group. |
quantity | Integer | Quantity |
packages | Array | Packages, shows that a given catalog node can only be ordered in a package. For example, additional traffic can be purchased in packages of 10GB, 20GB, etc. |
prices | Array | Prices structure, see below |
children | Array | Children nodes |
The prices for a given catalog node are organized by order action and periods. The possible order actions in the catalog response are: order and renewal. For each action, there is a list of periods and the price for each period. The default catalog response returns a key->value structure for the prices, and the prices are limited to 2 periods (the period prices which a reseller can define in their Reseller Account Panel). When the Catalog command is invoked with the multiply_catalog_years parameter set to 1, the catalog response will return prices multiplied up to the product max_order_period/max_renewal_period.
The packages structure describes how a given product can be ordered (see the example Catalog node with packages property). The provided example shows that aditional domain parking slots can be ordered in packages of 1, 2, 3, 4, 5, 10, 15, 20, and 30 slots.
curl -X POST 'https://api.suresupport.com/order-list' -H 'Content-Type: application/json' -k -g -d \
'{
"filter": {
"payment_method": "PayPal"
},
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"date": "desc"
},
"limit": 25,
"page": 1,
"count": "99",
"pages": 4,
"data": [
{
"order_id": "TCSAG8WWYER4KKDF",
"store_id": "16",
"reseller_id": "11858",
"client_store_id": null,
"client_reseller_id": "73245",
"payment_method": "PayPal",
"status": "completed",
"paid": "not_paid",
"total": "12.57",
"total_vat": "0.000000",
"currency": "USD",
"firstname": "John",
"lastname": "Doe",
"company": "",
"job": "",
"address": "My Address 1",
"address2": "My Address 2",
"city": "New York City",
"state": "New York City",
"zip": "12345",
"country": "US",
"email": "info@example.com",
"email2": "contact@example.com",
"phone_country": "US",
"phone": "123456789",
"fax_country": "",
"fax": "",
"referer": "http:\/\/store.example.com\/order-hosting\/request\/OR-CEJTP6GN8B5X",
"meta": "",
"ip": "1.2.3.4",
"cart_ref": "",
"payment_ref": "",
"new": "0",
"requested": "0",
"canceled": "0",
"provisioned": "1",
"app": "API",
"date": "2020-12-14 14:02:07",
"rate_rotate_id": "1253",
"rate": "1.000000",
"invoice_request": "0",
"invoice_type": "",
"invoice_name": "",
"invoice_ceo": "",
"invoice_identity": "",
"invoice_vat_number": "",
"invoice_country": "",
"invoice_address": "",
"payment_processor_id": "355",
"reseller": "examplereseller",
"store_title": "Example store",
"store_currency": "USD",
"is_global": "0",
"client_reseller": "resellerclient",
"client_reseller_type": "billing",
"client_store_title": null,
"items": "order: COM - example.com"
},
........
]
},
"messages": []
}
Command endpoint: /order-list
Get a list of orders. If using a store level key, it will list only the orders for this store.
The command does not support custom delimiters. The following is a list of filter parameters and their conditions. All other parameter filter conditions use the equal (=) condition.
Filter property | Condition | Description | Example |
---|---|---|---|
date | daterange | Order creation date | filter[date]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
date_from | >= | Order creation date | |
date_to | <= | Order creation date | |
firstname | %like% | Order contacts first name | |
lastname | %like% | Order contacts last name | |
%like% | Order contacts email | ||
store_title | %like% | Store name | |
payment_method | %like% | Payment method name | |
items | %like% | Summary information for the order items | |
payments | %like% | Summary information for the payments received for this order | |
firstname_lastname_email | %like% | Combined filter to search for first name, last name, and email |
Relation | Description |
---|---|
items | A list of order items. It will replace the items key summary from the default response. |
payments | A list of payments received for the order. |
curl -X POST 'https://api.suresupport.com/order-details' -H 'Content-Type: application/json' -k -g -d \
'{
"order_id": "XGQMNJVQN3SEZDDQ",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order": {
"order_id": "XGQMNJVQN3SEZDDQ",
"store_id": "16",
"reseller_id": "11858",
"client_store_id": null,
"client_reseller_id": "74710",
"payment_method": "PayPal",
"status": "completed",
"paid": "not_paid",
"total": "65.14",
"total_vat": "0.000000",
"currency": "USD",
"firstname": "John",
"lastname": "Doe",
"company": "",
"job": "",
"address": "My Address 1",
"address2": "My Address 2",
"city": "Vancouver",
"state": "British Columbia",
"zip": "V5H 3Z7",
"country": "CA",
"email": "user@example.com",
"email2": "",
"phone_country": "CA",
"phone": "965832823",
"fax_country": "",
"fax": "",
"referer": "http:\/\/example.com\/hosting-shop\/request\/OR-U5JG353YL69Y",
"meta": null,
"ip": "1.2.3.4",
"new": "0",
"requested": "0",
"canceled": "0",
"provisioned": "3",
"app": "WIDGET",
"date": "2019-09-04 07:06:54",
"rate_rotate_id": "1882",
"rate": "1.000000",
"invoice_request": "0",
"invoice_type": "",
"invoice_name": "",
"invoice_ceo": "",
"invoice_identity": "",
"invoice_vat_number": "",
"invoice_country": "",
"invoice_address": "",
"payment_processor_id": "48",
"reseller": "examplereseller",
"store_title": "Super Web Hosting",
"store_currency": "USD",
"phone_country_code": "+1",
"fax_country_code": "",
"items": {
............
},
"payments": [],
"payments_total": 0,
"payment_due": 65.14
}
},
"messages": []
}
Command endpoint: /order-details
Get the full details of an order.
Parameter | Type | Required | Description |
---|---|---|---|
order_id | String | yes | id of the order |
Property | Description | Required when creating an order | Example |
---|---|---|---|
order_id | Order unique id | Autopopulated | XGQMNJVQN3SEZDDQ |
store_id | Store id | Yes, when using reseller level API token | 16 |
reseller_id | Store owner id | Autopopulated | 11858 |
client_store_id | Client store id | Autopopulated | 16 |
client_reseller_id | Client id | No | 74710 |
payment_method | Selected payment method at the time of order creation | No | PayPal |
status | Order status | Autopopulated | completed |
paid | Order paid status | Autopopulated | not_paid |
total | Total order amount | Autopopulated | 65.14 |
total_vat | Total vat amount | Autopopulated | 0.000000 |
currency | Order currency | No | USD |
firstname | Client first name | Yes | John |
lastname | Client last name | Yes | Doe |
company | Client company | No | Acme Ltd. |
job | Client job/position | No | Manager |
address | Client address line 1 | Yes | My Address 1 |
address2 | Client address line 2 | No | My Address 2 |
city | Client City | Yes | Vancouver |
state | Client State or Province | Yes | British Columbia |
zip | Client ZIP/Postal code | Yes | V5H 3Z7 |
country | Client country ISO2 code | Yes | CA |
Client contact email | Yes | user@example.com | |
email2 | Client alternative contact email | No | |
phone_country | Phone ISO2 country | Yes | CA |
phone | Phone number | Yes | 965832823 |
fax_country | Fax ISO2 country | No | |
fax | Fax number | No | |
referer | Referer URL that the order was created from | No | http://example.com/hosting-store/request/OR-U5JG353YL69Y |
meta | Array with optional order meta information | No | |
ip | Customer IP | No | 1.2.3.4 |
new | Number of order items with status new | Autopopulated | 0 |
requested | Number of order items with status requested | Autopopulated | 0 |
canceled | Number of order items with status cancelled | Autopopulated | 0 |
provisioned | Number of order items with status provisioned | Autopopulated | 3 |
app | Code of the app that the order was created from | Autopopulated | WIDGET |
date | Order creation datetime | Autopopulated | 2019-09-04 07:06:54 |
rate_rotate_id | Currency rate history id | Autopopulated | 1882 |
rate | Currency rate | Autopopulated | 1.000000 |
invoice_request | Invoice requested | No | 0 |
invoice_type | Invoice type, can be personal or business; when set to business, invoice_ceo becomes required | No | business |
invoice_name | Name on the invoice | No | Example Ltd |
invoice_ceo | Invoice recipient name | No | John Doe |
invoice_identity | Recipient registration/identification number | No | 12345678 |
invoice_vat_number | Recipient VAT number | No | DE12345678 |
invoice_country | Recipient country ISO2 | No | DE |
invoice_address | Recipient/company address | No | 12345 Berlin, 36 Street |
payment_processor_id | Selected payment processor id at the time of order creation | No | 48 |
reseller | Owner username | Autopopulated | reselleruser |
store_title | Store title | Autopopulated | Super Web Hosting Store |
store_currency | Store currency | Autopopulated | USD |
phone_country_code | Client phone dialing code | Autopopulated | +1 |
fax_country_code | Client fax dialing code | Autopopulated | |
items | Array with order items | Yes | |
payments | Array with received payments for this order | Autopopulated, relation | |
payments_total | Total amount of payments received | Autopopulated | 0 |
payment_due | Payments due | Autopopulated | 65.14 |
{
"ttl": 0,
"status": true,
"data": {
"order": {
.......
"items": {
"JWY3UM6FDZJMPUQC": {
"item_id": "JWY3UM6FDZJMPUQC",
"parent": null,
"product_id": "1",
"catalog_id": "1",
"resource_id": null,
"action": "order",
"item": "Economy, USA - example.com",
"status": "new",
"period": "1",
"quantity": "1",
"price": "72.00",
"currency": "USD",
"updated": "2018-07-13 10:56:29",
"account_id": null,
"product_type": "hosting",
"product": "economy",
"periodicity": "YR",
"datacenter": "centurylink",
"resource_unit": "COUNT",
"resource_value": "1",
"date": "2018-07-13 10:56:29",
"hosting": {
"hostname": "example.com"
},
"contact": {
"firstname": "John",
"lastname": "Doe",
"company": "",
"address": "123 Sunny Str.",
"address2": "Building 456",
"city": "Paris",
"state": "Paris",
"zip": "1234",
"country": "FR",
"email": "user@example.com",
"email2": "user@example.com",
"phone_country": "FR",
"phone": "12345678",
"fax_country": "",
"fax": ""
},
"resource": {},
"group": "Economy, USA - example.com"
},
......
},
.......
}
},
"messages": []
}
Property | Description | Required when creating an order | Example |
---|---|---|---|
item_id | Unique item id | Yes, will be replaced with a unique id when saving the order | JWY3UM6FDZJMPUQC |
parent | Parent item id | Optional, shows relation to another item in the order | J63Q98YXQ8YZ2VVF |
product_id | Product id | Autopopulated | 1 |
catalog_id | Catalog id | Yes, optional for Custom products | 1 |
resource_id | Resource id, when order item is linked to an existing resource/service | Optional, required for actions renewal and upgrade | 1234 |
parent_resource_id | Parent resource id, when the order item is to be attached to an existing parent resource (for example, a bonus/extra domain, or an SSL certficate, to be linked to an existing hosting account) | Optional, required for action order when the order item should be treated as extra/addon of the parent resource | 1234 |
action | Order item action, possible values: order, renewal, upgrade, purchase (used for Custom products only) | Yes | order |
item | Item label, set to custom, when the Order item is a Custom product | Optional, required for Custom products | Economy, USA - example.com |
status | Item status | Autopopulated | new |
period | Order period | Yes, optional for Custom product | 1 |
quantity | Quantity | Optional | 1 |
price | Item price | Optional, required for Custom product | 72.00 |
currency | Item currency | Autopopulated | USD |
updated | Last updated | Autopopulated | 2018-07-13 10:56:29 |
account_id | HostingAccount id when applicable | Autopopulated | |
product_type | Product type | Autopopulated | hosting |
product | Product sku | Autopopulated | economy |
periodicity | Product periodicity | Autopopulated | YR |
datacenter | Data center sku | Autopopulated | centurylink |
resource_unit | Resource unit | Autopopulated | COUNT |
resource_value | Resource value | Autopopulated | 1 |
date | Creation date | Autopopulated | 2018-07-13 10:56:29 |
contact | Array with contact information for the Orderitem, if empty it will inherit the Order contacts | See Order Contact | See Order contact |
resource | Resource details, when the order item is linked to an existing resource, for example renewal | Autopopulated | See Resource object details |
group | Helper property to allow grouping of order items when displaying them to the user | Autopopulated | Economy, USA - example.com |
Product specific properties, available only for certain products based on their type (product_type) | |||
hosting | A product type specific key, holding the hosting product specific details | Yes for action order | See Product Meta |
server | A product type specific key, holding the server product specific details | Yes for action order | See Product Meta |
domain | A product type specific key, holding the domain product specific details | Yes for action order | See Product Meta |
ssl | A product type specific key, holding the SSL Certificate product specific details | Yes for action order | See Product Meta |
service | A product type specific key, holding the Advanced Service products specific details | Yes for action order | See Product Meta |
install_applications | A product type specific key, applicable for hosting and servers products | No | See Product Meta |
Property | Description | Required when creating order | Example |
---|---|---|---|
firstname | First name | Yes | John |
lastname | Last name | Yes | Doe |
company | Company/Organization name | Yes | Acme Ltd. |
address | Address line 1 | Yes | 123 Sunset Blvd. |
address2 | Address line 2 | No | Moon Building 25 |
city | City | Yes | Sofia |
state | State or province | Yes | Sofia |
zip | Zip or postal code | Yes | 12345 |
country | ISO2 country code | Yes | AL |
Email address | Yes | user@example.com | |
email2 | Alternative email address | No | user@example.com |
phone_country | Phone ISO2 country code | Yes | BG |
phone | Phone | Yes | 123456789 |
fax_country | Fax ISO2 country code | No | |
fax | Fax | No | 123456789 |
Each product type has type-specific meta data which is attached to the OrderItem object.
Order item key: hosting
Property | Description |
---|---|
hostname | Optional, required for action order. Hosting account hostname, for example: example.com |
Order item key: install_applications
Property | Description |
---|---|
wordpress | Boolean 0|1. When set to 1 a WordPress will be installed on the new account |
kopage | Boolean 0|1. When set to 1 a SiteBuilder/Kopage will be installed on the new account |
Order item key: domain
Property | Description |
---|---|
sld | Domain SLD. For example, for domain example.com - example is the SLD part. |
tld | Domain TLD. For example, for domain example.com - com is the SLD part. |
epp | EPP key, required for action transfer when TLD supports EPP transfers |
ns1 | Optional, Nameserver 1 - nameservers to set upon provision |
ns2 | |
ns3 | |
ns4 | |
ns5 | |
extra_attributes | Additional domain attributes required by the registrars for action register and transfer, see Enums -> Top level domains API command. |
global_dns | Optional, boolean, for actions register and transfer when a domain is linked to a hosting account. Set the domain DNS zone to be the same as the hosting acount DNS zone. |
action | Required, valid actions are: register, transfer, renewal |
id_protect | Optional, boolean, available for actions register and transfer. Enable WHOIS privacy service upon provision. |
Order item key: ssl
Property | Description |
---|---|
ip_type | Optional, valid values: noip, sni, dedicated, new. When SSL is purchased for a given hosting account, this property specifies how the certificate should be installed. |
ip | Optional, when ip_type is set to dedicated, a valid dedicated IP should be passed in this field |
common_name | Required for action order, certificate common name |
approver_email | Required, Certificate approval email, see Certificates -> Get approver emails command |
organization | Required, Certificate organization name, for example Acme Ltd. |
organization_unit | Required, Ogranization unit name, for example Sales Department |
country | Required, ISO2 Country code |
city | Required, City |
state | Required, State or province |
Optional, Email | |
address | Optional, required for product sku sectigo_essential and sectigo_essential_wildcard, Address line 1 |
address2 | Optional, Address line 2 |
address3 | Optional, Address line 3 |
zip | Optional, Zip or postal code |
Order item key: purchase
Property | Description |
---|---|
items | String, required. Custom product description. For example: SEO Services. |
When creating a custom product order item, the OrderItem action property should be set to purchase, and the item property should be set to custom.
curl -X POST 'https://api.suresupport.com/order-data' -H 'Content-Type: application/json' -k -g -d \
'{
"store_id": "123",
"auth_token": "API_TOKEN"
}'
{
"ttl": 3600,
"status": true,
"data": {
"store": {
.....
},
"datacenters": {
.....
},
"tlds": {
.....
},
"countries": {
.....
},
"products": {
.....
},
"catalog": {
.....
}
},
"messages": []
}
Command endpoint: /order-data
This is a shortcut command that returns the combined response of the following commands:
The command combines all of the above in a single response, so that one can have all of the data required to build a UI order form with a single API call.
Parameter | Type | Description |
---|---|---|
store_id | Integer | Optional, required when using reseller level API authentication |
Properties | Description |
---|---|
store | Store information |
catalog | Catalog structure |
products | List of products |
datacenters | Data centers information |
tlds | List of supported TLDs |
countries | List of countries |
# Sample payload for a new hosting account order, a domain name transfer and a custom product
# Only the the required request parameters are included
curl -X POST 'https://api.suresupport.com/order-create' -H 'Content-Type: application/json' -k -g -d \
'{
"items": {
"1": {
"item_id": "1",
"catalog_id": "1",
"action": "order",
"period": "5",
"hosting": {
"hostname": "example.com"
},
"install_applications": {
"wordpress": "1"
}
},
"2": {
"item_id": "2",
"catalog_id": "3",
"action": "order",
"period": "10",
"parent": "1",
"tld": "com",
"sld": "example",
"domain": {
"sld": "example",
"tld": "com",
"epp": "zxcvbn133add!",
"action": "transfer"
}
},
"3": {
"item_id": "3",
"item": "custom",
"price": "12345",
"action": "purchase",
"purchase": {
"items": "SEO Campaign"
}
}
},
"firstname": "John",
"lastname": "Doe",
"address": "123 High Street",
"city": "California",
"state": "California",
"zip": "1234",
"country": "US",
"phone_country": "US",
"phone": "987654321",
"email": "user@example.com",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order": {
"order_id": "1N2M2PUUD9BB5SVD",
"store_id": "444",
"reseller_id": "21",
"client_store_id": null,
"client_reseller_id": "75782",
"payment_method": "Pending",
"status": "new",
"paid": "not_paid",
"total": "12752.90",
"total_vat": "0.000000",
"currency": "USD",
"firstname": "John",
"lastname": "Doe",
"company": "",
"job": "",
"address": "123 High Street",
"address2": "",
"city": "California",
"state": "California",
"zip": "1234",
"country": "US",
"email": "user@example.com",
"email2": "",
"phone_country": "US",
"phone": "987654321",
"fax_country": "",
"fax": "",
"referer": "",
"meta": null,
"ip": "213.145.98.103",
"new": "3",
"requested": "0",
"canceled": "0",
"provisioned": "0",
"app": "RESELLER",
"date": "2020-02-29 17:38:29",
"rate_rotate_id": "2046",
"rate": "1.000000",
"invoice_request": "0",
"invoice_type": "",
"invoice_name": "",
"invoice_ceo": "",
"invoice_identity": "",
"invoice_vat_number": "",
"invoice_country": "",
"invoice_address": "",
"payment_processor_id": null,
"reseller": "examplereseller",
"store_title": "my-store",
"store_currency": "USD",
"phone_country_code": "+1",
"fax_country_code": "",
"items": {
"RAJECTFJXQGTZKXB": {
"item_id": "RAJECTFJXQGTZKXB",
"parent": null,
"product_id": "1",
"catalog_id": "1",
"resource_id": null,
"action": "order",
"item": "Economy, USA - example.com",
"status": "new",
"period": "5",
"quantity": "1",
"price": "403.20",
"currency": "USD",
"updated": "2020-02-29 17:38:29",
"account_id": null,
"product_type": "hosting",
"product": "economy",
"periodicity": "YR",
"datacenter": "centurylink",
"resource_unit": "COUNT",
"resource_value": "1",
"date": "2020-02-29 17:38:29",
"hosting": {
"hostname": "example.com"
},
"contact": {
"firstname": "John",
"lastname": "Doe",
"company": "",
"address": "123 High Street",
"address2": "",
"city": "California",
"state": "California",
"zip": "1234",
"country": "US",
"email": "user@example.com",
"email2": "",
"phone_country": "US",
"phone": "987654321",
"fax_country": "",
"fax": ""
},
"resource": [],
"group": "Economy, USA - example.com"
},
"K2UKGLCNVPA7SB2A": {
"item_id": "K2UKGLCNVPA7SB2A",
"parent": "RAJECTFJXQGTZKXB",
"product_id": "12",
"catalog_id": "3",
"resource_id": null,
"action": "order",
"item": "COM - example.com",
"status": "new",
"period": "1",
"quantity": "1",
"price": "8.38",
"currency": "USD",
"updated": "2020-02-29 17:38:29",
"account_id": null,
"product_type": "domain",
"product": "com",
"periodicity": "YR",
"datacenter": null,
"resource_unit": "COUNT",
"resource_value": "1",
"date": "2020-02-29 17:38:29",
"domain": {
"sld": "example",
"tld": "com",
"parked_to": "main",
"epp": "zxcvbn133add!",
"ns1": "",
"ns2": "",
"ns3": "",
"ns4": "",
"ns5": "",
"extra_attributes": [],
"extra_attributes_admin": [],
"global_dns": 1,
"action": "transfer",
"id_protect": 0,
"transfer_whois_checks": 1
},
"contact": {
"firstname": "John",
"lastname": "Doe",
"company": "",
"address": "123 High Street",
"address2": "",
"city": "California",
"state": "California",
"zip": "1234",
"country": "US",
"email": "user@example.com",
"email2": "",
"phone_country": "US",
"phone": "987654321",
"fax_country": "",
"fax": ""
},
"resource": [],
"group": "Economy, USA - example.com"
},
"VQFDK8N3QEC2WQBC": {
"item_id": "VQFDK8N3QEC2WQBC",
"parent": null,
"product_id": null,
"catalog_id": null,
"resource_id": null,
"action": "purchase",
"item": "custom",
"status": "new",
"period": "1",
"quantity": "1",
"price": "12345.00",
"currency": "USD",
"updated": "2020-02-29 17:38:29",
"account_id": null,
"product_type": null,
"product": null,
"periodicity": null,
"datacenter": null,
"resource_unit": null,
"resource_value": null,
"date": "2020-02-29 17:38:29",
"purchase": {
"items": "SEO Campaign"
},
"resource": [],
"group": "Purchase items"
}
},
"payments": [],
"payments_total": 0,
"payment_due": 12752.9
},
"order_id": "1N2M2PUUD9BB5SVD",
"total": "12655.78",
"currency": "USD"
},
"messages": [
{
"type": "success",
"code": "order_create_success"
}
]
}
Command endpoint: /order-create
Create a new order in your store.
Parameter | Description |
---|---|
store_id | Optional, required when using reseller-level authentication |
items | Items in the order, see the Order items and Product Meta sections |
client_reseller_id | Optional, when passed new services, and the order itself, will be linked to the passed Client id |
payment_method | Optional, Payment method slug. See Payments -> List payment methods command. When passed, the response will contain a payment_request property. See Payments -> Payment requests. |
Contact details (see Order contact section) | |
firstname | First name |
lastname | Last name |
address | Address |
city | City |
state | State |
zip | Zip or postal code |
country | ISO2 country code |
phone_country | ISO2 country code |
phone | Phone number |
Email address |
curl -X POST 'https://api.suresupport.com/order-delete' -H 'Content-Type: application/json' -k -g -d \
'{
"order_id": "XQETMSXL21CFYSQX",
"store_id": "444",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": [],
"messages": [
{
"type": "success",
"code": "order_delete_success"
}
]
}
Command endpoint: /order-delete
Delete an order. Orders that have already been processed cannot be deleted.
Parameter | Type | Required | Description |
---|---|---|---|
order_id | String | yes | id of the Order |
store_id | Integer | no | Required when reseller-level authentication is used |
curl -X POST 'https://api.suresupport.com/order-update' -H 'Content-Type: application/json' -k -g -d \
'{
"store_id": "444",
"items": {
"FZRQMD4FEY2AQCXN": {
"item_id": "FZRQMD4FEY2AQCXN",
"action": "purchase",
"item": "custom",
"price": "12345.00",
"purchase": {
"items": "SEO Campaign"
}
}
},
"order_id": "1P7KPJKHFWDBYGVV",
"firstname": "Jane",
"lastname": "Doe",
"company": "",
"job": "",
"address": "123 High Street",
"address2": "",
"city": "California",
"state": "California",
"zip": "1234",
"country": "US",
"email": "user@example.com",
"email2": "",
"phone_country": "US",
"phone": "987654321",
"fax_country": "",
"fax": "",
"invoice_request": "1",
"invoice_type": "business",
"invoice_name": "John Doe",
"invoice_ceo": "John Doe",
"invoice_identity": "987654321",
"invoice_vat_number": "987654321",
"invoice_country": "US",
"invoice_address": "456 Sunny Blvd.",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_id": "1P7KPJKHFWDBYGVV",
"total": "12345.00",
"currency": "USD",
"order": {
.........
}
},
"messages": [
{
"type": "success",
"code": "order_update_success"
}
]
}
Command endpoint: /order-update
Update an order. The properties that can be updated are the Order Items, Order contacts, and invoice details. Order items can be deleted, updated, or new items can be appended to the order. The request parameters are the same as for the Create order command.
Parameter | Type | Required | Description |
---|---|---|---|
order_id | String | yes | id of the order |
store_id | Integer | no | Required when reseller-level authentication is used |
curl -X POST 'https://api.suresupport.com/payment-processors' -H 'Content-Type: application/json' -k -g -d \
'{
"store_id": "42",
"auth_token": "API_TOKEN"
}'
{
"ttl": 3600,
"status": true,
"data": {
"processors": {
"248": {
"processor_id": "248",
"type_id": "6",
"name": "AuthorizeNet",
"slug": "AuthorizeNet:248",
"onsite": "0",
"offline": "0",
"sku": "",
"display_name": "Pay with credit card",
"tags": "",
"active": "1",
"test": "1",
"seq": "1",
"options": {
"url": "https:\/\/test.authorize.net\/gateway\/transact.dll",
"secret": "authorizenet_secret",
"transactionKey": "transaction_key",
"id": "authorizenet_merchant_id",
"currency": "AUD"
}
},
"250": {
"processor_id": "250",
"type_id": "1",
"name": "PayPal",
"onsite": "0",
"offline": "0",
"sku": "",
"display_name": "Paypal",
"tags": "",
"active": "1",
"test": "1",
"seq": "3",
"options": {
"id": "user@example.com",
"url": "https:\/\/www.sandbox.paypal.com\/cgi-bin\/webscr",
"currency": "EUR"
}
},
........
}
},
"messages": []
}
Command endpoint: /payment-processors
List the configured payment methods/processors for a given store.
Parameter | Type | Required | Description |
---|---|---|---|
store_id | Integer | no | Required when reseller-level authentication is used |
active | Integer | no | Filter for active processors: 0 - not active, 1 - active |
test | Integer | no | Filter for test processors: 0 - test processors, 1 - live processors |
processor_id | Integer | no | List a single processor by its id |
Property | Description | Example |
---|---|---|
processor_id | Processor object id | 42 |
type_id | Processor type id | 1 |
name | Processor type name | Paypal |
slug | Processor slug, to be used when creating/updating orders, or when creating payment requests | Paypal:4 |
onsite | Denotes if a given payment type is implemented onsite | 0 |
offline | Flag for offline payment methods, such as Bank, Cash, Cheque | 1 |
sku | Reserved for system use | |
display_name | The payment processor display name as configured in your reseller Account Panel | Pay with a credit card |
tags | Reserved for system use | |
active | Denotes if the payment processor is marked as active/enabled in the reseller Account Panel | 1 |
test | Denotes if the payment processor is marked as being in test mode in the reseller Account Panel | 0 |
seq | Sort sequence as defined in the reseller Account Panel | 1 |
options | A payment processor specific array of options required to create a payment. For example, Paypal options will return Paypal merchant id/email, while other processors will return different options depending on the given payment provider requirements. |
curl -X POST 'https://api.suresupport.com/payment-list' -H 'Content-Type: application/json' -k -g -d '{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"id": "desc"
},
"limit": 50,
"page": 1,
"count": "56",
"pages": 56,
"data": [
{
"date": "2020-02-27 10:41:12",
"payment_id": "SZVRKC687KFPBU5A",
"payment_processor_id": null,
"payment_type": "incoming",
"payment_method": "Paypal",
"transaction_id": "123456789",
"payment_date": "2020-02-27 10:40:59",
"merchant_id": "manual",
"total": "72.00",
"currency": "EUR",
"client_reseller_id": "12345",
"reseller_id": "123",
"order_id": "MGLARX2WEZTYQ9K2"
}
]
},
"messages": []
}
Command endpoint: /payment-list
Get a list of payments. When using reseller-level API authentication, it will return all payments. When using store-level authenticaiton, it will return the payments for that store only.
curl -X POST 'https://api.suresupport.com/payment-details' -H 'Content-Type: application/json' -k -g -d \
'{
"payment_id": "SZVRKC687KFPBU5A",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"date": "2020-02-27 10:41:12",
"payment_id": "SZVRKC687KFPBU5A",
"order_id": "MGLARX2WEZTYQ9K2",
"payment_processor_id": null,
"payment_type": "incoming",
"payment_method": "Paypal",
"transaction_id": "123456789",
"payment_date": "2020-02-27 10:40:59",
"merchant_id": "manual",
"total": "72.00",
"currency": "EUR",
"buyer_id": "",
"store_id": "428",
"reseller_id": "21",
"client_reseller_id": "75128"
},
"messages": []
}
Command endpoint: /payment-details
Parameter | Type | Required | Description |
---|---|---|---|
payment_id | String | yes | Payment object id |
Property | Description | Example |
---|---|---|
date | Payment creation date | 2020-02-27 10:41:12 |
payment_id | Payment object id | SZVRKC687KFPBU5A |
payment_processor_id | Payment processor id | 22 |
payment_type | Payment type, can be incoming, refund, chargeback | incoming |
payment_method | Payment method name | Paypal |
transaction_id | Payment transaction id as provided by the payment processor | 123456789 |
payment_date | Payment date, it can be different from the creation date when provided by the Payment processor | 2020-02-27 10:40:59 |
merchant_id | Payment processor merchant id | manual |
total | Payment amount | 72.00 |
currency | Payment currency | EUR |
buyer_id | Payment processor specific value if provided | |
store_id | Store object id | 428 |
reseller_id | Reseller object id | 21 |
client_reseller_id | Client object id | 75128 |
order_id | Order object id | MGLARX2WEZTYQ9K2 |
curl -X POST 'https://api.suresupport.com/payment-add' -H 'Content-Type: application/json' -k -g -d \
'{
"order_id": "MGLARX2WEZTYQ9K2",
"payment_type": "incoming",
"payment_method": "Paypal",
"transaction_id": "123456789",
"payment_date": "2020-03-16 18:54:00",
"merchant_id": "user@example.com",
"total": "123",
"currency": "USD",
"payment_processor_id": "6",
"ipn": [],
"payment_request_id": "",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"payment_id": "FKFHXYKBPQGHALJM",
"order_id": "MGLARX2WEZTYQ9K2"
},
"messages": [
{
"type": "success",
"code": "add_payment_success"
}
]
}
Command endpoint: /payment-add
Parameter | Description | Example |
---|---|---|
order_id | Required, Order object id identifying the order the payment should be linked to. Optional when payment_request_id is passed. | MGLARX2WEZTYQ9K2 |
payment_type | Required, Payment type, enum, values: incoming, refund, chargeback | incoming |
payment_method | Required, string, Payment method name | Paypal |
transaction_id | Required, string, Payment processor transaction id, external transaction id | 123456789 |
payment_date | Optional, datetime, Payment date | 2020-03-16 18:54:00 |
merchant_id | Required, string, Payment processor merchant id | user@example.com |
total | Required, decimal, Payment amount | 123 |
currency | Required, string, ISO3 currency code | USD |
payment_processor_id | Optional, link to a predefined payment processor in the system | 6 |
payment_request_id | Optional, integer, Payment request object id |
Property | Description |
---|---|
payment_id | The new payment object id |
order_id | Order object id |
curl -X POST 'https://api.suresupport.com/payment-delete' -H 'Content-Type: application/json' -k -g -d \
'{
"payment_id": "FKFHXYKBPQGHALJM",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": [],
"messages": [
{
"type": "success",
"code": "delete_payment_success"
}
]
}
Command endpoint: /payment-delete
Delete a payment.
Parameter | Type | Required | Description |
---|---|---|---|
payment_id | String | yes | id of the Payment |
Payment request objects are created when a given user is sent to a payment processor to make a payment for a given order. They represent payment intents, and store information about what payment method(s) the user tried to use for paying a given order, as well as the totals, exchange rates of the order, and the amount sent to the processor in cases where the order currency differs from the payment processor supported or desired currenciy.
One can also use the Payment request ID to track/link or pass to the Payment processor as a unique payment/transaction ID. For example, in cases where multiple payments must be created for a given order, or when the Payment processor has specific requirements for the format, uniqueness and type of the passed merchant transaction/invoice/order ID. For example, some processors require merchant transaction/order ID to be passed as an integer, others will limit multiple payments for the same order/invoice id.
curl -X POST 'https://api.suresupport.com/payment-request-create' -H 'Content-Type: application/json' -k -g -d \
'{
"order_id": "1N2M2PUUD9BB5SVD",
"amount": "100",
"currency": "CAD",
"payment_method": "PayPal:663",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"payment_request": {
"id": "8713",
"payment_method": "PayPal",
"amount": "69.43",
"currency": "USD",
"original_amount": "100.000000",
"original_currency": "CAD",
"exchange_rate": "0.694268",
"created_at": "2020-03-19 10:56:41",
"payment_processor_id": "663",
"lang": null,
"return_url": null,
"cancel_url": null,
"store_id": "444",
"order_id": "1N2M2PUUD9BB5SVD"
}
},
"messages": []
}
Command endpoint: /payment-request-create
Parameter | Description | Example |
---|---|---|
order_id | Required, Order object id | MGLARX2WEZTYQ9K2 |
amount | Required, Payment amount | 100 |
payment_method | Required, string, Payment method slug | Paypal:663 |
currency | Required, Payment amount ISO3 currency code | CAD |
Response will contain the newly created Payment request object in the payment_request key.
curl -X POST 'https://api.suresupport.com/payment-request-details' -H 'Content-Type: application/json' -k -g -d \
'{
"id": "8720",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"payment_request": {
"id": "8720",
"api_order_id": "25029",
"payment_method": "PayPal",
"amount": "69.43",
"currency": "USD",
"original_amount": "100.000000",
"original_currency": "CAD",
"exchange_rate": "0.694268",
"created_at": "2020-03-19 12:31:41",
"payment_processor_id": "663",
"lang": null,
"return_url": null,
"cancel_url": null,
"store_id": "444",
"order": {
........
}
}
},
"messages": []
}
Command endpoint: /payment-request-details
Parameter | Type | Required | Description |
---|---|---|---|
id | Integer | yes | Payment request object id |
Property | Description |
---|---|
id | Payment request object id |
order_id | Order object id |
payment_method | Payment method name |
amount | Amount |
currency | Amount currency |
original_amount | Original amount |
original_currency | Original currency |
exchange_rate | Exchange rate |
created_at | Creation datetime |
payment_processor_id | Payment method id |
lang | reserved for future use |
return_url | reserved for future use |
cancel_url | reserved for future use |
store_id | Store id |
api_order_id | Internal order id reference |
The details command will also return an Order object associated with this payment request in the order key of the response.
The API allows access to list, create, or reply to tickets in any support account linked to the services of the reseller. Support accounts can be linked to in every hosting account Control Panel, in every Client Account Panel, and in the reseller Account Panel.
All support ticket commands require a reseller-level API Token, they will not work with store level API authentication.
curl -X POST 'https://api.suresupport.com/ticket-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
#Example of using the in condition
curl -X POST 'https://api.suresupport.com/ticket-list' -H 'Content-Type: application/json' -k -g -d \
'{
"filter": {
"status:in": [
"inprogress",
"taken"
]
},
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"order_by": {
"sort_status": "asc",
"id": "desc"
},
"limit": 50,
"page": 1,
"count": "104",
"pages": 3,
"data": [
{
"id": "935470",
"status": "answered",
"domain": "example.org",
"username": "exampleuser",
"subject": "PHP Question",
"fromsite": "ss",
"lang": "en",
"sort_status": "closed_ticket",
"response_date": "2019-04-18 08:49:44",
"read_on": "2019-04-18 08:50:43",
"is_read": "1",
"operator": "Support123",
"attachment_count": "0"
},
........
]
},
"messages": []
}
Command endpoint: /ticket-list
Get a list of tickets.
The tickets list can be filtered by any property in the returned result set. The = and ! conditions are available for all properties. The = condition is the default behaviour.
Additional filter conditions are available for the following properties:
Property | Condition | Type | Example |
---|---|---|---|
status | in | Array | See the example call |
domain | !, =, like%, %like% | String | filter[domain:like%]=example |
username | !, =, like%, %like% | String | filter[username:like%]=example (support username) |
subject | !, =, like%, %like% | String | filter[subject:like%]=example |
response_date | !,=,<,>,<=, >=, daterange | Datetime | filter[response_date:range]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
read_on | !,=,<,>,<=, >=, daterange | Datetime | filter[read_on:range]=2017-01-01 12:00:00,2020-01-01 00:00:00 |
attachment_count | !,=,>, >= | Integer | filter[attachment_count:>=]=1 |
search | n/a | String | filter[search]=smtp |
curl -X POST 'https://api.suresupport.com/ticket-details' -H 'Content-Type: application/json' -k -g -d \
'{
"id": "935470",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"ticket": {
"id": "935470",
"status": "answered",
"domain": "example.com",
"username": "exampleuser",
"subject": "Help with WordPress",
"fromsite": "rcp",
"lang": "en",
"sort_status": "closed_ticket",
"response_date": "2019-04-18 08:49:44",
"read_on": "2019-04-18 08:50:43",
"is_read": "1",
"operator": "Support123",
"attachment_count": "1",
"messages": [
{
"id": "1241144",
"ticket_id": "935470",
"name": "Jane Doe",
"email": "user@example.com",
"language": "en",
"question": "My Wordpress is not working, please check",
"answer": "Hello, all fixed, please check\r\n\r\n\r\n\r\nBest Regards,\r\nSupport ",
"response_date": "2019-04-18 08:49:44",
"is_read": "1",
"is_last": "1",
"updated_at": "2019-04-18 08:50:43",
"post_date": "2019-04-18 08:48:49",
"support_nickname": "Support123",
"question_attachment": [
{
"id": "27878",
"message_id": "1226213",
"file": "grass.jpg",
"type": "image\/jpeg",
"size": "157920",
"path": "2019\/04\/11",
"ticket_id": "923811",
"is_deleted": false
}
],
"answer_attachment": [
{
"id": "1396",
"message_id": "1226213",
"file": "christmas.jpg",
"type": "image\/jpeg",
"size": "68221",
"path": "2019\/04\/11",
"ticket_id": "923811",
"is_deleted": true
}
]
}
],
"can_reply": true
}
},
"messages": []
}
Command endpoint: /ticket-details
Get the full details of a support ticket.
Parameter | Type | Required | Description |
---|---|---|---|
id | Integer | yes | Ticket object id |
Property | Description | Example |
---|---|---|
id | Ticket object id | 923811 |
status | Ticket status, possible values: active, inprogress, taken, answered | answered |
domain | Domain of the ticket, see the Ticket domains command | example.org |
username | Support account username | exampleuser |
subject | Ticket subject | How to configure Mail for Mac |
fromsite | Ticket source, possible values: ss (suresupport.com), rcp (Reseller Account Panel), billingrcp (Client Account Panel), api | ss |
lang | Ticket language, possible values: en, bg | en |
sort_status | A dynamic flag to facilitate the sorting of the ticket list | closed_ticket |
response_date | Last operator response | 2020-04-11 09:46:51 |
read_on | Date and time when the customer read the response | 2020-04-19 08:47:37 |
is_read | Flag to show if the last operator response was read | 1 |
operator | Support operator | Support 123 |
attachment_count | Attachments count | 1 |
messages | An array with all messages in the ticket thread. See message object properties. | |
can_reply | Shows if a new message can be posted to the ticket thread. False when the ticket thread is waiting for a support operator's response. | 1 |
Property | Description | Example |
---|---|---|
id | Message id | 1214311 |
ticket_id | Ticket object id | 923811 |
name | Support account name (at the time the ticket was created) | Jane Doe |
Support account e-mail (at the time the ticket was created) | user@example.com | |
language | Support account language (at the time the ticket was created) | en |
question | Customer question | This is a sample question to the support operator. |
answer | Support operator response | Hello, this is a sample response to a customer. |
response_date | Operator response datetime | 2020-02-11 07:10:26 |
is_read | Flag to show if the operator response is read | 1 |
is_last | Flag to show if this is the last message in the thread | 0 |
updated_at | Ticket message last update datetime | 2020-06-07 15:26:17 |
post_date | Ticket message creation datetime | 2020-02-11 06:59:11 |
support_nickname | Support operator name | Support 123 |
question_attachment | An array holding the attachments from the customer if available | |
answer_attachment | An array holding the attachments from the support operator if available |
Property | Description | Example |
---|---|---|
id | Attachment object id | 1396 |
message_id | Message object id | 1214311 |
ticket_id | Ticket object id | 923811 |
file | Original file name of the attachment file | image.jpg |
type | MIME type | image/jpeg |
size | Attachment file size in bytes | 68221 |
path | Storage folder path | 2019/04/11 |
is_deleted | True when the attachment file is deleted | false |
curl -X POST 'https://api.suresupport.com/ticket-attachment' -H 'Content-Type: application/json' -k -g -d '{
"attachment_id": "27878",
"type": "question",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": "27878",
"mid": "1226213",
"path": "2016\/04\/11",
"file": "grass.jpg",
"type": "image\/jpeg",
"size": "157920",
"ticket_id": "923811",
"data_file": "\/9j\/4AAQSkZJRgABAQAAAQABAAD\/2wBDAAYEBQYFB............"
},
"messages": []
}
Command endpoint: /ticket-attachment
Download an attachment.
Parameter | Type | Required | Description |
---|---|---|---|
attachment_id | Integer | yes | Attachment object id |
type | String | yes | Attachment type, possible values: question, answer |
Attachment object properties
id | Attachment object id | 1396 |
mid | Message object id | 1214311 |
ticket_id | Ticket object id | 923811 |
file | Original file name of the attachment file | image.jpg |
type | Mime type | image/jpeg |
size | Attachment file size | 68221 |
path | Storage folder path | 2019/04/11 |
data_file | Base64 encoded file data. Empty if the attachment is deleted. |
curl -X POST 'https://api.suresupport.com/ticket-post' -H 'Content-Type: application/json' -k -g -d \
'{
"ticket": {
"domain": "example.com",
"subject": "Sample ticket subject",
"question": "Sample ticket question body",
"username": "",
"attachments": [
{
"file": "filename.jpg",
"type": "image\/jpg",
"data_file": "iVBORw0KGgoAAAAN......"
}
]
},
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": 935914
},
"messages": []
}
Command endpoint: /ticket-post
The command creates a new ticket thread with a new ticket message. To create a new ticket, previous ticket threads in the same support account need to be marked as read (is_read property needs to be 1). A ticket thread is marked as read when the user has read the support operator's response. A call to the Ticket details command will mark the given ticket thread as read.
Parameter | Description | Example |
---|---|---|
domain | Required, domain, see Ticket domains command | example.org |
subject | Required, the new ticket subject line, max allowed characters: 80 | Example subject |
question | Required, the new ticket question, max allowed characters: 1024000 (1MB) | Hi, how are you today? |
user | Optional, when empty the ticket will be created with the reseller Account Panel-linked support account | exampleusername |
attachments | Optional, array with Attachment objects data. All uploaded attachment files get checked with an antivirus scanner. Max attachment file size is 20MB per attachment, and a total of 3 attachments per ticket message are allowed. | |
agent | Optional, user browser agent, string. | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36 |
Parameter | Description | Example |
---|---|---|
file | Required, filename, max length 255 characters | example.gif |
type | Required, MIME type, max length 128 characters | image/gif |
data_file | Base64-encoded file data. Max attachment file size is 20MB, so the file data before base64 encoding should be smaller than 20MB. |
Property | Description |
---|---|
id | New ticket object id |
curl -X POST 'https://api.suresupport.com/ticket-reply' -H 'Content-Type: application/json' -k -g -d \
'{
"ticket": {
"question": "This is a sample reply",
"attachments": [
{
"file": "pixel.gif",
"type": "image\/gif",
"data_file": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="
}
],
"id": "935469"
},
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"id": 1234
},
"messages": []
}
Command endpoint: /ticket-reply
The command creates a new Ticket message object in the ticket thread. A new message can only be created when the last message in the thread has already been replied to by a support operator.
Parameter | Description | Example |
---|---|---|
id | Required, the ticket object id you are replying to | example.org |
question | Required, the reply text. Max allowed characters: 1024000 (1MB). | Example question |
attachments | Optional, an array with Attachment objects data. See Create new ticket command. | |
agent | Optional, user browser agent string | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36 |
Parameter | Description | Example |
---|---|---|
id | The id of the created message in the ticket thread | 12345 |
curl -X POST 'https://api.suresupport.com/ticket-account-list' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": [
"examplesupportuser",
"exampleusername"
],
"messages": []
}
Command endpoint: /ticket-account-list
The command will return a list of usernames for all support accounts linked to services of the reseller. Support accounts can be linked to in every hosting account Control Panel, in every Client Account Panel, and in the reseller Account Panel.
curl -X POST 'https://api.suresupport.com/ticket-account-domains' -H 'Content-Type: application/json' -k -g -d \
'{
"username": "exampleusername",
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": [
"example.com",
"general.support.enq"
],
"messages": []
}
Command endpoint: /ticket-account-domains
The command will return the possible values for the domain property when creating a new ticket for a given support account.
Parameter | Description | Example |
---|---|---|
username | Optional, when empty will return the domains for the default reseller Account Panel support account. When a username is provided, the command will return the available domains for this particular account. | exampleuser |
curl -X POST 'https://api.suresupport.com/ticket-user' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN",
"username": "exampleuser"
}'
{
"ttl": 0,
"status": true,
"data": {
"user": {
"name": "Jane Doe",
"email": "user@example.com",
"username": "exampleuser"
}
},
"messages": []
}
Command endpoint: /ticket-user
Get the details of a support user.
Parameter | Type | Required | Description |
---|---|---|---|
username | string | yes | Username of the support user |
Property | Description | Example |
---|---|---|
username | Username of the user | exampleuser |
name | Name of the user | Jane Doe |
Email of the user | user@example.com |
curl -X POST 'https://api.suresupport.com/ticket-auth' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN",
"username": "exampleuser",
"password": "example_password"
}'
{
"ttl": 0,
"status": true,
"data": {
"auth": true,
"user": {
"name": "Jane Doe",
"email": "user@example.com",
"username": "exampleuser"
}
},
"messages": []
}
Command endpoint: /ticket-auth
Validate login credentials of a support user.
Parameter | Type | Required | Description |
---|---|---|---|
username | string | yes | Username of the support user |
password | string | yes | Password of the support user |
Property | Description | Example |
---|---|---|
auth | Boolean, set to true when login credentials are correct | true|false |
User details | ||
username | Username of the user | exampleuser |
name | Name of the user | Jane Doe |
Email of the user | user@example.com |
The Video conference commands allow you to create video conference rooms under your account.
All Video conference commands require a reseller-level API Token, they will not work with store level API authentication.
curl -X POST 'https://api.suresupport.com/video-list-locations' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
}'
{
"ttl": 0,
"status": true,
"data": {
"meet-us.icdsoft.com": {
"datacenter": "centurylink",
"domain": "ICDSoft.com"
},
"meet-us.suresupport.com": {
"datacenter": "centurylink",
"domain": "SureSupport.com"
},
"meet-bg.suresupport.com": {
"datacenter": "neterra",
"domain": "SureSupport.com"
},
"meet-bg.icdsoft.com": {
"datacenter": "neterra",
"domain": "ICDSoft.com"
},
"meet-hk.icdsoft.com": {
"datacenter": "iadvantage",
"domain": "ICDSoft.com"
},
"meet-hk.suresupport.com": {
"datacenter": "iadvantage",
"domain": "SureSupport.com"
}
},
"messages": []
}
Command endpoint: /video-list-locations
Get a list of available video conference server locations
curl -X POST 'https://api.suresupport.com/video-create-room' -H 'Content-Type: application/json' -k -g -d \
'{
"auth_token": "API_TOKEN"
"location": "meet-us.suresupport.com",
"room": "my-room25"
}'
{
"ttl": 0,
"status": true,
"data": "https:\/\/meet-us.suresupport.com\/21\/my-room25?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb250ZXh0Ijp7InVzZXIiOnsibmFtZSI6IiIsImVtYWlsIjoiIiwiaWQiOiIifSwiZ3JvdXAiOiJyY3A6YWNjb3",
"messages": []
}
Command endpoint: /video-create-room
Create a new video conference room
Parameter | Description | Example |
---|---|---|
location | Required, see List Video Conferences | meet-us.suresupport.com |
room | Required, name for the new room, max allowed characters: 80, allowed characters A-Z, 0-9 and underscore | my-room25 |
Property | Description |
---|---|
data | Contains the URL for the created room |