Skip to content

Retrieves call session data.

Retrieves call session data.

Method get.calls_report
Description Retrieves call session data.
Who has access Partners and clients

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 returned. See section "Paging"
offset number no Shift determines from which record number to return "limit" records. Default is "0". See section "Paging"
filter object no See section "Filtering Criteria"
sort array no See section "Sorting data"
date_from iso8601 yes YYYY-MM-DD hh:mm:ss Start date and time of the reporting period.
date_till iso8601 yes YYYY-MM-DD hh:mm:ss End date and time of the reporting period.
include_ongoing_calls boolean no Enable ongoing calls

Response parameters

Name Type Valid values Filtering Sorting Default response Description
id number yes yes Unique call session identifier
start_time iso8601 YYYY-MM-DD hh:mm:ss yes yes Date and time when the call session started
finish_time iso8601 YYYY-MM-DD hh:mm:ss yes Call session end time
finish_reason enum yes yes yes Reason for ending the call session. A list of possible causes is provided below
direction enum in - Incoming; out - Outgoing yes yes yes Call session direction
cpn_region_id number yes yesyes Unique ID of the caller's region.
cpn_region_name string yes yes yes Name of the caller's region.
cpn_country_name string yes yes yes Name of the caller's country.
cpn_country_id string yes yes yes Unique ID of the caller's country.
properties string Callback forms may have a field with a comment (text). If the user leaves a comment (text) when generating a call back, it will be displayed in this field.
Script Operations
scenario_operations array yes no no List of all operations for all scenarios involved in call processing.
id number Unique scenario operation ID.
name string Script operation name
source enum callapi - Call API Basic set callapi_management_call - Call API Call management callapi_informer_call - Call API Information call callapi_scenario_call - Call API Call script va - VATS call call_tracking - Analytics dynamic_call_tracking - Dynamic call tracking faxout - Fax sip - Outgoing from SIP sitephone - Sitephone lead - Lead Generator retailcrm - Call from retailCRM amocrm - Call from amoCRM bitrix - Call from Bitrix24 auto_back_call_by_lost_call - Auto call back for missed calls sip_trunk - Call from SIP trunk facebook_ads - Calls from Social Network Ads auto_back_call_by_offline_message - Automatic call back for requests private_number - Verification call to add a client number from your CallGear account auto_out_calls - Outgoing call ivr_informer - Information from IVR upload_calls - Call from an external system progressive_call - Progressive simple_dt - Simple dynamic call tracking preserved_calls - Saved redirect amocrm_extended_integration - Auto call back from CRM zoho - Zoho mytarget_ads - Calls from myTarget Ads pipedrive - Pipedrive hubspot - HubSpotsmartis - Calls from Smarties partner_integration - Affiliate integration vk_ads - Calls from VK Ads omni_widget - Omnichannel widget yes yes yes Call source
is_lost boolean yes yes yes Indicates whether the call was missed.
communication_number number yes yes For a VATS session, the VATS is always empty, this is now the ideology of the service
communication_page_url string no no no 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.
contact_phone_number string yes yes For inbound calls, the contact number that placed the call. For outbound calls, the contact number that was called.
communication_id number yes yes Unique communication ID.
communication_type enum call yes Communication type.
wait_duration number yes yes Time, in seconds, from the start of the call until the first employee answers.
total_wait_duration number yes yes Total time, in seconds, during which the caller was not speaking with an employee.
lost_call_processing_duration number yes yes Duration of processing a missed call. It is counted from the moment of a missed conversation to the first successful one. Value in seconds
talk_duration number yes yes Time, in seconds, from the start of the first conversation until post-call processing begins.
clean_talk_duration number yes yes Total time, in seconds, during which the caller and an employee were speaking.
total_duration number yes yes Call duration, value in seconds
postprocess_duration number yes Duration of post-call processing, value in seconds
call_records array yes ID used to access the call recording. Open the following URL in a browser: https://app.callgear.com/system/media/talk/{communication_id}/{recording_link_id}/
wav_call_records array yes ID used to access the WAV call recording. Open the following URL in a browser: https://app.callgear.com/system/media/wav/{communication_id}/{wav_recording_link_id}/
full_record_file_link string yes Link to the complete call recording: https://media.callgear.com/{communication_id}/{recording_link_id}
voice_mail_records array ID used to access the voicemail recording. Open the following URL in a browser: https://app.callgear.com/system/media/voice_mail/{communication_id}/{voice_message_link_id}/
virtual_phone_number string yes yes yes Virtual number
ua_client_id string Unique identifier in Universal Analytics
ym_client_id string Unique Yandex.Metrica user identifier
sale_date iso8601 YYYY-MM-DD hh:mm:ss yes yes Trade date
sale_cost number yes yes Transaction amount
is_transfer boolean true, false yes yes Was there a transfer during the call session
search_query string yes Search query
search_engine string yes Search engine name
referrer_domain string yes Referrer domain
referrer string yes Transition source
entrance_page string yes Login page
gclid string yes Google Click Identifier
yclid string yes Yandex Click Identifier
ymclid string Yandex Market Click Identifier
ef_id string yes Used to mark up links in the AdLense system
channel enum display paid affiliate messenger social email organic internal recommendation cashed referral direct yes Channel.
Added tags
tags array yes Tags, see method "get.tags"
tag_name string Tag name
tag_id number Unique tag identifier
tag_change_time iso8601 YYYY-MM-DD hh:mm:ss Tag insertion time
tag_type enum auto, manual Tag type
tag_user_id number Unique ID of the user who added the tag.
tag_user_login string Login of the user who added the tag
tag_employee_id number Unique ID of the employee who added the tag.
tag_employee_full_name string Full name of the employee who added the tag
Employees who participated in the call
employees array yes Employees who participated in the call
employee_id number Unique employee identifier
employee_full_name string Employee full name.
is_answered boolean Indicates whether the employee answered the call.
is_talked boolean Indicates whether the employee participated in the conversation.
Last employee to respond
last_answered_employee_id number yes Unique ID of the last employee who answered the call.
last_answered_employee_full_name string yes Full name of the last employee who answered the phone
last_answered_employee_rating number yes Rating the caller assigned to the last employee who spoke.
First employee to respond
first_answered_employee_id number yes Unique ID of the first employee who answered the call.
first_answered_employee_full_name string yes Full name of the first employee who answered the call.
Last employee who spoke
last_talked_employee_id number yes Unique ID of the last employee who spoke.
last_talked_employee_full_name string yes Full name of the last employee who spoke
First employee to talk
first_talked_employee_id number yes Unique ID of the first employee who spoke.
first_talked_employee_full_name string yes Full name of the first employee who spoke
Operator
operator_phone_number string yes Number of the operator who answered the call
Script
scenario_name string yes Name of the scenario according to which the call processing began
scenario_id number yes yes Unique ID of the scenario that initially processed the call.
Website
site_domain_name string yes Site address on the Internet. Without specifying the protocol - "http://" or "https://"
site_id number yes yes Unique site identifier
Advertising campaign
campaign_name string yes Advertising campaign name
campaign_id number yes yes Unique advertising campaign ID.
visit_other_campaign boolean true, false The flag shows whether the visitor (within the person) visited other advertising campaigns
auto_call_campaign_name string yes yes Name of outbound call campaign"
Visitor information
visitor_id number yes yes Unique visitor identifier
person_id number yes Unique person identifier
visitor_type enum New, Returned, Emptyyes yes Visitor type
visitor_session_id number yes Unique visitor session identifier
visits_count number yes Total number of visits by the visitor
visitor_first_campaign_id number yes Unique ID of the visitor's first advertising campaign.
visitor_first_campaign_name string yes Name of the first advertising campaign
visitor_city string yes Visitor city
visitor_region string yes Visitor region
visitor_country string yes Visitor country
visitor_device enum desktop mobile tablet other yes yes User device
Visitor properties
visitor_custom_properties array yes Visitor properties that can be set using the JavaScript API [Comagic.setProperty method]
property_name string Name of the property to be assigned
property_value string Property value
Segments
segments array yes Segments
segment_id number Unique segment identifier
segment_name string Segment name
Call API
call_api_request_id number yes Unique Call API request ID.
call_api_external_id string yes A unique identifier that can be a call event with an external system.
Contact from address book
contact_id number yes Unique contact identifier
contact_full_name string yes Last name First name Middle name of contact
UTM tags
utm_source string yes Campaign source
utm_medium string yes Campaign Channel
utm_term string yes Campaign keyword
utm_content string yes Campaign content
utm_campaign string yes Campaign name
OS tags
openstat_ad string yes Ad ID
openstat_campaign string yes Advertising campaign ID
openstat_service string yes Identifier of the service providing the service
openstat_source string yes ID of the site, section, page, the corresponding advertisement was shown
Hit attributes
attributes array first - First quality through - End-to-end first quality primary - Primary secondary - Secondary lost - Losttarget - Target off-target - Not targeted quality - Quality rest - target repeated requests (requests made during the period of repeated requests configured for the site in the CallGear account). yes Hit attributes
Extended UTM tags
eq_utm_source string yes Extended utm_source
eq_utm_medium string yes Extended utm_medium
eq_utm_term string yes Extended utm_term
eq_utm_content string yes Extended utm_content
eq_utm_campaign string yes Extended utm_campaign
eq_utm_referrer string yes Extended utm_referrer
eq_utm_expid string yes Extended utm_expid
Source information
source_id number yes yes Source ID (detailed).
source_name string yes yes Source (detailed). Source name
source_new string yes yes Source(new). Source group
channel_new string yes yes Channel(new). Source channel name
channel_code string yes yes Channel mnemonic
ext_id string yes yes A unique call identifier in your system.

Call session completion reasons

Mnemonics Description
numb_not_exists Virtual number not found
incorrect_input Invalid input
numb_is_inactive Virtual number is not active
Sitephone_is_not_configured WebSitephone is not configured
app_is_inactive Client deactivated
numa_in_black_list Blacklisted caller
no_active_scenario No active script found
simple_forwarding_is_not_configured Analytics: simple redirection is not configured
site_not_exists Site not found
call_generator_is_not_configured The lead generator is not configured
add_cdr_timeout Not defined
success_finish Not defined
api_permission_denied Access to Call API is denied
api_ip_now_allowed IP address not on the allowed list
component_is_inactive Component not active
employees_not_exists Employee not found
not_enough_money Insufficient funds
platform_not_found Contact Technical Support
internal_error Contact Technical Support
incorrect_config Invalid configuration
communication_unavailable Unavailable connection type
caller_disconnects The caller disconnected.
no_operation No operation to process
transfer_disconnects Disabling an employee during a transfer
scenario_disconnects Disabling an employee when running a script
fax_session_done Fax received
no_resources Client limit has been reached
another_operator_answer We reached another employee
caller_busy The caller is busy.
caller_not_responsive The caller did not answer.
caller_number_problems There is a problem with the caller's phone number. Contact technical support.
operator_answer We reached an employee
locked_numb Calls to this number are prohibited by security settings
call_not_allowed_on_tp The call is prohibited according to the tariff plan
account_not_found CallGear account not found.
contract_not_found Contract not found
operator_busy Employee is busy
operator_not_responsive Employee not responding
operator_disconnects The employee disconnected
operator_number_problems Problems with the employee's phone number. Contact technical support.
timeout The call time has expired
operator_channels_busy Out of available lines at the forwarding number
locked_phone Network problems
max_in_call_reached Line limit for incoming calls reached
max_out_call_reached Line limit for outgoing calls reached
employee_busy Employee talking on another call
employee_busy_after_call Employee busy after calling
sip_offline SIP line is not registered
employee_inactive Employee inactive
employee_inactive_by_schedule Employee is inactive according to schedule
employee_phone_inactive Employee number is inactive
employee_phone_inactive_by_schedule Employee number is inactive according to schedule
action_interval_exceeded The interval specified for the operation has been exceeded
group_phone_inactive Group number unavailable
no_operator_confirmation The employee did not confirm the call
max_transition_count_exceeded The maximum number of transitions for script operations has been reached
disconnect_before_call_processing Disconnect before call processing
no_success_caller_call The caller could not be reached.
no_success_operator_call Didn't get through to the employee
group_inactive_by_schedule Group of employees is inactive according to schedule
net_lock The operator's network is blocked
fmc_is_disabled FMC service disabled
fmc_is_locked FMC line blocked
processing_method_not_found Processing method not found
employee_without_phones The employee has no numbers
group_without_phones There are no numbers in the employee group
no_operator_cdr_found No employee calls found
in_call_not_allowed Incoming calls are prohibited
phone_protocol_not_allowed_by_status Calls from this type of number are prohibited by status
employee_status_break Employee in "Break" status
employee_status_do_not_disturb Employee in "Do Not Disturb" status
employee_status_not_at_work Employee with "Out of Office" status
sip_trunk_is_locked SIP trunk blocked
numa_in_spam_list Spam call
numa_dnd_interval Called recently
limit_exceeded Financial limit reached
no_money Insufficient funds
out_call_not_allowed Outgoing calls are prohibited
out_call_not_allowed_by_status Outgoing calls are prohibited by status
external_call_not_allowed External calls are prohibited
external_call_not_allowed_by_status External calls are prohibited by status
internal_call_not_allowed Internal calls are prohibited
internal_call_not_allowed_by_status Internal calls are prohibited by status
call_enqueued Call queued
employee_status_auto_out_call Employee in the status "Outgoing call"
employee_status_available Employee with "Available" status
too_many_identical_incoming_calls Too many identical incoming calls
employee_auto_status_do_not_disturb Employee in automatic Do Not Disturb status
auto_out_calls_not_allowed_by_status Outgoing calling is prohibited by status

Example request

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

}
}

Example response

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

},
"data": [
{
"id": "number",
"start_time": "iso8601",
"finish_time": "iso8601",
"virtual_phone_number": "string",
"is_transfer": "boolean",
"finish_reason": "enum",
"direction": "enum",
"source": "enum",
"communication_number": "number",
"communication_page_url": "string",
"communication_id": "number",
"communication_type": "enum",
"is_lost": "boolean",
"cpn_region_id": "number",
"cpn_region_name": "string",
"cpn_country_name": "string",
"cpn_country_id": "string",
"wait_duration": "number",
"total_wait_duration": "number",
"lost_call_processing_duration":"number",
"talk_duration": "number",
"clean_talk_duration": "number",
"total_duration": "number",
"postprocess_duration": "number",
"ua_client_id": "string",
"ym_client_id": "string",
"sale_date": "iso8601",
"sale_cost": "number",
"search_query": "string",
"search_engine": "string",
"referrer_domain": "string",
"referrer": "string",
"entrance_page": "string",
"gclid": "string",
"yclid": "string",
"ymclid": "string",
"ef_id": "string",
"channel": "enum",
"site_id": "number",
"site_domain_name": "string",
"campaign_id": "number",
"campaign_name": "string",
"auto_call_campaign_name": "string",
"visit_other_campaign": "boolean",
"visitor_id": "number",
"person_id": "number",
"visitor_type": "enum",
"visitor_session_id": "number",
"visits_count": "number",
"visitor_first_campaign_id": "number",
"visitor_first_campaign_name": "string",
"visitor_city": "string",
"visitor_region": "string",
"visitor_country": "string",
"visitor_device": "enum",
"last_answered_employee_id": "number",
"last_answered_employee_full_name": "string",
"last_answered_employee_rating": "number",
"first_answered_employee_id": "number",
"first_answered_employee_full_name": "string",
"scenario_id": "number",
"scenario_name": "string",
"call_api_external_id": "string",
"call_api_request_id": "number",
"contact_phone_number": "string",
"contact_full_name": "string",
"contact_id": "number",
"utm_source": "string",
"utm_medium": "string",
"utm_term": "string",
"utm_content": "string",
"utm_campaign": "string",
"openstat_ad": "string",
"openstat_campaign": "string",
"openstat_service": "string",
"openstat_source": "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",
"attributes": [

],
"call_records": [

],
"voice_mail_records": [

],
"tags": [
{
"tag_id": "number",
"tag_name": "string",
"tag_type": "enum",
"tag_change_time": "iso8601",
"tag_user_id": "number",
"tag_user_login": "string",
"tag_employee_id": "number",
"tag_employee_full_name": "string"
}
],
"visitor_custom_properties": [
{
"property_name": "string",
"property_value": "string"
}
],
"segments": [
{
"segment_id": "number",
"segment_name": "string"
}
],
"employees": [
{
"employee_id": "number",
"employee_full_name": "string",
"is_answered": "boolean"
}
],
"operator_phone_number": "string",
"scenario_operations": [
{
"name": "string",
"id": "number"
}
],
"source_id": "number",
"source_name": "string",
"source_new": "string",
"channel_new": "string",
"channel_code": "string",
"ext_id": "string",
"properties": "string"
}
]
}
}

Possible errors

See the "Errors for get methods" section.