Skip to content

Retrieves communications from the past 366 days.

Method get.communications
Description Retrieves communications from the past 366 days.
Who has access Agents and clients
Required components Data API for configuration
Request weight 1 point

Request parameters

Name Type Required Valid values Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the agent client on behalf of which the request is made (Is required for the agent) To obtain a list of client users, you must use the method "get.customer_users"
limit number no Number of records to return. See "Paging"
offset number no Shift, determines from which record number to return "limit" records. Default is "0". See "Paging"
report_id number yes User report unique identifier. To get a list of user reports, you must use the "get.reports_list"
report_type enum yes User report type. To get a list of user reports, you must use the "get.reports_list"
date_from iso8601 yes YYYY-MM-DD hh:mm:ss Start date and time of the reporting period. Maximum range: 366 days.
date_till iso8601 yes YYYY-MM-DD hh:mm:ss End date and time of the reporting period.
fields array no Comma-separated list of column IDs. Required to return data; if omitted or empty, the response is empty. To retrieve available columns, use getobj.columns_tree. Their order determines the order of fields in the response.
Report filters
filters array yes A filter expression may contain simple filters, a nested filter tree, or both. To retrieve supported filters and values, use get.report_filters.
field string Field of the entity to which filtering will be applied (the list is predefined for the method)
operator enum Filtering operator. A list of all operators can be obtained in the section "Filtering operators"
value string Value for the filtering operator. Optional field; if it is missing, it is considered empty.
Report sorting

Response parameters

Note: Not all response fields may be available. To retrieve the complete, current list of supported fields, use the column IDs returned by getobj.columns_tree.

Name Type Valid values Filtering Sorting Default response Description
site_domain_name string yes yes yes Internet site address. Without specifying the protocol - "http://" or "https://"
site_domain_naked string yes yes yes The main domain of a website address on the Internet.
site_name string yes yes yes Site name.
Communications
communication_type object yes yes yes Communication type.
value string Name of values
value_id string Unique value identifier
communication_id string yes yes yes Unique request ID.
communication_date_time iso8601 YYYY-MM-DD hh:mm:ss yes yes yes Date and time of request
communication_kinds array yes Type of request
communication_page_url string yes yes The URL of the page the visitor was on at the time of the call or the page of the visitor's last interaction before the call.
is_communication_with_visit object yes yes Indicates whether the communication is linked to a visitor session.
value string Name of values
value_id string Unique value identifier
communication_number number yes yes yes Case number. Calculated per person.
contact_phone_number string yes yes yes For inbound calls, the contact number that placed the call. For outbound calls, the contact number that was called.
virtual_phone_number string yes yes yes Virtual number
contact_full_name string yes yes yes Last name First name Middle name of the contact or the name specified in the application.
total_duration number yes yes Call duration or chat duration, value in seconds
Added tags
tags object yes yes Tags
communication_id number Unique request ID.
communication_type string Communication type.
items array List of tags with parameters
id number Unique tag identifier
name string Tag name
Employees who participated in the call, chat or request
employees array yes Employees who participated in the call
employee_full_name string Employee full name.
Traffic sources
campaign_name string yes yes yes Advertising campaign name
channel_new string yes yes yes Channel(new). Source channel name
channel_code string yes yes yes Channel mnemonic
source_new string yes yes yes Source(new). Source group
source_name string yes yes yes Source (detailed). Source name
channel string yes yes Channel.
source string yes yes Source.
referrer string yes yes Transition source
referrer_domain string yes yes Referrer domain
search_query string yes yes Search query
Advertising campaign parameters
eq_utm_source string yes yes Extended UTM Source tag
eq_utm_medium string yes yes Extended UTM tag Medium
eq_utm_term string yes yes Extended UTM tag Term
eq_utm_content string yes yes Extended UTM content tag
eq_utm_campaign string yes yes Campaign UTM tag
eq_utm_referrer string yes yes Extended UTM Referrer tag
eq_utm_expid string yes yes Extended UTM tag Expid
UTM tags
utm_source string yes yes UTM Source tag
utm_medium string yes yes UTM tag Medium
utm_term string yes yes UTM tag Term
utm_content string yes yes UTM tag Content
utm_campaign string yes yes Campaign UTM tag
utm_referrer string yes yes Referrer UTM tag
utm_expid string yes yes Expid UTM tag
Openstat Tags
openstat_ad string yes yes Ad ID
openstat_campaign string yes yes Advertising campaign ID
openstat_service string yes yes Identifier of the service providing the service
openstat_source string yes yes ID of the site, section, page, the corresponding advertisement was shown
Other URL tags
ef_id string yes yes Used to mark up links in the AdLense contextual advertising management system
yclid string yes yes Yandex Click Identifier
gclid string yes yes Gclid label
cm_id string yes yes cm_id is a set of ValueTrack. ValueTrack are URL parameters that can be added to landing page URLs to collect click source information.
ymclid string yes yes Label value ymclid
tag_from string yes yes From label
Geography
visitor_country string yes yes Visitor country
visitor_region string yes yes Visitor region
visitor_city string yes yes Visitor city
visitor_provider string yes yes Visitor's Internet provider
visitor_ip_address string yes yes Visitor IP address
Computer
visitor_browser_name string yes yes Visitor's browser
visitor_browser_version string yes yes Visitor's browser version
visitor_os_name string yes yes Name of the visitor's operating system
visitor_os_version string yes yes Visitor operating system version
visitor_language string yes yes Localization of the visitor's device
visitor_screen string yes yes Visitor monitor resolution
visitor_device object yes yes Visitor device
value string Name of values
value_id string Unique value identifier
Visitor history
visitor_session_id number yes yes Unique visitor session identifier
entrance_page string yes yes Login page
visitor_type object yes yes Visitor type
value string Name of values
value_id string Unique value identifier
visitor_id number yes yes yes Unique visitor identifier
person_id number yes yes yes Unique person identifier
ua_client_id string yes yes Unique identifier in Universal Analytics
ym_client_id string yes yes Unique Yandex.Metrica user identifier
List of segments
segments array yes Segments
segment_name string yes Segment name
Visiting time
visit_date iso8601 YYYY-MM-DD yes yes Date of visit
visit_hour object yes yes Visiting hour
value string Name of values
value_id string Unique value identifier
visit_weekday object yes yes Day of week of visit
value string Name of values
value_id string Unique value identifier
visit_month object yes yes Month of visit
value string Name of values
value_id string Unique value identifier
visit_year string yes yes Year of visit
Calls
call_type object yes yes yes Call type
value string Name of values
value_id string Unique value identifier
call_status object yes yes yes Indicates whether the call was missed.
value string Name of values
value_id string Unique value identifier
call_direction object yes yes yes Call direction
value string Name of values
value_id string Unique value identifier
phone_tracking_type object yes yes Call tracking number type
value string Name of values
value_id string Unique value identifier
call_region_name string yes yes Caller's region.
call_records array yes yes Unique recording link ID.
Requests
offline_message_type object yes yes yes Application type
value string Name of values
value_id string Unique value identifier
offline_message_email string yes yes yes E-mail address left by the visitor in the application
offline_message_text string yes yes yes Text left by the visitor in the application
Chat
chat_initiator object yes yes yes Chat initiator
value string Name of values
value_id string Unique value identifier
chat_status object yes yesyes Chat status
value string Name of values
value_id string Unique value identifier
chat_messages_count number yes yes yes Number of messages in chat
Goals
goal_type object yes yes Target type
value string Name of values
value_id string Unique value identifier
goal_name string yes yes yes Target name
deals array no no no Related transactions
ext_id string External unique transaction identifier
date_time iso8601 Trade time
current_stage string Current stage of the transaction
Mail
email_message string yes yes yes Message body
email_from string yes yes yes Sender
email_cc array yes yes yes Copy. Array of addresses.
email_bcc array yes yes yes Bcc. Array of addresses.
email_message_html string yes yes yes HTML body
email_to string yes yes yes Recipient
email_subject string yes yes yes Email subject
Advertising systems
site_analytics object yes yes yes Integration block
value string Name of values
value_id string Unique value identifier
pc string yes yes yes Integrated advertising campaign
gr string yes yes yes Ad group
ad string yes yes yes Announcement
kw string yes yes yes Keyword

Example request

{
"jsonrpc":"2.0",
"id":"number",
"method":"get.communications",
"params":{
"access_token":"string",
"user_id":"number",
"offset":"number",
"limit":"number",
"report_id": "number",
"date_from":"iso8601",
"date_till":"iso8601",
"filter":{
},
"sort":[
{
"field":"string",
"order":"string"
}
],
"fields":[
"string"
]

}
}

Example response

{
"jsonrpc":"2.0",
"id":"number",
"result":{
"metadata":{

},
"data":[
{
"site_domain_name":"string",
"site_domain_naked":"string",
"communication_type":{
"value_id": "string",
"value": "string"
},
"communication_id":"string",
"communication_date_time":"iso8601",
"communication_kinds":[

],
"communication_page_url":"string",
"is_communication_with_visit":{
"value_id": "string",
"value": "string"
},
"communication_number":"number",
"contact_phone_number":"string",
"virtual_phone_number":"string",
"contact_full_name":"string",
"total_duration":"number",
"tags":{
"communication_id": "number",
"communication_type": "string",
"items":[
{
"id": "string",
"name": "string"
}
]
},
"employees":[
{
"employee_full_name":"string"
}
],
"campaign_name":"string",
"channel_new":"string",
"channel_code":"string",
"source_new":"string",
"source_name":"string",
"channel":"string",
"source":"string",
"referrer":"string",
"referrer_domain":"string",
"search_query":"string",
"eq_utm_source":"string",
"eq_utm_medium":"string",
"eq_utm_term":"string",
"eq_utm_content":"string",
"eq_utm_campaign":"string",
"eq_utm_referrer":"string",
"eq_utm_expid":"string",
"utm_source":"string",
"utm_medium":"string",
"utm_term":"string",
"utm_content":"string",
"utm_campaign":"string",
"utm_referrer":"string",
"utm_expid":"string",
"openstat_ad":"string",
"openstat_campaign":"string",
"openstat_service":"string",
"openstat_source":"string",
"ef_id":"string",
"yclid":"string",
"gclid":"string",
"cm_id":"string",
"ymclid":"string",
"tag_from":"string",
"visitor_country":"string",
"visitor_region":"string",
"visitor_city":"string",
"visitor_provider":"string",
"visitor_ip_address":"string",
"visitor_browser_name":"string",
"visitor_browser_version":"string",
"visitor_os_name":"string",
"visitor_os_version":"string",
"visitor_language":"string",
"visitor_screen":"string",
"visitor_device":{
"value_id": "string",
"value": "string"
},
"visitor_session_id":"number",
"entrance_page":"string",
"visitor_type":{
"value_id": "string",
"value": "string"
},
"visitor_id":"number",
"person_id":"number",
"ua_client_id":"string",
"ym_client_id":"string",
"segments":[
{
"segment_name":"string"
}
],
"visit_date":"iso8601",
"visit_hour":{
"value_id": "string",
"value": "string"
},
"visit_weekday":{
"value_id": "string",
"value": "string"
},
"visit_month":{
"value_id": "string",
"value": "string"
},
"visit_year":"string",
"call_type":{
"value_id": "string",
"value": "string"
},
"call_status":{
"value_id": "string",
"value": "string"
},
"call_direction":{
"value_id": "string",
"value": "string"
},
"phone_tracking_type":{
"value_id": "string",
"value": "string"
},
"call_region_name":"string",
"call_records":[

],
"offline_message_type":{
"value_id": "string",
"value": "string"
},
"offline_message_email":"string",
"offline_message_text":"string",
"chat_initiator":{
"value_id": "string",
"value": "string"
},
"chat_status":{
"value_id": "string",
"value": "string"
},
"chat_messages_count":"number",
"goal_type":{
"value_id": "string",
"value": "string"
},
"goal_name":"string",
"deals": [
{
"ext_id": "string",
"date_time": "iso8601",
"current_stage": "string"
},
{
"ext_id": "string",
"date_time": "iso8601",
"current_stage": "string"
}
],
"pc":"string",
"gr":"string",
"ad":"string",
"kw":"string",
"site_analytics":{
"value_id": "string",
"value": "string"
}
}
]
}
}

Possible errors

See the "Errors for get methods" section.