Document toolboxDocument toolbox

Reseller operations

The following operations are related to reseller domains exclusively, so you need reseller credentials to authorize them. If you use common domain credentials, an error will be returned.

List reseller domains

GET /domain

Use this operation to get the details of all your reseller domains. If everything is properly configured, you should get a response like this:

[ { "name" : "my-first-domain@my-reseller", "plan" : "my-basic-plan", "time" : 2.0, "volume" : 2.0, "status" : "Active" }, { "name" : "my-second-domain@my-reseller", "plan" : "my-business-plan", "time" : 10.0, "volume" : 12.0, "status" : "Active" } ]

Get a reseller domain info

GET /domain/{domain}

To request the information of a single reseller domain, simply add its name after /domain.

{ "name" : "my-first-domain@my-reseller", "plan" : "my-basic-plan", "time" : 2.0, "volume" : 2.0, "status" : "Active" }

If you ask for a domain that do not exist, you will get the following error:

{ "error": { "code": 106, "message": "Invalid domain" } }

Create a new reseller domain

POST /domain

Use this operation to create a new reseller domain, including the details in the request body. For example:

  • The domain name might include the @{resellerName} tail or not, but take into account that the full name will actually be used (for example, for name length validation).

  • Assigning a domain an existing, valid reseller price plan is mandatory.

  • The time and volume values are optional, and depend on the plan assigned.

A response to such request looks like this:

  • The name value will always contain the full domain name, even if we have provided only the domain name without the reseller name tail.

  • Note that even if the domain is considered to be active, it will not be accessible until we assign it an owner. We will receive an error in this case.

After creating a new domain, you need to assign a new or existing user as the domain owner. To do this, we can use the operation described in Creating user domains. Keep in mind that this user needs to have the role OWNER, which will be translated as 'set role as ADMIN flag the user as the owner'.

The first user assigned to a domain MUST be the Owner.

Enable and disable reseller domains

A reseller domain can be enabled or disabled with the required operation:

POST /domain/{domain}/disable

Disable a specified reseller domain.

POST /domain/{domain}/enable

Enables a specified reseller domain.

Domains with status 'pending' cannot be activated. Also, when you try to disable or enable an already disabled or enabled domain, you will get an error response like this:

Delete a reseller domain

DELETE /domain/{domain}

Use this operation to delete a reseller domain. This will additionally delete all existing users belonging to the domain. If the user ends up without at least one domain, the user will be deleted too.

Domains are only deleted at the logic level, since there are several procedures that need to check for both active domains and those that no longer exist.