Skip to content

Get calls report

Getting call session reports

Method get.calls_report
Description Getting call session reports "List of queries" -> "Calls"
Who has access Partner, Customer

Parameters of a request

Title Type Required Valid values Description
access_token string yes Authentication session key
user_id number no Unique ID of an agent's customer user who makes request
Is required for agent
To access a list of customer users, use the method "get.customer_users"
limit number no Returning entries count. Refer to "Paging"
offset number no Offset that defines from which number to return the entries "limit". Default value is "0". Refer to "Paging"
filter object no Refer to "Filters"
fields array no Refer to "Viewing returning data"
sort array no Refer to "Data sorting"
date_from iso8601 yes YYYY-MM-DD hh:mm:ss Selection start date
date_till iso8601 yes YYYY-MM-DD hh:mm:ss Selection end day
include_ongoing_calls boolean no Switch on ongoing calls

Parameters of a reply

Title Type Valid values Filtering Sorting Default reply Description
id number yes yes Call session unique ID
start_time iso8601 YYYY-MM-DD hh:mm:ss yes yes Time and date when call sessions starts
finish_time iso8601 YYYY-MM-DD hh:mm:ss yes Time when call sessions ends
finish_reason enum numb_not_exists incorrect_input numb_is_inactive sitephone_is_not_configured app_is_inactive numa_in_black_list no_active_scenario simple_forwarding_is_not_configured site_not_exists call_generator_is_not_configured add_cdr_timeout success_finish api_permission_denied api_ip_now_allowed component_is_inactive employee_not_exists not_enough_money platform_not_found internal_error incorrect_config communication_unavailable subscriber_disconnects no_operation scenario_not_found no_money transfer_disconnects scenario_disconnects fax_session_done no_resources another_operator_answer subscriber_busy subscriber_not_responsible subscriber_number_problems operator_answer locked_numb call_not_allowed_on_tp account_not_found contract_not_found operator_busy operator_not_responsible operator_disconnects operator_number_problems timeout operator_channels_busy locked_phone max_in_call_reached max_out_call_reached employee_busy phone_group_inactive_by_schedule sip_offline employee_inactive employee_inactive_by_schedule employee_phone_inactive action_interval_exceeded group_phone_inactive no_operator_confirmation max_transition_count_exceeded no_success_subscriber_call no_success_operator_call disconnect_before_call_processing processing_method_not_found employee_without_phones group_without_phones no_operator_cdr_found yes yes yes Reason why a call session ended
  • numb_not_exists - Virtual number is not found
  • incorrect_input - Incorrect input
  • numb_is_inactive - Virtual number is inactive
  • sitephone_is_not_configured - Sitephone is not configured
  • app_is_inactive - App is inactive
  • numa_in_black_list - Calling number is in the blacklist
  • no_active_scenario - No active scenario is found
  • simple_forwarding_is_not_configured - Analytics: Simple forwarding is not configured
  • site_not_exists - Website is not found
  • call_generator_is_not_configured - Call generator is not configured
  • add_cdr_timeout - Not determined
  • success_finish - Not determined
  • api_permission_denied - Access to Call API is denied
  • api_ip_now_allowed - IP address is not in the whitelist
  • component_is_inactive - Component is inactive
  • employee_not_exists - Employee is not found
  • not_enough_money - Not enough money
  • platform_not_found - Contact technical support
  • internal_error - Contact technical support
  • incorrect_config - Incorrect configuration
  • communication_unavailable - Unavailable type of communication
  • subscriber_disconnects - Subscriber disconnected
  • no_operation - No operation to process
  • scenario_not_found - Scenario not found
  • no_money - Ran out of money or the financial limit is reached
  • transfer_disconnects - Disconnect an employee during transfer
  • scenario_disconnects - Disconnect an employee when starting a scenario
  • fax_session_done - Fax is received
  • no_resources - Customer limit is reached
  • another_operator_answer - Another employee answered
  • subscriber_busy - Subscriber is busy
  • subscriber_not_responsible - Subscriber does not respond
  • subscriber_number_problems - Problems with subscriber's number. Contact technical support.
  • operator_answer - Employee answered
  • locked_numb - Calls to a number are prohibited by security settings
  • call_not_allowed_on_tp - Call is not allowed by a service plan
  • account_not_found - Account is not found
  • contract_not_found - Contract is not found
  • operator_busy - Operator is busy
  • operator_not_responsible - Operator does not respond
  • operator_disconnects - Operator disconnected
  • operator_number_problems - Problems with operator's number. Contact technical support.
  • timeout - Time of a dial up is out
  • operator_channels_busy - No more available lines on call transferring number
  • locked_phone - Network problems
  • max_in_call_reached - Limit of lines for incoming calls is reached
  • max_out_call_reached - Limit of lines for outgoing calls is reached
  • employee_busy - Employee is busy with another call
  • phone_group_inactive_by_schedule - Numbers group is inactive according to a scenario
  • sip_offline - SIP-line is not registered
  • employee_inactive - Employee is inactive
  • employee_inactive_by_schedule - Employee is inactive according to a schedule
  • employee_phone_inactive - Employee number is inactive
  • action_interval_exceeded - Interval, specified in the operation, is exceeded
  • group_phone_inactive - A number in a group is not available
  • no_operator_confirmation - Employee did not confirm a call
  • max_transition_count_exceeded - Transitions from operations from a scenario limit is reacged
  • no_success_subscriber_call - Couldn't reach a subscriber
  • no_success_operator_call - Couldn't reach an employee
  • disconnect_before_call_processing - Disconnection before a call is processed
  • processing_method_not_found - Processing method is not found
  • employee_without_phones - Employee doesn't have numbers
  • group_without_phones - Employee group doesn't have numbers
  • no_operator_cdr_found - Calls for employees are not found
direction enum
  • in - Incoming;
  • out - Outgoing
yes yes yes Call session direction
cpn_region_id number yes yes yes Subscriber number region unique ID
cpn_region_name string yes yes yes Subscriber number region name
Operations of a scenario
scenario_operations array yes no no List of all the operations in all the scenarios that take part in call processing.
id number Scenario operation unique ID
name string Scenario operation name
source enum
  • callapi - Call API Base set
  • callapi_management_call - Call API Call management
  • callapi_informer_call - Call API Informer call
  • callapi_scenario_call - Call API Scenario call
  • va - VPBX call
  • call_tracking - Analytics
  • dynamic_call_tracking - Dynamic call tracking
  • callout - Callout
  • callback - Callback
  • faxout - Fax
  • sip - Incoming call from SIP
  • consultant - Consultant
  • sitephone - Site phone
  • lead - Lead generator
  • retailcrm - Call from a retailCRM
  • amocrm - Call from amoCRM
  • bitrix - Call from Bitrix24
  • auto_back_call - Missed calls auto redialing
yes yes yes Call source
is_lost boolean yes yes yes Sign whether a call is lost or successful
communication_number number yes yes Always empty for VPBX sessions, this is the ideology of service at the moment
communication_page_url string no no no URL of a page on which a visitor was at the time of the call or a page of the last visitor interaction before the call.
contact_phone_number string yes yes Contact number from which the call was received in case of an incoming call, or contact number to which a call was made in case of an outgoing call.
communication_id number yes yes Communication ID
communication_type enum call yes Communication type
wait_duration number yes yes Waiting time until the first conversation with the employee. Value is in seconds.
total_wait_duration number yes yes Total waiting time for a subscriber. It takes into account all the intervals when the subscriber did not talk to an employee. Value is in seconds.
lost_call_processing_duration number yes yes Lost call processing duration. It taks into account time from a moment of a missed call to the first successful call. Value is in seconds
talk_duration number yes yes Talk duration. It takes into account time from the first conversation with a subscriber to the beggining of post processing
clean_talk_duration number yes yes Clean talk duration. Takes into account only those time periods when a subscriber was talking to an employee. Value is in seconds
total_duration number yes yes Total duration of a call, value is in seconds
postprocess_duration number yes Postprocessing duration, value is in seconds
call_records array yes Unique ID of a link that leads to a recorded conversation. You can listen to it calling a request in a browser: https://app.callgear.com/system/media/talk/{communication_id}/{unique ID of a link that leads to a recorded conversation}/
voice_mail_records array Unique ID of a link that leads to a message in voice mail. You can listen to it calling a request in a browser: https://app.callgear.com/system/media/voice_mail/{communication_id}/{unique ID of a link that leads to a message in voice mail}/
virtual_phone_number string yes yes yes Virtual number
ua_client_id string Unique ID in Universal Analytics
ym_client_id string User unique ID in Yandex.Metrika
sale_date iso8601 YYYY-MM-DD hh:mm:ss yes yes Sale date
sale_cost number yes yes Sale cost
is_transfer boolean true, false yes yes Wether or not call session included a transfer
search_query string yes Search query
search_engine string yes Search engine name
referrer_domain string yes Domain referrer
referrer string yes Referral source
entrance_page string yes Entrance 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 tag links in AdLense
channel enum
  • display
  • paid
  • affiliate
  • messenger
  • social
  • email
  • organic
  • internal
  • recommendation
  • cashed
  • referral
  • direct
yes Channel
Used tags
tags array yes Tags, refer to the method "get.tags"
tag_name string Tag name
tag_id number Tag unique ID
tag_change_time iso8601 YYYY-MM-DD hh:mm:ss Time when tag was used
tag_type enum auto, manual Tag type
tag_user_id number Unique ID of a user who used a tag
tag_user_login string Login of a user who used a tag
tag_employee_id number Unique ID of an employee who used a tag
tag_employee_full_name string Full name of an employee who used a tag
Employees who participated in a call
employees array yes Employees who participated in a call
employee_id number Employee unique ID
employee_full_name string Employee full name
is_answered boolean Whether or not an employee answered
is_talked boolean Whether or not an employee participated in the conversation
Last answered employee
last_answered_employee_id number yes Unique ID of an employee who was the last to take a phone
last_answered_employee_full_name string yes Full name of an employee who was the last to take a phone
last_answered_employee_rating number yes Rating of an employee who was the last to take a phone
First answered employee
first_answered_employee_id number yes Unique ID of the employee who first picked up the phone
first_answered_employee_full_name string yes Full name of the employee who first picked up the phone
Last employee talking
last_talked_employee_id number yes Unique ID of the last employee talking
last_talked_employee_full_name string yes Full name of the last employee talking
First employee talking
first_talked_employee_id number yes Unique ID of the first employee talking
first_talked_employee_full_name string yes Full name of the first employee talking
Scenario
scenario_name string yes Name of the scenario where the call processing started
scenario_id number yes yes Unique ID of the scenario where the call processing started
Website
site_domain_name string yes Website address on the internet. Without protocol - "http://" or "https://"
site_id number yes yes Website unique ID
Advertising campaign
campaign_name string yes Advertising campaign name
campaign_id number yes yes Advertising campaign ID
visit_other_campaign boolean true, false The flag indicates whether a visitor has visited other advertising campaigns (within a person)
Information about payment
visitor_id number yes yes Visitor unique ID
person_id number yes Person unique ID
visitor_type enum New, Returned, Not filled in yes yes Visitor type
visitor_session_id number yes Visitor session unique ID
visits_count number yes Total visitor's visits count
visitor_first_campaign_id number yes First advertising campaign unique ID
visitor_first_campaign_name string yes First advertising campaign name
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 JavaScript API [method CallGear.setProperty]
property_name string Property name that's to be assigned
property_value string Property value
Segments
segments array yes Segments
segment_id number Segment unique ID
segment_name string Segment name
Call API
call_api_request_id number yes Request to API unique ID.
call_api_external_id string yes A unique ID that may be a call event with an external system.
Address book contact
contact_id number yes Contact unique ID
contact_full_name string yes Contact full name
UTM tags
utm_source string yes Campaign source
utm_medium string yes Campaign channel
utm_term string yes Campaign key word
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 Service provider ID
openstat_source string yes ID of a website, a section, a page, the corresponding advertisement was shown
Inquiry attributes
attributes array
  • first - First quality
  • through - First through quality
  • primary - Primary
  • secondary - Secondary
  • lost - Lost
  • target - Targeted
  • off-target - Off targeted
  • quality - Quality
  • rest - Targeted repeated calls (calls made during the period of repeated calls configured for a website in CallGear client area).
yes Inquiry attributes
Expanded UTM tags
eq_utm_source string yes Expanded utm_source
eq_utm_medium string yes Expanded utm_medium
eq_utm_term string yes Expanded utm_term
eq_utm_content string yes Expanded utm_content
eq_utm_campaign string yes Expanded utm_campaign
eq_utm_referrer string yes Expanded utm_referrer
eq_utm_expid string yes Expanded utm_expid

JSON request structure

{
  "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"
    ]
  }
}

JSON reply structure

{
  "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",
        "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",
        "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"
          }
        ],
        "scenario_operations": [
          {
            "name": "string",
            "id": "number"
          }
        ]
      }
    ]
  }
}

List of returning errors

Refer to the section "List of errors for the methods with the verb get"