NAV
Snel.com
bash php python

Introduction

Our HTTP REST API allows you to manage vital details of your account and services in client portal. JSON is used for all API returns

Use left menu to browse trough available methods, use right menu to check required parameters, data to post and code samples in various languages.

Authentication

To authorize, use this code:

# With bash, you can just pass the correct header with each request
                curl 'https://my.snel.com/api' \
                  -u "username:passowrd"
                
//We recommend to use Requests library available at https://github.com/rmccue/Requests
                require_once 'Requests.php';
                Requests::register_autoloader();

                $resp = Requests::get('https://my.snel.com/api/details', array(), array(
                    'auth' => array('username', 'passowrd')
                ));
                
# python requests module will handle basic authentication if provided with auth parameter
                import requests

                req = requests.get('https://my.snel.com/api/details', auth=('username', 'passowrd'))
                

Make sure to replace username and password with your client area details.

This API uses Basic HTTP Authentication.

To authenticate with API with your client area access details (email address as username and your client area password).

All API calls requires authentication, API expects for the auth to be included in a header that looks like the following:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

Clientarea

User Details

Return registration details for my account

curl "https://my.snel.com/api/details" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/details', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/details', auth=auth)
print(req.json())
Example Response:
{
    "client": {
        "id": "26",
        "email": "api@example.com",
        "lastlogin": "2016-12-30 12:24:28",
        "ip": "172.100.2.1",
        "host": "hostname",
        "firstname": "Joe",
        "lastname": "Doe",
        "companyname": "",
        "address1": "Pretty View Lane",
        "address2": "3294",
        "city": "Santa Rosa",
        "state": "California",
        "postcode": "95401",
        "country": "US",
        "phonenumber": "+1.24123123"
    }
}

HTTP Request

GET /details

Update User Details

Update registration details under my account

curl "https://my.snel.com/api/details" \
   -u user:pass \
   -d firstname="firstnameValue"\
   -d vateu="vateuValue"\
   -d lastname="lastnameValue"\
   -d phonenumber="phonenumberValue"\
   -d email="emailValue"\
   -d address1="address1Value"\
   -d companyname="companynameValue"\
   -d address2="address2Value"\
   -d city="cityValue"\
   -d state="stateValue"\
   -d postcode="postcodeValue"\
   -d country="countryValue"\
   -d type="typeValue"\
   -d 2faenable="2faenableValue"\
   -d 2fasecret="2fasecretValue"
$data = array(
    'firstname' => 'firstnameValue',
    'vateu' => 'vateuValue',
    'lastname' => 'lastnameValue',
    'phonenumber' => 'phonenumberValue',
    'email' => 'emailValue',
    'address1' => 'address1Value',
    'companyname' => 'companynameValue',
    'address2' => 'address2Value',
    'city' => 'cityValue',
    'state' => 'stateValue',
    'postcode' => 'postcodeValue',
    'country' => 'countryValue',
    'type' => 'typeValue',
    '2faenable' => '2faenableValue',
    '2fasecret' => '2fasecretValue'
);
$resp = Requests::put('https://my.snel.com/api/details', array(), $data, $options);
echo $resp->body;
payload = {
    'firstname' : 'firstnameValue',
    'vateu' : 'vateuValue',
    'lastname' : 'lastnameValue',
    'phonenumber' : 'phonenumberValue',
    'email' : 'emailValue',
    'address1' : 'address1Value',
    'companyname' : 'companynameValue',
    'address2' : 'address2Value',
    'city' : 'cityValue',
    'state' : 'stateValue',
    'postcode' : 'postcodeValue',
    'country' : 'countryValue',
    'type' : 'typeValue',
    '2faenable' : '2faenableValue',
    '2fasecret' : '2fasecretValue'
}
req = requests.put('https://my.snel.com/api/details', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "client": {
        "id": "26",
        "email": "api@example.com",
        "lastlogin": "2016-12-30 12:34:20",
        "ip": "172.100.2.1",
        "host": "hostname",
        "firstname": "Joe",
        "lastname": "Doe",
        "companyname": "",
        "address1": "Pretty View Lane",
        "address2": "3194",
        "city": "Santa Rosa",
        "state": "California",
        "postcode": "95401",
        "country": "US",
        "phonenumber": "+1.24123123"
    },
    "info": [
        "client_info_updated"
    ]
}

HTTP Request

PUT /details

Query Parameters

Parameter Type Description
firstname string First Name
vateu string VAT ID
lastname string Last Name - afwf awf
phonenumber string Phone
email string Email Address
address1 string Address 1 - Example description
companyname string Organization
address2 string Address 2
city string City
state string State
postcode string Post code
country string Country
type string Account Type
2faenable string Two-Factor Authentication
2fasecret string Two-Factor Secret - If Two-Factor is enabled, enter 16-chars (letters/digits) secret code to use in Google Authenticator App.

List contacts

Return a list of contacts on this account

curl "https://my.snel.com/api/contact" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/contact', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/contact', auth=auth)
print(req.json())
Example Response:
{
    "contacts": [
        {
            "email": "mary@example.com",
            "id": "49",
            "firstname": "Mary",
            "lastname": "Sue",
            "companyname": "",
            "company": "0",
            "lastlogin": "0000-00-00 00:00:00"
        }
    ]
}

HTTP Request

GET /contact

Query Parameters

Parameter Type Description
number int Ticket number

Add contact

Create new contact account, if password is provided you can use provided email addres to login as that contact.

curl "https://my.snel.com/api/contact" \
   -u user:pass \
   -d firstname="firstnameValue"\
   -d vateu="vateuValue"\
   -d lastname="lastnameValue"\
   -d phonenumber="phonenumberValue"\
   -d email="emailValue"\
   -d address1="address1Value"\
   -d companyname="companynameValue"\
   -d address2="address2Value"\
   -d city="cityValue"\
   -d state="stateValue"\
   -d postcode="postcodeValue"\
   -d country="countryValue"\
   -d type="typeValue"\
   -d 2faenable="2faenableValue"\
   -d 2fasecret="2fasecretValue"\
   -d password="passwordValue"
$data = array(
    'firstname' => 'firstnameValue',
    'vateu' => 'vateuValue',
    'lastname' => 'lastnameValue',
    'phonenumber' => 'phonenumberValue',
    'email' => 'emailValue',
    'address1' => 'address1Value',
    'companyname' => 'companynameValue',
    'address2' => 'address2Value',
    'city' => 'cityValue',
    'state' => 'stateValue',
    'postcode' => 'postcodeValue',
    'country' => 'countryValue',
    'type' => 'typeValue',
    '2faenable' => '2faenableValue',
    '2fasecret' => '2fasecretValue',
    'password' => 'passwordValue'
);
$resp = Requests::post('https://my.snel.com/api/contact', array(), $data, $options);
echo $resp->body;
payload = {
    'firstname' : 'firstnameValue',
    'vateu' : 'vateuValue',
    'lastname' : 'lastnameValue',
    'phonenumber' : 'phonenumberValue',
    'email' : 'emailValue',
    'address1' : 'address1Value',
    'companyname' : 'companynameValue',
    'address2' : 'address2Value',
    'city' : 'cityValue',
    'state' : 'stateValue',
    'postcode' : 'postcodeValue',
    'country' : 'countryValue',
    'type' : 'typeValue',
    '2faenable' : '2faenableValue',
    '2fasecret' : '2fasecretValue',
    'password' : 'passwordValue'
}
req = requests.post('https://my.snel.com/api/contact', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "info": [
        "profile_added"
    ]
}

HTTP Request

POST /contact

Query Parameters

Parameter Type Description
firstname string First Name
vateu string VAT ID
lastname string Last Name - afwf awf
phonenumber string Phone
email string Email Address
address1 string Address 1 - Example description
companyname string Organization
address2 string Address 2
city string City
state string State
postcode string Post code
country string Country
type string Account Type
2faenable string Two-Factor Authentication
2fasecret string Two-Factor Secret - If Two-Factor is enabled, enter 16-chars (letters/digits) secret code to use in Google Authenticator App.
password string Optional, allows you to login as contact

Get contacts details

Return array with contact details

curl "https://my.snel.com/api/contact/@id" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/contact/@id', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/contact/@id', auth=auth)
print(req.json())
Example Response:
{
    "contact": {
        "id": "49",
        "email": "mary@example.com",
        "firstname": "Mary",
        "lastname": "Sue",
        "companyname": "",
        "address1": "Pretty View Lane",
        "address2": "3194",
        "city": "Santa Rosa",
        "state": "California",
        "postcode": "95401",
        "country": "US",
        "phonenumber": "+1.24123123",
        "type": "Private"
    }
}

HTTP Request

GET /contact/@id

Query Parameters

Parameter Type Description
id int Contact ID

Edit contact

Change contact details

curl "https://my.snel.com/api/contact/@id" \
   -u user:pass \
   -d firstname="firstnameValue"\
   -d vateu="vateuValue"\
   -d lastname="lastnameValue"\
   -d phonenumber="phonenumberValue"\
   -d email="emailValue"\
   -d address1="address1Value"\
   -d companyname="companynameValue"\
   -d address2="address2Value"\
   -d city="cityValue"\
   -d state="stateValue"\
   -d postcode="postcodeValue"\
   -d country="countryValue"\
   -d type="typeValue"\
   -d 2faenable="2faenableValue"\
   -d 2fasecret="2fasecretValue"
$data = array(
    'firstname' => 'firstnameValue',
    'vateu' => 'vateuValue',
    'lastname' => 'lastnameValue',
    'phonenumber' => 'phonenumberValue',
    'email' => 'emailValue',
    'address1' => 'address1Value',
    'companyname' => 'companynameValue',
    'address2' => 'address2Value',
    'city' => 'cityValue',
    'state' => 'stateValue',
    'postcode' => 'postcodeValue',
    'country' => 'countryValue',
    'type' => 'typeValue',
    '2faenable' => '2faenableValue',
    '2fasecret' => '2fasecretValue'
);
$resp = Requests::put('https://my.snel.com/api/contact/@id', array(), $data, $options);
echo $resp->body;
payload = {
    'firstname' : 'firstnameValue',
    'vateu' : 'vateuValue',
    'lastname' : 'lastnameValue',
    'phonenumber' : 'phonenumberValue',
    'email' : 'emailValue',
    'address1' : 'address1Value',
    'companyname' : 'companynameValue',
    'address2' : 'address2Value',
    'city' : 'cityValue',
    'state' : 'stateValue',
    'postcode' : 'postcodeValue',
    'country' : 'countryValue',
    'type' : 'typeValue',
    '2faenable' : '2faenableValue',
    '2fasecret' : '2fasecretValue'
}
req = requests.put('https://my.snel.com/api/contact/@id', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "info": [
        "profile_updated"
    ]
}

HTTP Request

PUT /contact/@id

Query Parameters

Parameter Type Description
id int
firstname string First Name
vateu string VAT ID
lastname string Last Name - afwf awf
phonenumber string Phone
email string Email Address
address1 string Address 1 - Example description
companyname string Organization
address2 string Address 2
city string City
state string State
postcode string Post code
country string Country
type string Account Type
2faenable string Two-Factor Authentication
2fasecret string Two-Factor Secret - If Two-Factor is enabled, enter 16-chars (letters/digits) secret code to use in Google Authenticator App.

Billing

Account balance

Get current account balance(unpaid invoices total), account credit

curl "https://my.snel.com/api/balance" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/balance', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/balance', auth=auth)
print(req.json())
Example Response:
{
    "details": {
        "acc_balance": 0,
        "acc_credit": "0.00"
    }
}

HTTP Request

GET /balance

List Invoices

List all invoices under my account

curl "https://my.snel.com/api/invoice" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/invoice', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/invoice', auth=auth)
print(req.json())
Example Response:
{
    "invoices": [
        {
            "id": "308976",
            "date": "2016-12-30",
            "dateorig": "2016-12-30",
            "duedate": "2017-01-06",
            "paybefore": "2017-01-06",
            "total": "19.65",
            "datepaid": "2016-12-30 12:40:47",
            "status": "Paid",
            "merge_id": null,
            "number": "2016\/12\/1",
            "currency": "USD"
        }
    ]
}

HTTP Request

GET /invoice

Invoice Details

Get invoice details

curl "https://my.snel.com/api/invoice/@id" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/invoice/@id', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/invoice/@id', auth=auth)
print(req.json())
Example Response:
{
    "invoice": {
        "id": "308976",
        "status": "Paid",
        "date": "2016-12-30",
        "duedate": "2017-01-06",
        "paybefore": "2017-01-06",
        "datepaid": "2016-12-30 12:40:47",
        "subtotal": 16.24,
        "credit": 0,
        "tax": 3.41,
        "taxrate": 21,
        "tax2": 0,
        "taxrate2": 0,
        "taxexempt": "0",
        "total": 19.65,
        "rate": 1,
        "rate2": 0,
        "rate3": 1,
        "notes": "",
        "items": [
            {
                "id": "12305",
                "invoice_id": "308976",
                "type": "Other",
                "item_id": "0",
                "description": "Example Service",
                "amount": "15.00",
                "taxed": "1",
                "qty": "1.00",
                "linetotal": "15.00"
            },
            {
                "id": "12309",
                "invoice_id": "308976",
                "type": "Other",
                "item_id": "-2",
                "description": "PayPal Payment Fee",
                "amount": "1.24",
                "taxed": "1",
                "qty": "1.00",
                "linetotal": "1.24"
            }
        ],
        "client": {
            "id": "26",
            "email": "api@example.com",
            "firstname": "Joe",
            "lastname": "Doe",
            "companyname": "",
            "address1": "Pretty View Lane",
            "address2": "3194",
            "city": "Santa Rosa",
            "state": "California",
            "postcode": "95401",
            "country": "US",
            "phonenumber": "+1.24123123"
        },
        "number": "2016\/12\/1",
        "currency": "USD"
    }
}

HTTP Request

GET /invoice/@id

Query Parameters

Parameter Type Description
id int

Payment Methods

List available payment methods

curl "https://my.snel.com/api/payment" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/payment', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/payment', auth=auth)
print(req.json())
Example Response:
{
    "payments": {
        "10": "BankTransfer",
        "9": "PayPal"
    }
}

HTTP Request

GET /payment

Support

List Tickets

List support tickets under my account

curl "https://my.snel.com/api/tickets" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/tickets', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/tickets', auth=auth)
print(req.json())
Example Response:
{
    "tickets": [
        {
            "client_read": "1",
            "ticket_number": "736633",
            "date": "2016-12-30 12:48:13",
            "deptname": "Billing",
            "subject": "Lore Ipsum",
            "status": "Open"
        }
    ]
}

HTTP Request

GET /tickets

Ticket details

Get ticket details, including all replies

curl "https://my.snel.com/api/tickets/@number" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/tickets/@number', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/tickets/@number', auth=auth)
print(req.json())
Example Response:
{
    "ticket": {
        "date": "2016-12-30 12:48:13",
        "ticket_number": "736633",
        "name": "Joe Doe",
        "email": "api@example.com",
        "subject": "Lore Ipsum",
        "body": "Donec sollicitudin molestie malesuada. \r\nSed porttitor lectus nibh. Vivamus magna justo, \r\nlacinia eget consectetur sed, convallis at tellus.",
        "status": "Answered",
        "client_read": "1",
        "deptname": "Billing"
    },
    "replies": [
        {
            "id": "929",
            "name": "Suppport Staff",
            "date": "2016-12-30 12:51:04",
            "body": "Vestibulum ac diam sit amet quam \r\nvehicula elementum sed sit amet dui. \r\nPraesent sapien massa\r\n\r\n-- Maecenas efficitur elit est --",
            "status": "Sent",
            "type": "Admin"
        }
    ]
}

HTTP Request

GET /tickets/@number

Query Parameters

Parameter Type Description
number int Ticket number

Domains

List Domains

List domains under your account

curl "https://my.snel.com/api/domain" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/domain', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/domain', auth=auth)
print(req.json())
Example Response:
{
    "domains": [
        {
            "id": "47",
            "name": "testname.com",
            "expires": "2017-12-30",
            "recurring_amount": "15.00",
            "date_created": "2016-12-30",
            "status": "Active",
            "period": "1",
            "autorenew": "1",
            "daytoexpire": "365"
        }
    ]
}

HTTP Request

GET /domain

Domain details

Get domain details

curl "https://my.snel.com/api/domain/@id" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/domain/@id', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/domain/@id', auth=auth)
print(req.json())
Example Response:
{
    "details": {
        "id": "47",
        "name": "testname.com",
        "date_created": "2016-12-30",
        "firstpayment": "10.00",
        "recurring_amount": "15.00",
        "period": "1",
        "expires": "2017-12-30",
        "status": "Active",
        "next_due": "2017-12-30",
        "next_invoice": "2017-11-30",
        "idprotection": "0",
        "nameservers": [
            "ns1.example.com",
            "ns2.example.com",
            "ns3.example.com",
            "ns4.example.com"
        ],
        "autorenew": "1"
    }
}

HTTP Request

GET /domain/@id

Query Parameters

Parameter Type Description
id int Domain id

Update domain nameservers

Change domain nameservers, if $nameservers is left empty, default namesevers will be used

curl "https://my.snel.com/api/domain/@id/ns" \
   -u user:pass \
   -d nameservers[key]="nameserversValue"
$data = array(
    'nameservers' => array('key'=>'value')
);
$resp = Requests::put('https://my.snel.com/api/domain/@id/ns', array(), $data, $options);
echo $resp->body;
payload = {
    'nameservers' : {'key':'value'}
}
req = requests.put('https://my.snel.com/api/domain/@id/ns', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "info": [
        "success_changes_save"
    ]
}

HTTP Request

PUT /domain/@id/ns

Query Parameters

Parameter Type Description
id int Domain id
nameservers array List of nameservers to use

DNS Records

List DNS records

curl "https://my.snel.com/api/domain/@id/dns" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/domain/@id/dns', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/domain/@id/dns', auth=auth)
print(req.json())
Example Response:
{
    "records": [
        {
            "id": 1,
            "name": "test",
            "ttl": 0,
            "priority": 0,
            "type": "A",
            "content": "100.100.10.1"
        }
    ]
}

HTTP Request

GET /domain/@id/dns

Query Parameters

Parameter Type Description
id int Domain id

Create DNS Records

Add a new DNS record

curl "https://my.snel.com/api/domain/@id/dns" \
   -u user:pass \
   -d name="nameValue"\
   -d type="typeValue"\
   -d priority="priorityValue"\
   -d content="contentValue"
$data = array(
    'name' => 'nameValue',
    'type' => 'typeValue',
    'priority' => 'priorityValue',
    'content' => 'contentValue'
);
$resp = Requests::post('https://my.snel.com/api/domain/@id/dns', array(), $data, $options);
echo $resp->body;
payload = {
    'name' : 'nameValue',
    'type' : 'typeValue',
    'priority' : 'priorityValue',
    'content' : 'contentValue'
}
req = requests.post('https://my.snel.com/api/domain/@id/dns', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "info": [
        "DNS Management updated successfully"
    ]
}

HTTP Request

POST /domain/@id/dns

Query Parameters

Parameter Type Description
id int Domain id
name string Reord name
type string Reord type
priority string Reord priority
content string Reord content eg. IP addres for A records

Update DNS Records

Change a DNS record

curl "https://my.snel.com/api/domain/@id/dns/@index" \
   -u user:pass \
   -d name="nameValue"\
   -d type="typeValue"\
   -d priority="priorityValue"\
   -d content="contentValue"
$data = array(
    'name' => 'nameValue',
    'type' => 'typeValue',
    'priority' => 'priorityValue',
    'content' => 'contentValue'
);
$resp = Requests::put('https://my.snel.com/api/domain/@id/dns/@index', array(), $data, $options);
echo $resp->body;
payload = {
    'name' : 'nameValue',
    'type' : 'typeValue',
    'priority' : 'priorityValue',
    'content' : 'contentValue'
}
req = requests.put('https://my.snel.com/api/domain/@id/dns/@index', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "info": [
        "DNS Management updated successfully"
    ]
}

HTTP Request

PUT /domain/@id/dns/@index

Query Parameters

Parameter Type Description
id int Domain id
record_id int Recod index
name string Reord name
type string Reord type
priority string Reord priority
content string Reord content eg. IP addres for A records

Remove DNS Records

Remove a DNS record

curl "https://my.snel.com/api/domain/@id/dns/@index" \
   -u user:pass 
$resp = Requests::delete('https://my.snel.com/api/domain/@id/dns/@index', array(), $options);
echo $resp->body;
req = requests.delete('https://my.snel.com/api/domain/@id/dns/@index', auth=auth)
print(req.json())
Example Response:
{
    "info": [
        "DNS Management updated successfully"
    ]
}

HTTP Request

DELETE /domain/@id/dns/@index

Query Parameters

Parameter Type Description
id int Domain id
record_id int Recod index

DNS Records Types

List supported records type

curl "https://my.snel.com/api/domain/@id/dns/types" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/domain/@id/dns/types', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/domain/@id/dns/types', auth=auth)
print(req.json())
Example Response:
{
    "types": [
        "A",
        "CNAME",
        "URL",
        "FRAME",
        "MX",
        "MXE",
        "TXT"
    ]
}

HTTP Request

GET /domain/@id/dns/types

Query Parameters

Parameter Type Description
id int Domain id

Domain availability

Check if domain is available for registration. Returns status: "ok" if domain is available, empty response otherwise

curl "https://my.snel.com/api/domain/lookup" \
   -u user:pass \
   -d name="nameValue"
$data = array(
    'name' => 'nameValue'
);
$resp = Requests::post('https://my.snel.com/api/domain/lookup', array(), $data, $options);
echo $resp->body;
payload = {
    'name' : 'nameValue'
}
req = requests.post('https://my.snel.com/api/domain/lookup', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "available": false,
    "periods": [
        {
            "id": "6",
            "period": "1",
            "register": "10.00",
            "transfer": "0.00",
            "renew": "15.00"
        },
        {
            "id": "6",
            "period": "2",
            "register": "20.00",
            "transfer": "20.00",
            "renew": "20.00"
        }
    ]
}

HTTP Request

POST /domain/lookup

Query Parameters

Parameter Type Description
name string Domain name, ie. example.com

Available TLDs

List TLDs available for registration and transfer

curl "https://my.snel.com/api/domain/order" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/domain/order', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/domain/order', auth=auth)
print(req.json())
Example Response:
{
    "tlds": [
        {
            "id": "6",
            "tld": ".com",
            "periods": [
                {
                    "period": "1",
                    "register": "10.00",
                    "transfer": "0.00",
                    "renew": "15.00"
                },
                {
                    "period": "2",
                    "register": "20.00",
                    "transfer": "20.00",
                    "renew": "30.00"
                }
            ]
        },
        (...)
    ]
}

HTTP Request

GET /domain/order

Additinal data for TLD

Get additional forms required for some TLDs

curl "https://my.snel.com/api/domain/order/@id/form" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/domain/order/@id/form', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/domain/order/@id/form', auth=auth)
print(req.json())
Example Response:
{
    "forms": [
        {
            "type": "domaindnssupport",
            "title": "DNS Management",
            "id": "1424",
            "firstItemId": 9067,
            "description": "",
            "name": "custom[1424][9067]",
            "required": false,
            "multiple": false,
            "config": {
                "enableddefault": 0
            },
            "value": [],
            "textvalue": [],
            "price": 0,
            "recurring_price": 0,
            "setup": 0,
            "prorata_date": null,
            "items": [
                {
                    "title": "",
                    "value": 1,
                    "id": 9067,
                    "price": 4,
                    "setup": 0,
                    "selected": false
                }
            ]
        },
        {
            "type": "select",
            "title": "Language",
            "id": "1755",
            "firstItemId": 10952,
            "description": "",
            "name": "custom[1755]",
            "required": false,
            "multiple": false,
            "config": {
                "conditionals": []
            },
            "value": [],
            "textvalue": [],
            "price": 0,
            "recurring_price": 0,
            "setup": 0,
            "prorata_date": null,
            "items": [
                {
                    "title": "AFR",
                    "value": 1,
                    "id": 10952,
                    "price": 0,
                    "setup": 0,
                    "selected": false
                },
                {
                    "title": "ALB",
                    "value": 1,
                    "id": 10953,
                    "price": 0,
                    "setup": 0,
                    "selected": false
                },
                (...)
            ]
        }
    ]
}

HTTP Request

GET /domain/order/@id/form

Query Parameters

Parameter Type Description
tld_id int TLD ID

Order new domain

Create new order for a domain, please check if requested domain is available first, otherwise your order may get cancelled.

curl "https://my.snel.com/api/domain/order" \
   -u user:pass \
   -d name="nameValue"\
   -d years="yearsValue"\
   -d action="actionValue"\
   -d tld_id="tld_idValue"\
   -d pay_method="pay_methodValue"\
   -d epp="eppValue"\
   -d nameservers[key]="nameserversValue"\
   -d registrant="registrantValue"\
   -d admin="adminValue"\
   -d tech="techValue"\
   -d billing="billingValue"\
   -d data[key]="dataValue"
$data = array(
    'name' => 'nameValue',
    'years' => 'yearsValue',
    'action' => 'actionValue',
    'tld_id' => 'tld_idValue',
    'pay_method' => 'pay_methodValue',
    'epp' => 'eppValue',
    'nameservers' => array('key'=>'value'),
    'registrant' => 'registrantValue',
    'admin' => 'adminValue',
    'tech' => 'techValue',
    'billing' => 'billingValue',
    'data' => array('key'=>'value')
);
$resp = Requests::post('https://my.snel.com/api/domain/order', array(), $data, $options);
echo $resp->body;
payload = {
    'name' : 'nameValue',
    'years' : 'yearsValue',
    'action' : 'actionValue',
    'tld_id' : 'tld_idValue',
    'pay_method' : 'pay_methodValue',
    'epp' : 'eppValue',
    'nameservers' : {'key':'value'},
    'registrant' : 'registrantValue',
    'admin' : 'adminValue',
    'tech' : 'techValue',
    'billing' : 'billingValue',
    'data' : {'key':'value'}
}
req = requests.post('https://my.snel.com/api/domain/order', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "order_num": 563647679,
    "invoice_id": "308977",
    "total": "10.00"
}

HTTP Request

POST /domain/order

Query Parameters

Parameter Type Description
name string Domain name, ie. example.com
years string Number of years
action string register|transfer
tld_id string TLD id
pay_method int Payment method ID
epp string EPP Transfer code, required when transfering some domains
nameservers array Optional array with 2 - 4 nameservers that you want to use
registrant int Optional contact ID to use for registrant contact this domain
admin int Optional contact ID to use for admin contact this domain
tech int Optional contact ID to use for tech contact this domain
billing int Optional contact ID to use for billing contact this domain
data array Addditional data required for some TLDs

SSL Certificates

List SSL Certificates

List all ssl services under your account

curl "https://my.snel.com/api/certificate" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/certificate', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/certificate', auth=auth)
print(req.json())
Example Response:
{
    "sslservices": [
        {
            "id": "300",
            "domain": "examplename.com",
            "total": "27.85",
            "status": "Pending",
            "billingcycle": "Annually",
            "next_due": "2017-12-30",
            "category": "GoGetSSL",
            "category_url": "gogetssl",
            "name": "Comodo InstantSSL",
            "cert_email": "admin@example.com",
            "cert_status": "",
            "cert_expires": "2017-12-30 13:43:12"
        }
    ]
}

HTTP Request

GET /certificate

Certificate details

Return details for certificate @id

curl "https://my.snel.com/api/certificate/@id" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/certificate/@id', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/certificate/@id', auth=auth)
print(req.json())
Example Response:
{
    "service": {
        "id": "300",
        "date_created": "2016-12-30",
        "domain": "examplename.com",
        "firstpayment": "27.85",
        "total": "27.85",
        "billingcycle": "Annually",
        "next_due": "2017-12-30",
        "next_invoice": "2017-10-31",
        "status": "Pending",
        "label": "",
        "name": "Comodo InstantSSL",
        "cert_status": "",
        "cert_expires": "2017-12-30 13:43:12",
        "csr": "-----BEGIN CERTIFICATE REQUEST----- ...",
        "contacts": {
            "admin": {
                "FName": "Mary",
                "LName": "Sue",
                "City": "Santa Rosa",
                "State": "California",
                "PostalCode": "95401",
                "EmailAddress": "mary@example.com",
                "Country": "US",
                "Address1": "Pretty View Lane",
                "Address2": "3194",
                "Phone": 24123223,
                "OrgName": "n\/a",
                "PreFix": 1,
                "JobTitle": "n\/a"
            },
            "billing": {
                (...)
            },
            "tech": {
                (...)
            }
        },
        "organization": {
            "state": "Texas",
            "country": "US",
            "name": "My Org name",
            "unit": "Dev",
            "locality": "SanAntonio",
            "postalcode": "n\/a",
            "address2": "n\/a",
            "address1": "n\/a",
        },
        "cert_email": "admin@example.com",
        "software": "1"
    }
}

HTTP Request

GET /certificate/@id

Query Parameters

Parameter Type Description
id int Service id

Download certificate

Return X.509 certificate data

curl "https://my.snel.com/api/certificate/@id/crt" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/certificate/@id/crt', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/certificate/@id/crt', auth=auth)
print(req.json())

HTTP Request

GET /certificate/@id/crt

Query Parameters

Parameter Type Description
id int Service id

Download CA Bundle

Return a bundle of X.509 certificates

curl "https://my.snel.com/api/certificate/@id/ca" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/certificate/@id/ca', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/certificate/@id/ca', auth=auth)
print(req.json())

HTTP Request

GET /certificate/@id/ca

Query Parameters

Parameter Type Description
id int Service id

List available certificates

Return a list with certificate available for purchase

curl "https://my.snel.com/api/certificate/order" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/certificate/order', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/certificate/order', auth=auth)
print(req.json())
Example Response:
{
    "products": [
        {
            "id": "25",
            "name": "InstantSSL",
            "description": "",
            "periods": [
                {
                    "years": 1,
                    "price": 27.85,
                    "renew": 27.85
                },
                {
                    "years": 2,
                    "price": 48.75,
                    "renew": 48.75
                }
            ],
            "category": "SSL Certificates",
            "category_url": "sslcertificates"
        },
        (...)
    ]
}

HTTP Request

GET /certificate/order

List server software for certificates

Return a list with software IDs required or certificate

curl "https://my.snel.com/api/certificate/order/@product_id/software" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/certificate/order/@product_id/software', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/certificate/order/@product_id/software', auth=auth)
print(req.json())
Example Response:
{
    "software": [
        {
            "id": 0,
            "name": "AOL"
        },
        {
            "id": 1,
            "name": "Apache-SSL (Ben-SSL, not Stronghold)"
        },
        (...)
    ]
}

HTTP Request

GET /certificate/order/@product_id/software

Query Parameters

Parameter Type Description
product_id int Certificate product ID

Order new certificates

Create new order for a certificate

curl "https://my.snel.com/api/certificate/order" \
   -u user:pass \
   -d product_id="product_idValue"\
   -d csr="csrValue"\
   -d years="yearsValue"\
   -d pay_method="pay_methodValue"\
   -d approver_email="approver_emailValue"\
   -d admin="adminValue"\
   -d tech="techValue"\
   -d billing="billingValue"\
   -d organization[key]="organizationValue"\
   -d software="softwareValue"\
   -d data[key]="dataValue"
$data = array(
    'product_id' => 'product_idValue',
    'csr' => 'csrValue',
    'years' => 'yearsValue',
    'pay_method' => 'pay_methodValue',
    'approver_email' => 'approver_emailValue',
    'admin' => 'adminValue',
    'tech' => 'techValue',
    'billing' => 'billingValue',
    'organization' => array('key'=>'value'),
    'software' => 'softwareValue',
    'data' => array('key'=>'value')
);
$resp = Requests::post('https://my.snel.com/api/certificate/order', array(), $data, $options);
echo $resp->body;
payload = {
    'product_id' : 'product_idValue',
    'csr' : 'csrValue',
    'years' : 'yearsValue',
    'pay_method' : 'pay_methodValue',
    'approver_email' : 'approver_emailValue',
    'admin' : 'adminValue',
    'tech' : 'techValue',
    'billing' : 'billingValue',
    'organization' : {'key':'value'},
    'software' : 'softwareValue',
    'data' : {'key':'value'}
}
req = requests.post('https://my.snel.com/api/certificate/order', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "order_num": 873340994,
    "invoice_id": "308978",
    "total": "27.85"
}

HTTP Request

POST /certificate/order

Query Parameters

Parameter Type Description
product_id int Certificate product ID
csr string Domain name, ie. example.com
years int Number of years
pay_method int Payment method ID
approver_email string Email addres used in domain validation
admin int Admin contact ID
tech int Tech contact ID
billing int Billing contact ID
organization array Organization details
software int Server/Software ID
data array Addditional data required for some products

Services

List services

List all services under your account

curl "https://my.snel.com/api/service" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service', auth=auth)
print(req.json())
Example Response:
{
    "services": [
        {
            "id": "301",
            "domain": "examplename.com",
            "total": "9.99",
            "status": "Pending",
            "billingcycle": "Monthly",
            "next_due": "2017-12-30",
            "category": "Hosting",
            "category_url": "hosting",
            "name": "Starter Hosting"
        }
    ]
}

HTTP Request

GET /service

Service details

Return details for service @id

curl "https://my.snel.com/api/service/@id" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id', auth=auth)
print(req.json())
Example Response:
{
    "service": {
        "id": "301",
        "date_created": "2016-12-30",
        "domain": "examplename.com",
        "firstpayment": "9.99",
        "total": "9.99",
        "billingcycle": "Monthly",
        "next_due": "2017-12-30",
        "next_invoice": "2017-01-27",
        "status": "Active",
        "label": "",
        "username": "examplen",
        "password": "pdtzc",
        "name": "Starter Hosting"
    }
}

HTTP Request

GET /service/@id

Query Parameters

Parameter Type Description
id int Service id

Upgrade Options

List upgrade options

curl "https://my.snel.com/api/service/@id/upgrade" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/upgrade', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/upgrade', auth=auth)
print(req.json())
Example Response:
{
    "resources": [
        {
            "id": 1557,
            "name": "Bandwidth",
            "type": "select",
            "items": [
                {
                    "id": "9953",
                    "name": "100 GB",
                    "price": 1,
                    "setup_price": 0,
                    "selected": true
                },
                {
                    "id": "10103",
                    "name": "500 GB",
                    "price": 5,
                    "setup_price": 0,
                    "selected": false
                },
                {
                    "id": "10104",
                    "name": "1 TB",
                    "price": 10,
                    "setup_price": 0,
                    "selected": false
                }
            ]
        }
    ],
    "package": []
}

HTTP Request

GET /service/@id/upgrade

Query Parameters

Parameter Type Description
id int

Upgrade Request

Estimate or request upgrade

// Format of ''resources'' paremeter
{
    "resource_id" : "qty_value", // sliders & qty fields
    "resource_id" : "item_id", // dropdown & radio fields
    "resource_id" : {
        "item_id": "qty_value" // dropdown with qty field
    }
}
curl "https://my.snel.com/api/service/@id/upgrade" \
   -u user:pass \
   -d resources[key]="resourcesValue"\
   -d package="packageValue"\
   -d cycle="cycleValue"\
   -d send="sendValue"
$data = array(
    'resources' => array('key'=>'value'),
    'package' => 'packageValue',
    'cycle' => 'cycleValue',
    'send' => 'sendValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/upgrade', array(), $data, $options);
echo $resp->body;
payload = {
    'resources' : {'key':'value'},
    'package' : 'packageValue',
    'cycle' : 'cycleValue',
    'send' : 'sendValue'
}
req = requests.post('https://my.snel.com/api/service/@id/upgrade', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/upgrade

Query Parameters

Parameter Type Description
id int Service id
resources array array with resource values
package int New package id, optonal when upgrading resources
cycle string New billing cycle, optonal when upgrading resources
send boolean Set to true when you want to send your upgrade request

Cancel Service

Request service cancellation

curl "https://my.snel.com/api/service/@id/cancel" \
   -u user:pass \
   -d immediate="immediateValue"\
   -d reason="reasonValue"
$data = array(
    'immediate' => 'immediateValue',
    'reason' => 'reasonValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/cancel', array(), $data, $options);
echo $resp->body;
payload = {
    'immediate' : 'immediateValue',
    'reason' : 'reasonValue'
}
req = requests.post('https://my.snel.com/api/service/@id/cancel', data=payload, auth=auth)
print(req.json())
Example Response:
{
  "info": [
    "cancell_sent"
  ]
}

HTTP Request

POST /service/@id/cancel

Query Parameters

Parameter Type Description
id int Service id
immediate string set to false to terminate service at the end of billing date, true - terminate immediately
reason string Reason for this request

IP Addresses

List Service IP Addresses

curl "https://my.snel.com/api/service/@id/ip" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/ip', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/ip', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/ip

Query Parameters

Parameter Type Description
id int Service ID

Reverse DNS

Get reverse DNS entries for service's IP addresses

curl "https://my.snel.com/api/service/@id/rdns" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/rdns', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/rdns', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/rdns

Query Parameters

Parameter Type Description
id int Service ID

Update rDNS

Update reverse DNS entries service's IP addresses

curl "https://my.snel.com/api/service/@id/rdns" \
   -u user:pass \
   -d ipaddress[key]="ipaddressValue"
$data = array(
    'ipaddress' => array('key'=>'value')
);
$resp = Requests::post('https://my.snel.com/api/service/@id/rdns', array(), $data, $options);
echo $resp->body;
payload = {
    'ipaddress' : {'key':'value'}
}
req = requests.post('https://my.snel.com/api/service/@id/rdns', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/rdns

Query Parameters

Parameter Type Description
id int Service ID
ipaddress array Use Ip address as parameter key and hostname as value

List VMs

List virtual servers

curl "https://my.snel.com/api/service/@id/vms" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms

Query Parameters

Parameter Type Description
id int

Get VM Details

Get the details of a particular virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

Create VM

Add new virtual server

curl "https://my.snel.com/api/service/@id/vms" \
   -u user:pass \
   -d label="labelValue"\
   -d template_id="template_idValue"\
   -d password="passwordValue"\
   -d memory="memoryValue"\
   -d cpu="cpuValue"\
   -d cpu_share="cpu_shareValue"\
   -d disk="diskValue"\
   -d swap="swapValue"\
   -d note="noteValue"\
   -d license_key="license_keyValue"\
   -d license_type="license_typeValue"
$data = array(
    'label' => 'labelValue',
    'template_id' => 'template_idValue',
    'password' => 'passwordValue',
    'memory' => 'memoryValue',
    'cpu' => 'cpuValue',
    'cpu_share' => 'cpu_shareValue',
    'disk' => 'diskValue',
    'swap' => 'swapValue',
    'note' => 'noteValue',
    'license_key' => 'license_keyValue',
    'license_type' => 'license_typeValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/vms', array(), $data, $options);
echo $resp->body;
payload = {
    'label' : 'labelValue',
    'template_id' : 'template_idValue',
    'password' : 'passwordValue',
    'memory' : 'memoryValue',
    'cpu' : 'cpuValue',
    'cpu_share' : 'cpu_shareValue',
    'disk' : 'diskValue',
    'swap' : 'swapValue',
    'note' : 'noteValue',
    'license_key' : 'license_keyValue',
    'license_type' : 'license_typeValue'
}
req = requests.post('https://my.snel.com/api/service/@id/vms', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/vms

Query Parameters

Parameter Type Description
id int
label string VM label
template_id string Template ID
password string Initial root password
memory string Amount of RAM memory in MB
cpu string Amount of CPU cores
cpu_share string Share percentage of CPU
disk string Disk Space in GB
swap string Swap Space in GB
note string Custom note
license_key string Type of os license: `mak`, `kms` or `own`. This parameter is required for Windows virtual machines only
license_type string The key of a license, required if you have selected own licensing type

Destroy VM

Remove virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid" \
   -u user:pass 
$resp = Requests::delete('https://my.snel.com/api/service/@id/vms/@vmid', array(), $options);
echo $resp->body;
req = requests.delete('https://my.snel.com/api/service/@id/vms/@vmid', auth=auth)
print(req.json())

HTTP Request

DELETE /service/@id/vms/@vmid

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

Resize VM

Edit a virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid" \
   -u user:pass \
   -d memory="memoryValue"\
   -d cpu="cpuValue"\
   -d cpu_share="cpu_shareValue"\
   -d note="noteValue"
$data = array(
    'memory' => 'memoryValue',
    'cpu' => 'cpuValue',
    'cpu_share' => 'cpu_shareValue',
    'note' => 'noteValue'
);
$resp = Requests::put('https://my.snel.com/api/service/@id/vms/@vmid', array(), $data, $options);
echo $resp->body;
payload = {
    'memory' : 'memoryValue',
    'cpu' : 'cpuValue',
    'cpu_share' : 'cpu_shareValue',
    'note' : 'noteValue'
}
req = requests.put('https://my.snel.com/api/service/@id/vms/@vmid', data=payload, auth=auth)
print(req.json())

HTTP Request

PUT /service/@id/vms/@vmid

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id
memory string Amount of RAM memory in MB
cpu string Amount of CPU cores
cpu_share string Share percentage of CPU
note string Custom note

Stop VM

Stop virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid/stop" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/vms/@vmid/stop', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/vms/@vmid/stop', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/stop

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

Start VM

Start virtual servers

curl "https://my.snel.com/api/service/@id/vms/@vmid/start" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/vms/@vmid/start', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/vms/@vmid/start', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/start

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

Reboot VM

Reboot virtual servers, you can optionally specify ISO image to buot from.

curl "https://my.snel.com/api/service/@id/vms/@vmid/reboot" \
   -u user:pass \
   -d iso="isoValue"
$data = array(
    'iso' => 'isoValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/vms/@vmid/reboot', array(), $data, $options);
echo $resp->body;
payload = {
    'iso' : 'isoValue'
}
req = requests.post('https://my.snel.com/api/service/@id/vms/@vmid/reboot', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/reboot

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id
iso string Optional ISO Image to boot from

VM Cpu Usage graph

Retuns html code that can be embedded in page

curl "https://my.snel.com/api/service/@id/vms/@vmid/usage/cpu" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid/usage/cpu', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid/usage/cpu', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/usage/cpu

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

VM Network Usage graph

Retuns html code that can be embedded in page

curl "https://my.snel.com/api/service/@id/vms/@vmid/usage/net" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid/usage/net', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid/usage/net', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/usage/net

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

VM Disk Usage graph

Retuns html code that can be embedded in page

curl "https://my.snel.com/api/service/@id/vms/@vmid/usage/disk" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid/usage/disk', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid/usage/disk', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/usage/disk

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

List Disks attached to VM

Get the list of disks available for a particular virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid/storage" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid/storage', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid/storage', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/storage

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

Resize Disk VM

Change disk size

curl "https://my.snel.com/api/service/@id/vms/@vmid/storage/@diskid" \
   -u user:pass \
   -d size="sizeValue"
$data = array(
    'size' => 'sizeValue'
);
$resp = Requests::put('https://my.snel.com/api/service/@id/vms/@vmid/storage/@diskid', array(), $data, $options);
echo $resp->body;
payload = {
    'size' : 'sizeValue'
}
req = requests.put('https://my.snel.com/api/service/@id/vms/@vmid/storage/@diskid', data=payload, auth=auth)
print(req.json())

HTTP Request

PUT /service/@id/vms/@vmid/storage/@diskid

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id
diskid string Disk ID
size int the disk space in GB

List OS templates

List templates that can be used to create virtual server

curl "https://my.snel.com/api/service/@id/templates" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/templates', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/templates', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/templates

Query Parameters

Parameter Type Description
id int

List ISO images

List virtual servers

curl "https://my.snel.com/api/service/@id/images" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/images', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/images', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/images

Query Parameters

Parameter Type Description
id int

Add ISO image

List virtual servers

curl "https://my.snel.com/api/service/@id/images" \
   -u user:pass \
   -d label="labelValue"\
   -d file_url="file_urlValue"\
   -d min_memory="min_memoryValue"\
   -d version="versionValue"\
   -d os="osValue"\
   -d distro="distroValue"\
   -d virtualization[key]="virtualizationValue"
$data = array(
    'label' => 'labelValue',
    'file_url' => 'file_urlValue',
    'min_memory' => 'min_memoryValue',
    'version' => 'versionValue',
    'os' => 'osValue',
    'distro' => 'distroValue',
    'virtualization' => array('key'=>'value')
);
$resp = Requests::post('https://my.snel.com/api/service/@id/images', array(), $data, $options);
echo $resp->body;
payload = {
    'label' : 'labelValue',
    'file_url' : 'file_urlValue',
    'min_memory' : 'min_memoryValue',
    'version' : 'versionValue',
    'os' : 'osValue',
    'distro' : 'distroValue',
    'virtualization' : {'key':'value'}
}
req = requests.post('https://my.snel.com/api/service/@id/images', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/images

Query Parameters

Parameter Type Description
id int
label string Label for this ISO Image
file_url string Url pointing to iso file
min_memory int Minimum memory size in MB
version string Version number
os string Os type, use `Windows`, `Linux` or `Freebsd`
distro string Distribution name
virtualization array Supported virualization types, `xen`, `kvm`,`kvm_virtio`

List VM Network Interfaces

Get network Interfaces assigned to virtual servers

curl "https://my.snel.com/api/service/@id/vms/@vmid/interfaces" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid/interfaces', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid/interfaces', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/interfaces

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

List Available IPs

List IPs that can be assigned to virtual srver

curl "https://my.snel.com/api/service/@id/vms/@vmid/interfaces/@iface/ips" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid/interfaces/@iface/ips', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid/interfaces/@iface/ips', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/interfaces/@iface/ips

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id
iface string Network interface ID

List VM IPs

List IPs assigned to virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid/ips" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vms/@vmid/ips', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vms/@vmid/ips', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vms/@vmid/ips

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

Assign IP to VM

Add new ip to virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid/ips" \
   -u user:pass \
   -d ipid="ipidValue"\
   -d interfaceid="interfaceidValue"
$data = array(
    'ipid' => 'ipidValue',
    'interfaceid' => 'interfaceidValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/vms/@vmid/ips', array(), $data, $options);
echo $resp->body;
payload = {
    'ipid' : 'ipidValue',
    'interfaceid' : 'interfaceidValue'
}
req = requests.post('https://my.snel.com/api/service/@id/vms/@vmid/ips', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/ips

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id
ipid string IP Address ID
interfaceid string Network interface ID

Remove IP from VM

Unassign ip from virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid/ips/@ipid" \
   -u user:pass 
$resp = Requests::delete('https://my.snel.com/api/service/@id/vms/@vmid/ips/@ipid', array(), $options);
echo $resp->body;
req = requests.delete('https://my.snel.com/api/service/@id/vms/@vmid/ips/@ipid', auth=auth)
print(req.json())

HTTP Request

DELETE /service/@id/vms/@vmid/ips/@ipid

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id
ipid string IP Address ID
interfaceid string Network interface ID

Rebuild Network

Rebuild the network for a particular virtual server

curl "https://my.snel.com/api/service/@id/vms/@vmid/rebuild_network" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/vms/@vmid/rebuild_network', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/vms/@vmid/rebuild_network', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/vms/@vmid/rebuild_network

Query Parameters

Parameter Type Description
id int
vmid string Virtual server id

Resources

Show available and used resources

curl "https://my.snel.com/api/service/@id/resources" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/resources', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/resources', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/resources

Query Parameters

Parameter Type Description
id int

List OS templates and recipes

Lists templates that can be installed on server. Lists recipes that can be used for additional configuration, check usablefor key to find which templates are supported by recipe.

curl "https://my.snel.com/api/service/@id/reinstall/templates" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/reinstall/templates', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/reinstall/templates', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/reinstall/templates

Query Parameters

Parameter Type Description
id int

Reinstall Status

Get reinstall operation status

curl "https://my.snel.com/api/service/@id/reinstall" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/reinstall', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/reinstall', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/reinstall

Query Parameters

Parameter Type Description
id int

Reinstall

Start reinstall operation on a server

curl "https://my.snel.com/api/service/@id/reinstall" \
   -u user:pass \
   -d hostname="hostnameValue"\
   -d template="templateValue"\
   -d recipe="recipeValue"\
   -d password="passwordValue"
$data = array(
    'hostname' => 'hostnameValue',
    'template' => 'templateValue',
    'recipe' => 'recipeValue',
    'password' => 'passwordValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/reinstall', array(), $data, $options);
echo $resp->body;
payload = {
    'hostname' : 'hostnameValue',
    'template' : 'templateValue',
    'recipe' : 'recipeValue',
    'password' : 'passwordValue'
}
req = requests.post('https://my.snel.com/api/service/@id/reinstall', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/reinstall

Query Parameters

Parameter Type Description
id int
hostname string New hostname for server
template string Template ID
recipe string Recipe ID [Optional]
password string New password for server [Optional, will be generated automatically if left empty]

Cancel Diagnostics

Cancel this operation

curl "https://my.snel.com/api/service/@id/diag/cancel" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/diag/cancel', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/diag/cancel', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/diag/cancel

Query Parameters

Parameter Type Description
id int

List Diagnostics templates

List templates that can be used fr diagnostics operation

curl "https://my.snel.com/api/service/@id/diag/templates" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/diag/templates', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/diag/templates', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/diag/templates

Query Parameters

Parameter Type Description
id int

Diagnostics Status

Show diagnostic operation status

curl "https://my.snel.com/api/service/@id/diag" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/diag', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/diag', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/diag

Query Parameters

Parameter Type Description
id int

Run Diagnostics

Start new diagnostic operation

curl "https://my.snel.com/api/service/@id/diag" \
   -u user:pass \
   -d template="templateValue"\
   -d clearhdd="clearhddValue"\
   -d fullhddclear="fullhddclearValue"
$data = array(
    'template' => 'templateValue',
    'clearhdd' => 'clearhddValue',
    'fullhddclear' => 'fullhddclearValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/diag', array(), $data, $options);
echo $resp->body;
payload = {
    'template' : 'templateValue',
    'clearhdd' : 'clearhddValue',
    'fullhddclear' : 'fullhddclearValue'
}
req = requests.post('https://my.snel.com/api/service/@id/diag', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/diag

Query Parameters

Parameter Type Description
id int
template string Diagnostic Template ID
clearhdd bool Clear disks
fullhddclear bool Full hard drive erase ($clearhdd also has to be set to True)

List Rescue templates

List templates that can be used start rescue operation

curl "https://my.snel.com/api/service/@id/rescue/templates" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/rescue/templates', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/rescue/templates', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/rescue/templates

Query Parameters

Parameter Type Description
id int

Rescue Status

Show rescue operation status

curl "https://my.snel.com/api/service/@id/rescue" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/rescue', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/rescue', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/rescue

Query Parameters

Parameter Type Description
id int

Rescue

Start rescue operation on a server

curl "https://my.snel.com/api/service/@id/rescue" \
   -u user:pass \
   -d template="templateValue"\
   -d password="passwordValue"
$data = array(
    'template' => 'templateValue',
    'password' => 'passwordValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/rescue', array(), $data, $options);
echo $resp->body;
payload = {
    'template' : 'templateValue',
    'password' : 'passwordValue'
}
req = requests.post('https://my.snel.com/api/service/@id/rescue', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/rescue

Query Parameters

Parameter Type Description
id int
template string Rescue Template ID
password string Password for rescue operation

Cancel Rescue

Cancel rescue operation

curl "https://my.snel.com/api/service/@id/rescue/cancel" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/rescue/cancel', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/rescue/cancel', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/rescue/cancel

Query Parameters

Parameter Type Description
id int

Server Info

Get server hardware and os details

curl "https://my.snel.com/api/service/@id/info" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/info', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/info', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/info

Query Parameters

Parameter Type Description
id int

Update Hostname

Update server hostname

curl "https://my.snel.com/api/service/@id/hostname" \
   -u user:pass \
   -d hostname="hostnameValue"
$data = array(
    'hostname' => 'hostnameValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/hostname', array(), $data, $options);
echo $resp->body;
payload = {
    'hostname' : 'hostnameValue'
}
req = requests.post('https://my.snel.com/api/service/@id/hostname', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/hostname

Query Parameters

Parameter Type Description
id int
hostname string New Hostname

List IPs

List server ips

curl "https://my.snel.com/api/service/@id/ips" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/ips', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/ips', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/ips

Query Parameters

Parameter Type Description
id int

List VLANs

List available VLANs

curl "https://my.snel.com/api/service/@id/vlans" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/vlans', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/vlans', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/vlans

Query Parameters

Parameter Type Description
id int

Add IP

Add new ip to server

curl "https://my.snel.com/api/service/@id/ips" \
   -u user:pass \
   -d vlan="vlanValue"\
   -d domain="domainValue"\
   -d num="numValue"
$data = array(
    'vlan' => 'vlanValue',
    'domain' => 'domainValue',
    'num' => 'numValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/ips', array(), $data, $options);
echo $resp->body;
payload = {
    'vlan' : 'vlanValue',
    'domain' : 'domainValue',
    'num' : 'numValue'
}
req = requests.post('https://my.snel.com/api/service/@id/ips', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/ips

Query Parameters

Parameter Type Description
id int
vlan string VLAN ID
domain string IP Domain
num string Number of IPs to add [Optional]

IP Details

Get details about IP

curl "https://my.snel.com/api/service/@id/ips/@ip" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/ips/@ip', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/ips/@ip', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/ips/@ip

Query Parameters

Parameter Type Description
id int
ip string IP Address ID

Edit IP

Update IP domain

curl "https://my.snel.com/api/service/@id/ips/@ip" \
   -u user:pass \
   -d domain="domainValue"
$data = array(
    'domain' => 'domainValue'
);
$resp = Requests::post('https://my.snel.com/api/service/@id/ips/@ip', array(), $data, $options);
echo $resp->body;
payload = {
    'domain' : 'domainValue'
}
req = requests.post('https://my.snel.com/api/service/@id/ips/@ip', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/ips/@ip

Query Parameters

Parameter Type Description
id int
ip string IP Address ID
domain string Domain name

Delete IP

Remove IP from server

curl "https://my.snel.com/api/service/@id/ips/@ip" \
   -u user:pass 
$resp = Requests::delete('https://my.snel.com/api/service/@id/ips/@ip', array(), $options);
echo $resp->body;
req = requests.delete('https://my.snel.com/api/service/@id/ips/@ip', auth=auth)
print(req.json())

HTTP Request

DELETE /service/@id/ips/@ip

Query Parameters

Parameter Type Description
id int
ip string IP Address ID

Reboot

Request server reboot

curl "https://my.snel.com/api/service/@id/reboot" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/reboot', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/reboot', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/reboot

Query Parameters

Parameter Type Description
id int

Power OFF

Power off server

curl "https://my.snel.com/api/service/@id/poweroff" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/poweroff', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/poweroff', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/poweroff

Query Parameters

Parameter Type Description
id int

Power ON

Power on server

curl "https://my.snel.com/api/service/@id/poweron" \
   -u user:pass \
$data = array(
);
$resp = Requests::post('https://my.snel.com/api/service/@id/poweron', array(), $data, $options);
echo $resp->body;
payload = {
}
req = requests.post('https://my.snel.com/api/service/@id/poweron', data=payload, auth=auth)
print(req.json())

HTTP Request

POST /service/@id/poweron

Query Parameters

Parameter Type Description
id int

Cart

Most of API methods found here will require service @id, you can lookup your service ids with /service method

List product categories

Return a list of product categories.

curl "https://my.snel.com/api/category" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/category', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/category', auth=auth)
print(req.json())
Example Response:
{
    "categories": [
        {
            "id": "10",
            "name": "Hosting",
            "description": "",
            "slug": "hosting"
        },
        {
            "id": "6",
            "name": "Domains",
            "description": "",
            "slug": "domains"
        },
        {
            "id": "16",
            "name": "Dedicated",
            "description": "",
            "slug": "dedicated"
        }
    ]
}

HTTP Request

GET /category

List products in category

Return a list of product available for purchase under requested category

curl "https://my.snel.com/api/category/@category_id/product" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/category/@category_id/product', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/category/@category_id/product', auth=auth)
print(req.json())
Example Response:
{
    "products": [
        {
            "id": "333",
            "type": "1",
            "name": "Starter Hosting",
            "stock": false,
            "paytype": "Regular",
            "description": "Disk:10GB
Memory:2GB
MySql:10 DB
Email:100 Users
", "qty": "0", "tags": [ ], "periods": [ { "title": "m", "value": "m", "price": 9.99, "setup": 0, "selected": true }, { "title": "a", "value": "a", "price": 109.89, "setup": 0, "selected": false }, { "title": "b", "value": "b", "price": 199.8, "setup": 0, "selected": false }, { "title": "t", "value": "t", "price": 299.7, "setup": 0, "selected": false } ] }, (...) ] }

HTTP Request

GET /category/@category_id/product

Query Parameters

Parameter Type Description
category_id int Category ID

Get product configuration details

Return product details with form configuration, addons and subproducts if available.

curl "https://my.snel.com/api/order/@product_id" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/order/@product_id', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/order/@product_id', auth=auth)
print(req.json())
Example Response:
{
    "product": {
        "id": "333",
        "category_name": "Hosting",
        "category_id": "49",
        "name": "Starter Hosting",
        "price": 9.99,
        "recurring": "m",
        "setup": 0,
        "config": {
            "product": [
                {
                    "type": "select",
                    "title": "pickcycle",
                    "id": "cycle",
                    "name": "cycle",
                    "items": [
                        {
                            "title": "m",
                            "value": "m",
                            "price": 9.99,
                            "setup": 0,
                            "selected": true
                        },
                        {
                            "title": "a",
                            "value": "a",
                            "price": 109.89,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "b",
                            "value": "b",
                            "price": 199.8,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "t",
                            "value": "t",
                            "price": 299.7,
                            "setup": 0,
                            "selected": false
                        }
                    ],
                    "value": "m",
                    "price": 9.99,
                    "setup": 0
                },
                {
                    "type": "input",
                    "title": "domain",
                    "id": "domain",
                    "name": "domain",
                    "value": null
                }
            ],
            "forms": [
                {
                    "type": "select",
                    "title": "Disk Size",
                    "id": "1618",
                    "firstItemId": 10330,
                    "description": "",
                    "name": "custom[1618]",
                    "required": false,
                    "multiple": false,
                    "config": {
                        "conditionals": []
                    },
                    "value": [],
                    "textvalue": [],
                    "price": 0,
                    "recurring_price": 0,
                    "setup": 0,
                    "prorata_date": null,
                    "items": [
                        {
                            "title": "512MB",
                            "value": 1,
                            "id": 10330,
                            "price": 0,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "1GB",
                            "value": 1,
                            "id": 10331,
                            "price": 0,
                            "setup": 0,
                            "selected": false
                        },
                        {
                            "title": "2GB",
                            "value": 1,
                            "id": 10332,
                            "price": 0,
                            "setup": 0,
                            "selected": false
                        }
                    ]
                },
                (...)
            ],
            "addons": [
                {
                    "type": "subitem",
                    "title": "Cpanel2: Add Extra IP",
                    "id": "31",
                    "value": null,
                    "description": "Automatically adds IP address to account",
                    "config": [
                        {
                            "type": "checkbox",
                            "title": "add",
                            "name": "addon[31]",
                            "checked": false
                        },
                        {
                            "type": "select",
                            "title": "billingcycle",
                            "name": "addon_cycles[31]",
                            "items": [
                                {
                                    "title": "m",
                                    "value": "m",
                                    "price": 5,
                                    "setup": 0,
                                    "selected": true
                                },
                                {
                                    "title": "q",
                                    "value": "q",
                                    "price": 20,
                                    "setup": 0,
                                    "selected": false
                                },
                                {
                                    "title": "a",
                                    "value": "a",
                                    "price": 50,
                                    "setup": 0,
                                    "selected": false
                                }
                            ]
                        }
                    ],
                    "price": 0,
                    "recurring_price": 0,
                    "setup": 0,
                    "prorata_date": null
                },
                (...)
            ],
            "subproducts": []
        },
        "recurring_price": 9.99,
        "prorata_date": null
    }
}

HTTP Request

GET /order/@product_id

Query Parameters

Parameter Type Description
product_id int Product ID

Order new service

Create and submit new order for selected product.

To get available cycle and configuration options lookup product details using GET /order/@product_id

curl "https://my.snel.com/api/order/@product_id" \
   -u user:pass \
   -d domain="domainValue"\
   -d cycle="cycleValue"\
   -d pay_method="pay_methodValue"\
   -d custom[key]="customValue"
$data = array(
    'domain' => 'domainValue',
    'cycle' => 'cycleValue',
    'pay_method' => 'pay_methodValue',
    'custom' => array('key'=>'value')
);
$resp = Requests::post('https://my.snel.com/api/order/@product_id', array(), $data, $options);
echo $resp->body;
payload = {
    'domain' : 'domainValue',
    'cycle' : 'cycleValue',
    'pay_method' : 'pay_methodValue',
    'custom' : {'key':'value'}
}
req = requests.post('https://my.snel.com/api/order/@product_id', data=payload, auth=auth)
print(req.json())
Example Response:
{
    "order_num": 873340995,
    "invoice_id": "308979",
    "total": "9.99"
}

HTTP Request

POST /order/@product_id

Query Parameters

Parameter Type Description
product_id int Product ID
domain string Domain name, ie. example.com, may be optional
cycle string Billing period symbol
pay_method int Payment method ID
custom array Additional options data available for sop products

Get server state

Return details about server power state

curl "https://my.snel.com/api/service/@id/status" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/service/@id/status', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/service/@id/status', auth=auth)
print(req.json())

HTTP Request

GET /service/@id/status

Query Parameters

Parameter Type Description
id int

List Servers In-stock

Rebuild the network for a particular virtual server

curl "https://my.snel.com/api/serverstock" \
   -u user:pass 
$resp = Requests::get('https://my.snel.com/api/serverstock', array(), $options);
echo $resp->body;
req = requests.get('https://my.snel.com/api/serverstock', auth=auth)
print(req.json())
Example Response:
[
    {
        "product_id": "28",
        "category_id": "5",
        "name": "Xeon E3-1230 v5",
        "category": "Single Processor Dedicated Servers",
        "locale": {
          "delivery": "Instant setup",
          "delivery-stock": "1-2 working days",
          "delivery-custom": "1-2 working days",
          "custom-warning": "Your delivery time has changed to 1-2 working days"
        },
        "stock": 3
    },
    {
        "product_id": "56",
        "category_id": "5",
        "name": "Xeon E3-1270",
        "category": "Single Processor Dedicated Servers",
        "locale": {
          "delivery": "Instant setup",
          "delivery-stock": "1-2 working days",
          "delivery-custom": "1-2 working days",
          "custom-warning": "Your delivery time has changed to 1-2 working days"
        },
        "stock": 1
    },
]

HTTP Request

GET /serverstock