Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

getUserInfo method

It is a method to get information about the user and his account status.

You can get information about another user only if you are a reseller. The reseller can get information on its users using the login parameter.

To get contact information, use the exportContacts method.

Principle of use

Syntax and URL to call the method
getUserInfo (string login)
https://api.unisender.com/en/api/getUserInfo?format=json&api_key=KEY&login=LOGIN
Arguments
api_key * API access key.
login Login of the user, information on which you want to receive. It is ignored if the user does not have the reseller status.
Return value
JSON object with the following fields:
login User’s login.
email User’s email.
firstname User’s name.
middlename User’s patronymic.
lastname User’s surname.
reg_time User registration date and time.
phone User’s phone number.
company Company specified by the user.
channel Channel through which the user was engaged.
timezone User time zone.
master If the user is an «additional» one, the login of the main user is specified here, otherwise this field will be empty.
balance СAmount on the user’s main and bonus accounts in the currency. It can be negative.
balance_bonus It is returned only if the user has the reseller status The bonus part of the user’s account in the currency. Non-negative.
currency The user’s currency in which the balance is indicated, it can be one of the following: RUB, USD, EUR or UAH.
emails_paid The number of email messages under the «Pay as you go» tariff paid by the user for the entire period of using the service.
emails_used The number of email messages under the «Pay as you go» tariff sent by the user for the entire period of using the service.
period_emails_paid Number of email messages paid by the user in the current period (month).
period_emails_used Number of email messages sent by the user in the current period (month).
email_period_start Start date of the current period in the “YYYY-MM-DD hh:mm:ss” format in the UTC time zone.
email_period_end End date of the current period in the “YYYY-MM-DD hh:mm:ss” format in the UTC time zone.
tariff_id Tariff identifier for the current period.
next_tariff_id Tariff identifier for the next period.
services Array of the objects describing the services included. Each object consists of three fields:

  • id — an integer service identifier,
  • tariff — the internal name of the tariff according to which the service is charged,
  • paidUntil — the time until which the service is enabled in the YYYY-MM-DD hh:mm:ss format in UTC.

If no services are included, the array will be empty.

country Three-character user’s country code (RUS, GBR, etc.).
language Two-character code of the user’s language (ru, en, de, etc.).
rights The «reseller» value is returned only if the user has the reseller status An empty value is returned in all other cases.
is_active 1 or 0 — access to the service is allowed or denied.
disable_sending 1 or 0 — the messaging service is enabled or disabled. The field is returned only if the request is made by the user with the CRM right.
user_reg_info_subscribers_approx_num Verbal description of the approximate number of contacts specified during the registration. The field is returned only if the request is made by the user with the CRM right.
user_reg_info_industry_info Name of the industry, type of activities specified during the registration. The field is returned only if the request is made by the user with the CRM right.
user_reg_info_city The name of the city specified during the registration. The field is returned only if the request is made by the user with the CRM right.
reg_ref Page from which redirection to the registration page was made.
reg_url User registration page (reseller URL from which the registration was performed).
api_mode Field indicating whether the user has enabled API access. Possible values: on — enabled, off — disabled, test — operates in the test mode.
subscribers_total Number of contacts within the tariff. If the tariff does not imply a limit on the number of contacts, the NULL value is returned.
subscribers_used Number of contacts used within the tariff.
Example of the return value:

{
  "result":{
    "login":"test_user_login",
    "email":"test@test.com",
    "firstname":"test name",
    "middlename":"test name",
    "lastname":"test name",
    "reg_time":"2011-09-05 10:00:00",
    "phone":"+70000000000",
    "company":"test company",
    "channel":"test channel",
    "timezone":"Europe/Moscow",
    "master":"test_main_login",
    "balance":18.52,
    "currency":"USD",
    "emails_paid":0,
    "emails_used":40734,
    "period_emails_paid":1000,
    "period_emails_used":0,
    "email_period_start":"2011-01-03 00:46:02",
    "email_period_end":"2011-02-03 00:46:02",
    "tariff_id":1,
    "next_tariff_id":10
    "services": [{id:234, tariff:"bitrix24_premium_3m", paidUntil:"2017-04-28 10:51:33"}],
    "country":"USA", 
    "language":"en", 
    "rights":"reseller",
    "balance_bonus":10.52,
    "reg_ref":"https://www.facebook.com/", 
    "reg_url":"https://unisender.test.com/en/v5/two_step_register",
    "api_mode": "on",
    "subscribers_total":500,
    "subscribers_used":5 
  }
}