Info | ||||
---|---|---|---|---|
| ||||
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
Code Block |
---|
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:
Code Block |
---|
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.
GetCustomerBoxLink
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:
Code Block |
---|
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 pagenew 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.