Virusdie external billing transfer API

A complete guide of external billing transfer API for Virusdie partners.

2018-01-26

API requests format

Send HTTPS requests to //virusdie.ru/partners-api/. A common request format is:

GET /partners-api/<method>/[?query]

Authorization

You should use your personal API key for authorization.

It should be transfered through the cookies under the name apikey (Cookie: apikey=...).

Common response format

In response to each request, there will be a JSON object returned along format below:

{
status:   int  Error code. More in a section [Errors],
message:  str  Error message, if any,
result:   mix  Response to the request (the format depends on the requested method),
}

The format of the .result field depends on the specific method (parameter method). See Methods List.

Errors

The HTTP response status code will always be 200.

The error code is sent to the field .status of the result.

Value 200 means that there were no critical errors and you can process the .result field.

Otherwise (.status not a 200) you should not process the .result field.

In the .message field, a text message is sent about the error that occurred.

Methods List

Add new web site into customer’s account

GET /partners-api/add-site/? &domain=str

.result field value in a response

The .result will contain an object described below:

{
    id:      int    // Site ID (0 on errors)
    domain:  "str"  // Domain name
}

Delete web site from account

GET /partners-api/delete-site/? &website=str|int

.result field value in a response

The .result will contain an object described below:

{
    id:      int    // Site ID (0 on errors)
    domain:  "str"  // Domain name
}

New customer registration and service order

Register new user/website.

GET /partners-api/activate-site/? &login=str &domain=str [&rate=int]

.result field value in a response

The .result will contain an object described below:

{
    login:    "str"  // Login name of new customer
    domain:   "str"  // The domain added into the customer's website list
    url:      "str"  // Direct login URL
    expires:  int    // The expiration time of the direct login URL (UNIX timestamp)
}

The URL in the .url field will be valid until the time specified in the .expires field. You can refresh this at any time by calling the user method.

Get the direct login URL for the customer

GET /partners-api/user/? &login=str

.result field value in a response

The .result will contain an object described below:

{
    login:    "str"  // Login name of the customer
    url:      "str"  // Direct login URL
    expires:  int    // The expiration time of the direct login URL (UNIX timestamp)
}

The URL in the .url field will be valid until the time specified in the .expires field. You should always check the URL expiration time before showing the URL to the user. You can request the new URL at any time. Any previously created URL will continue to work as expected until it will be expired.


Methods List