tor

Introduction

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

Authentication

CURL EXAMPLE

# 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 noncets, and signature parameters.

PHP example for HMAC request signature


<?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;
}

Request and Response formats

CURL EXAMPLE

# 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"
}'

RESPONSE EXAMPLE

{
    "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.

Response 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.

 

Common parameters

CURL EXAMPLE

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"
}'

RESPONSE EXAMPLE

{
    "ttl": 0,
    "status": true,
    "data": {
        "order_by": {
            "account_id": "asc"
        },
        "limit": 100,
        "page": 2,
        "count": "1",
        "pages": 1,
        "data": [
            ..........................
        ]
    },
    "messages": []
}

Authentication parameters

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

General parameters

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


Common Request parameters for List commands

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']

Common Response parameters of List commands

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


Filtering results

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.

Sorting results

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

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.

Hosting accounts

Hosting account list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/account-list' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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. 

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

List of supported relations.

A relation can be included by adding a with parameter to the request payload.

Example with a relation and 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"
    },
    "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.

Response

{
    "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": []
}

Hosting account details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/account-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "account_id": "81314",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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. 

Request parameters

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

Hosting account object properties

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
email E-mail 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

Hosting account enums

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/account-enums' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Demo CP

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/democp-url' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Domains

Domain list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/domain-list' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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

List of supported relations.

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

Domain details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/domain-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "domain_id": "121475",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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:

Request 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.

 

Domain object properties

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

CURL EXAMPLE

# 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"
}'

RESPONSE EXAMPLE

{
    "ttl": 0,
    "status": true,
    "data": {
        "domain": "example.com",
        "available": 1,
        "transfer": 0,
        "offered": 1,
        "icann": 1,
        "epp": 1,
        "hosted": 0
    },
    "messages": []
}

Command: /domain-check

Check if a domain name is available for registration. It can be called with domain or sld & tld. One of them is required.

Request parameters

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

Response

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.

 

Parse domain tld/sld

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/domain-tldsld' -H 'Content-Type: application/json' -k -g -d \
'{
    "hostname": "example.com",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "ttl": 0,
    "status": true,
    "data": {
        "tld": "com",
        "sld": "example"
    },
    "messages": []
}

Get domain TLD and SLD parts

Command: /domain-tldsld

Get the SLD and TLD parts of a domain name.

Request parameters

Parameter Type Required Description
hostname String Required Hostname to parse, e.g example.com, 

Reponse

Propery Description
tld Top level domain
sld Second level domain

Certificates

Certificate list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/certificate-list' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

List of supported relations

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

Certificate details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/certificate-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "certificate_id": "2023",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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. 

Request parameters

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

Certificate object properties

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

Get approver e-mails

CURL EXAMPLE

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"
}'

RESPONSE EXAMPLE

{
    "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.

Request parameters

Parameter Type Required Descritpion
hostname String yes Certificate common name / hostname

Response properties

Property Description
emails Array of possible approver email addresses

Resources

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.

Resource list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/resource-list' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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

List of supported relations

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

Resource details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/resource-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "id": "139953",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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

Request parameters

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.

Resource object properties

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

Clients

Client list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/client-list' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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
email !, =, like%, %like%     String filter[email:like%]=example
organization !, =, like%, %like%     String filter[organization:like%]=example

List of supported relations

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

Client details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/client-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "id": "74898",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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

Request parameters

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

Client object properties

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
email Email 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  

Advanced services

Advanced services list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/service-list' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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

List of supported relations

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

Advanced services details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/service-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "id": "12",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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. 

Request parameters

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

Service object properties

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

Enums

Countries

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/countries' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Country object properties

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

Datacenters

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/datacenters' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Data center object properties

Property Description Example
name Data center name in English USA
country_iso2 Data center country US
sku Data center sku centurylink

Top level domains

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/tlds' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

TLD (top-level domain) object properties

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

Extra attributes property

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, hiddencheckboxtext. 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

 

Currency rates

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/currencyrates' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Supported currencies:

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

 

Stores

Store list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/store-list' -H 'Content-Type: application/json' -k -g -d '{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Store details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/store-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "id": "593",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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. 

Request parameters

Parameter Type Required Description
id Integer yes id of the store

Store object properties

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

Products

Products list

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/product-list' -H 'Content-Type: application/json' -k -g -d '{
   "with": [
         "resources"
    ],
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

List of supported relations

A relation can be included by adding a with parameter to the request payload.

Relation Description
resources Product resources

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

Product details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/product-details' -H 'Content-Type: application/json' -k -g -d '{
    "product_id": "1",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Request parameters

Parameter Type Required Description
product_id Integer yes id of the product

Product object properties

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

Catalog

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/catalog' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.  

Request parameters

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.

Response structure

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.

Catalog structure

Т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.

Catalog node properties

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

Prices property structure

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.

Packages property structure

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.

Support Tickets

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.

Tickets list

CURL EXAMPLE

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"
}'

RESPONSE EXAMPLE

{
    "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 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 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

Ticket details

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/ticket-details' -H 'Content-Type: application/json' -k -g -d \
'{
    "id": "935470",
    "auth_token": “API_TOKEN“
}'

RESPONSE EXAMPLE

{
    "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.

Request parameters

Parameter Type Required Description
id Integer yes Ticket object id

Ticket object properties

Property Description Example
id Ticket object id 923811
status Ticket status, possible values: answered, 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

Ticket Message object properties

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
email 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  

Message Attachment object properties

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

 

Download an attachment

CURL EXAMPLE

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"
}'

RESPONSE EXAMPLE

{
    "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.

Request parameters

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.  

Create a new ticket

CURL EXAMPLE

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"
}'

RESPONSE EXAMPLE

{
    "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.

Request parameters

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

Attachments required parameters

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.  

 

Response data

Property Description
id New ticket object id

Reply to a ticket

CURL EXAMPLE

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"
}'

RESPONSE EXAMPLE

{
    "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.

Request parameters

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

Response parameters

Parameter Description Example
id The id of the created message in the ticket thread 12345

Support accounts

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/ticket-account-list' -H 'Content-Type: application/json' -k -g -d \
'{
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Ticket domains

CURL EXAMPLE

curl -X POST 'https://api.suresupport.com/ticket-account-domains' -H 'Content-Type: application/json' -k -g -d \
'{
    "username": "exampleusername",
    "auth_token": "API_TOKEN"
}'

RESPONSE EXAMPLE

{
    "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.

Request parameters

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