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.
loginLogin 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:
loginUser’s login.
emailUser’s email.
firstnameUser’s name.
middlenameUser’s patronymic.
lastnameUser’s surname.
reg_timeUser registration date and time.
phoneUser’s phone number.
companyCompany specified by the user.
channelChannel through which the user was engaged.
timezoneUser time zone.
masterIf 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_bonusIt is returned only if the user has the reseller status The bonus part of the user’s account in the currency. Non-negative.
currencyThe user’s currency in which the balance is indicated, it can be one of the following: RUB, USD, EUR or UAH.
emails_paidThe number of email messages under the «Pay as you go» tariff paid by the user for the entire period of using the service.
emails_usedThe 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_paidNumber of email messages paid by the user in the current period (month).
period_emails_usedNumber of email messages sent by the user in the current period (month).
email_period_startStart date of the current period in the “YYYY-MM-DD hh:mm:ss” format in the UTC time zone.
email_period_endEnd date of the current period in the “YYYY-MM-DD hh:mm:ss” format in the UTC time zone.
tariff_idTariff identifier for the current period.
next_tariff_idTariff identifier for the next period.
servicesArray 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.

countryThree-character user’s country code (RUS, GBR, etc.).
languageTwo-character code of the user’s language (ru, en, de, etc.).
rightsThe «reseller» value is returned only if the user has the reseller status An empty value is returned in all other cases.
is_active1 or 0 — access to the service is allowed or denied.
disable_sending1 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_numVerbal 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_infoName 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_cityThe 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_refPage from which redirection to the registration page was made.
reg_urlUser registration page (reseller URL from which the registration was performed).
api_modeField indicating whether the user has enabled API access. Possible values: on — enabled, off — disabled, test — operates in the test mode.
subscribers_totalNumber of contacts within the tariff. If the tariff does not imply a limit on the number of contacts, the NULL value is returned.
subscribers_usedNumber 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 
  }
}