User informations
This API call is used to retrieve informations about user.
Basic description and parameters of API calls can be found on this page.
Service
User informations API belongs to General service (general).
API request
API request must contain all general parameters.
- CTRL
-
Fixed value: user_info
- User identification
-
One of following:
- id
- User's id.
- login
- User's login name.
You should specified one of user identification parameter listed above. This parameter identifies user uniquely. If you specify both, login will take precedence, if you specify none user making request will be assumed.
User can request following user's informations:
- Administrators and system users can request informations about all users.
- Customer can request informations about himself/herself and his/her users (user having him/her as owner).
- User can request informations only about himself/herself.
If you request user who does not exists, or you do not have right/access to, USER_MISSING error is returned.
API examples
Response to valid API request
Basic response can be found in general API description.
Data object description
Object data contains following parameters:
- id
- User's id.
- id_user
- Owner's id (id of customer owning this user).
- login
- User's login name.
- password
- MD5 hash of user's password. This parameter will have value if API user is requesting himself/herself, or API user is either administrator or system user.
- type
- User's type.
- created
- Date and time when user was created. yyyy-mm-dd hh:ii:ss format.
- account
- Array of accounts, see below.
- contact
- Array of contacts, see below.
- address
- Array of addresses, see below.
- values
- Object containing some user specific values.
Description of objects in accounts array
Objects in array account have following properties:
- number
- Unique account number (variable symbol for usual payments)
- credit
- Credits on account (How much "money" is there on account).
- currency
- Account currency.
Description of objects in contacts array
Objects in array contact are following contact structure.
Description of objects in addresses array
Objects in array address are following address structure.
values object description
Object values contains following properties:
- delivery_address
- Preset value for SMS delivery reports.
- deny_number_fix
- Whether SMS can be sent to land lines (default true).
- deny_number_foreign
- Whether SMS can be sent to foreign (non Czech) numbers (default true).
- forbidden_numbers
- Array of numbers, that are considered invalid (SMS cannot be sent to such numbers by this user).
- invoice_mail
- Whether to send invoices by mail.
- smsin_url
-
URL to send incomming SMS to. URL can be in form
http://www.example.com/index.php?ms=$msisdn&rec=$recipient&smstext=$smstext &so=$smsout&in=$smsin&reaon=$reason&created=$created
where variables are translated to:- $msisdn
- Sender phone number
- $recipient
- Recipient phone number (one of numbers managed by Crazy Tomato)
- $smstext
- SMS text
- $smsout
- Comma separated list of IDs of messages which are (could be), source of such incomming SMS (session)
- $smsin
- ID of incomming SMS
- $reason
- Reason of such SMS
- phone
- SMS originated from phone number assigned to this user.
- login
- SMS text starts by this user's login name.
- session
- SMS was assigned to this user by session.
- keyword
- SMS was assigned to this user by keyword (kewords) assigned to this user.
- smsin_email
- Email address incomming SMS will be sent to (including some additional information).
Request and response examples
Response to invalid request
Description can be found in general API description.