Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This page has been translated automatically

We want to provide you with the latest help content in your language as soon as possible. This page has been translated automatically and may contain grammatical errors or inaccuracies. We want this content to be useful to you. Please let us know at the bottom of this page if this information was helpful.

View the original article in Russian: API Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ для Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·Π°Ρ†ΠΈΠΈ ΠΏΡ€ΠΎΠ΄Π°ΠΆΠΈ Π’Π°ΡˆΠΈΡ… ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΎΠ²

The WebService API is located at: https://userarea.zennolab.com/BotStore.asmx

You can upload your projects at: https://userarea.zennolab.com/en/userarea/Bots.aspx

How to connect WebService to ASP.NET projects see here: http://msdn.microsoft.com/en-us/library/d9w023sx(v=vs.90).aspx

How to work with WebService in PHP see here: http://php.net/manual/en/book.soap.php

How to work with WebService in Python see here: https://wiki.python.org/moin/WebServices (SOAP section).

The following functions are currently available:

Getting information about bots loaded in UserArea: GetBotList

Working with bot sales: GetSales, SaleBots, RefundSale, ChangeSubscription

Working with users: GetCurrentCustomerEmail, RegisterCustomer, ResetPassword, GetCustomerBoxLink

Bot management: CreateBot, UploadBotContent

GetBotList

Description :

Gets a list of bots registered in the UserArea.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

Returns :

Array of BotInfo objects

public class BotInfo
{
    // ΡƒΠ½ΠΈΠΊΠ°Π»ΡŒΠ½Ρ‹ΠΉ ΠΈΠ΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ Π±ΠΎΡ‚Π°
    public int Id;
    // имя Π±ΠΎΡ‚Π°
    public string Name;
    // Π½Π°Π·Π²Π°Π½ΠΈΠ΅ Ρ„Π°ΠΉΠ»Π°
    public string FileName;
    // когда создан
    public DateTime Created;
    // ΠΊΠΎΠ³Π΄Π° послСдний Ρ€Π°Π· ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½
    public DateTime Modified;
    // ваш ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ
    public string Comment;
    // Ρ€Π°Π·ΠΌΠ΅Ρ€ Π² Π±Π°ΠΉΡ‚Π°Ρ…
    public int Size;
}

GetSales

Description :

Receives a list of your sales, sales can be requested for a specific client by specifying his e-mail.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

string filterByCustomerEmail - e-mail of the user who was sold to, if you specify an empty string, you will get the entire list of sales

Returns :

Array of SaleInfo objects:

public class SaleInfo
{
    // ΡƒΠ½ΠΈΠΊΠ°Π»ΡŒΠ½Ρ‹ΠΉ ΠΈΠ΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ ΠΏΡ€ΠΎΠ΄Π°ΠΆΠΈ
    public int Id;
    // Π΄Π°Ρ‚Π° ΠΏΡ€ΠΎΠ΄Π°ΠΆΠΈ
    public DateTime SaleDateTime;
    // email покупатСля
    public string CustomerEmail;
    // id Π±ΠΎΡ‚ΠΎΠ² Ρ‡Π΅Ρ€Π΅Π· Π·Π°ΠΏΡΡ‚ΡƒΡŽ
    public string Bots;
    // Π±Ρ‹Π» Π»ΠΈ Refund ΠΏΠΎ Π΄Π°Π½Π½ΠΎΠΉ ΠΏΡ€ΠΎΠ΄Π°ΠΆΠ΅
    public bool HasRefund;
    // ΠΏΡ€ΠΎΠ΄Π°ΠΆΠ° являСтся подпиской ΠΈΠ»ΠΈ Π½Π΅Ρ‚
    public bool IsSubscription;
    // ΠΊΠΎΠ³Π΄Π° заканчиваСтся подписка
    public DateTime? SubscriptionDueDate;
    // Π² ΠΊΠ°ΠΊΠΈΡ… ΠΏΡ€ΠΎΠ΄ΡƒΠΊΡ‚Π°Ρ… ΠΌΠΎΠΆΠ΅Ρ‚ Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ 
    // 1 - Ρ‚ΠΎΠ»ΡŒΠΊΠΎ Π² ZennoBox, 2 - Ρ‚ΠΎΠ»ΡŒΠΊΠΎ Π² ZennoPoster, 3 - Π² ZennoBox ΠΈ ZennoPoster
    public int ForProducts;
}

SaleBots

Description :

Sells the specified bots to the specified buyer.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

string customerEmail - customer e-mail

string ids - unique identifiers of your bots, if you need to sell several bots at once, you should specify id separated by commas

bool isSubscription - true if this is a subscription and false if it is a regular sale

int subscriptionDaysCount - the number of days of subscription, if this is a regular sale, then you should specify 0

int forProducts - in which products the project can work 1 - only in ZennoBox, 2 - only in ZennoPoster, 3 - in ZennoBox and ZennoPoster

Returns :

int id of the sale

RefundSale

Description :

Recalls the sale. The bot becomes inoperable for the client.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

int saleId - sale id

Returns :

One of the following lines:

Ok - the operation was successful.

Exception - an internal error has occurred, if the error persists, you should contact ZennoLab support.

NoSuchSale - You entered an invalid sale id.

NoSuchUser - You specified incorrect authorization data.

RefundTimeout - you are trying to return money for a sale that was made before the acquisition of the Developer license, you can automatically do this only within 30 days, if you need to make a recall of the sale, after 30 days, you can do this only through the interface in the administrative panel, ZennoLab commission will not be refunded.

ChangeSubscription

Description :

Modifies subscription options.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

int saleId - sale id

int addDays - the number of days to renew the subscription, you can specify a negative number, then the subscription period will be reduced

Returns :

One of the following lines:

Ok - the operation was successful.

Exception - an internal error has occurred, if the error persists, you should contact ZennoLab support.

NoSuchSale - You entered an invalid sale id.

NoSuchUser - You specified incorrect authorization data.

GetCurrentCustomerEmail

Description :

The function allows you to check whether a user is already registered with us or not.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

string customerEmail - your customer's e-mail

Returns :

Returns the actual (the user could have changed the registration e-mail) user's e-mail. If the user is not registered, then you will receive a reply nosuchuser@zennolab.com

RegisterCustomer

Description :

Registers the user in the ZennoLab personal account.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

string email - your client's e-mail

string lang - the language of your client, can take 2 values ru and en

Returns :

Upon successful registration, you will receive a record of the form: "Pass: password", where password is the password of the registered user from the personal account.

ResetPassword

Description :

Allows you to change the ZennoLab user password if you registered it via the API.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

string email - your client's e-mail

Returns :

If the operation is successful, you will receive a record of the form: "Pass: password", where password is the user's password from the personal account.

Description :

Returns a direct ZennoBox download link for your client.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

string customerEmail - your customer's e-mail

Returns :

Link like:

https://userarea-us.zennolab.com/download/ZennoBox*.exe

where instead of * the latest version and language of ZennoBox available for your client is indicated.

CreateBot

Description :

Registers a new bot in the admin panel, in order to upload the bot after registration, use UploadBotContent.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

string botName - the name of the bot in the admin area

string fileName - the name of the project file that will be created at the client

string comment - Your comment

Returns :

One of the following lines:

Ok: {bot id} - the operation was successful, the id of the created bot is returned.

Exception - an internal error has occurred, if the error persists, you should contact ZennoLab support.

NoSuchUser - You specified incorrect authorization data.

UploadBotContent

Description :

Uploads new bot content to the admin panel.

Accepts :

string login - Your e-mail to enter userarea.zennolab.com

string password - md5 hash of your password for userarea.zennolab.com

int botId - bot id in the admin panel, the id of your bots can be found using the GetBotList function

string botContent - project content converted to base64 string

string comment - Your comment

Returns :

One of the following lines:

Ok - the operation was successful.

Exception - an internal error has occurred, if the error persists, you should contact ZennoLab support.

NoSuchBot - You entered an invalid bot id.

NoSuchUser - You specified incorrect authorization data.

  • No labels