This documentation explains how Mozello reseller API works.
Before you can use any of this, you must become an approved Mozello reseller.


Reseller API basics

Basics

Mozello resellers can control the system by making API calls.

The base URL for all API calls is http://resellers.mozello.com/api/

API calls are made as GET or POST request to the corresponding API URL which, in turn responds with a JSON object.

API requests muss pass authorization token as parameter. It can be obtained and invalidated via login API calls.

Example

Request (raw HTTP)

GET /api/website/enable_premium/?apiToken=8712f9767e6a03ab6c8a80d53fc3ef6e&website=55083 HTTP/1.1
Host: resellers.mozello.com

Success response

{
    "error": false
}

Error response

{
    "error": true,
    "errorCode": 401,
    "errorMsg": "Unauthorized"
}


API reference

Authorization

/api/authorize/ - obtains an API token

Parameters

Example

Request

GET /api/authorize/?email=you@example.com&password=secret HTTP/1.1

Response

{
    "error": false,
    "apiToken": "63ed7df0b8d8577321e95346e5e1364d"
}

Authorization: Logout

/api/authorize/logout/ - invalidates the API token

Parameters

Websites

/api/websites/ - returns all websites

Parameters

Example response

{
    "error": false,
    "websites": [
        {
            "userName": "John Smith",
            "userEmail": "johnsmith@squeeezy.com",
            "userCountry": "uk",
            "userCreated": "2014-05-27 08:34:13",
            "userIsConfirmed": false,
            "userIsUnsubscribed": false,
            "websiteID": 38638,
            "websiteBrandname": "Squeeezy",
            "websiteAlias": "squeeezy",
            "websiteType": 2,
            "websiteCreated": "2014-05-27 08:34:23",
            "websiteModified": "2014-08-15 09:36:48",
            "websiteAccessed": "2014-08-14 12:53:16",
            "websiteStatus": 1,
            "websiteIsPremium": true
        },
        {
            "userName": "Tim Allen",
            "userEmail": "tim@allen.com",
            "userCountry": "us",
            "userCreated": "2014-07-25 16:01:39",
            "userIsConfirmed": false,
            "userIsUnsubscribed": false,
            "websiteID": 55083,
            "websiteBrandname": "Tim Allen Recipies",
            "websiteAlias": "timallen",
            "websiteType": 2,
            "websiteCreated": "2014-07-25 16:01:48",
            "websiteModified": "2014-07-25 16:03:43",
            "websiteAccessed": null,
            "websiteStatus": 1,
            "websiteIsPremium": false
        }
    ]
}

Website: Enable

/api/website/<website>/enable/ - enables a disabled website

Parameters

Website: Disable

/api/website/<website>/disable/ - disables a website

Parameters

Website: Enable Premium

/api/website/<website>/enable_premium/ - enables paid website subscription (Premium account)

Parameters

Website: Disable Premium

/api/website/<website>/disable_premium/ - stops paid website subscription

Parameters

Website: Login

/api/website/<website>/login/ - creates a one-time auto-login link for a website

Parameters

Example response

{
    "error": false,
    "loginUrl": "http://www.mozello.com/session/resellerlogmein/params/token/c1d3662fed66a732de71c1b9232448e3/"
}

Domains

/api/website/<website>/domains/ - lists domains attached to a website

Parameters

Example response

{
    "error": false,
    "domains": [
         {
            "domainID": 934,
            "domain": "example.com"
         },
         {
            "domainID": 1001,
            "domain": "squeeezy.com"
         }
    ]
}

Domain: Add

/api/website/<website>/domain/add/ - lists domains attached to a website

Parameters

Domain: Remove

/api/website/<website>/domain/<domain>/remove/ - removes the domain previously attached to a website

Parameters

Settings

/api/settings/ - retrieves reseller account data

Parameters

Example response

{
    "error": false,
    "resellerID": 77,
    "company": "Acme Developer Inc.",
    "contactName": "John Smith",
    "contactWebsite": "http://www.example.com",
    "contactEmail": "john@example.com",
    "contactPhone": "",
    "addrAddress": "742 Evergreen Terrace",
    "addrCity": "Springfield",
    "addrRegion": "",
    "addrPostal": "",
    "addrCountry": "us",
    "supportEmail": "support@example.com",
    "supportPhone": "",
    "buyLink": "http://www.example.com/buy.php",
    "logoLink": "http://www.example.com/logo.png",
    "faviconLink": "http://www.example.com/favicon.ico",
    "notifyLink": "http://www.example.com/notify.php",
    "termsLink": "http://www.example.com/terms.php",
    "tlds": "com,net,org",
    "creditLimit": 50
}

Settings: Set

/api/settings/set/ - changes reseller account settings (only the allowed params)

Parameters

Example request

GET /api/settings/set/?apiToken=63ed7df0b8d8577321e95346e5e1364d&supportEmail=customers@example.com HTTP/1.1

Balance

/api/balance/ - retrieves financial information

Parameters

Example response

{
    "error": false,
    "premiumWebsites": 3,
    "currentBalance": "EUR 5.06",
    "billingThreshold": "EUR 100.00"
}

Password

/api/password/ - changes reseller account password

Parameters