Skip to content

Get financial call legs report

Getting detailed reports about charge-off history on all the call sessions legs

Method get.financial_call_legs_report
Description Getting detailed reports about charge-off history on all the call sessions legs
Who has access Partner, Customer

Calls from the consultant and the sitephone forms are considered outgoing calls.

Parameters of a request

Title Type Required Valid value Description
access_token string yes Authentication session key
user_id number no Unique user ID of agent's customer who makes request
Is required for agent
To get 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 Sampling start date
date_till iso8601 yes YYYY-MM-DD hh:mm:ss Sampling end date

Parameters of a reply

Title Type Valid values Filtering Sorting Default reply Description
start_time iso8601 YYYY-MM-DD hh:mm:ss yes yes Time and date of a leg
direction enum
  • in - Incoming;
  • out - Outgoing
yes yes yes Leg direction
source enum
  • callapi - Call API;
  • callapi_informer_call - Call API informer call;
  • callapi_scenario_call - Call API scenario call
  • callback - Callback;
  • callout - Callout;
  • call_tracking- Analytics;
  • dynamic_call_tracking - Dynamic call tracking;
  • va - Virtual PBX;
  • sip - Outgoing call from SIP;
  • consultant - Call from Consultant;
  • lead - Call from Lead generator;
  • sitephone - Call from Sitephone;
  • faxout - Outgoing fax;
  • retailcrm - retailCRM
yes yes yes Leg source
call_session_id number yes yes yes Unique call session ID, refer to the method "get.calls_report"
leg_id number yes yes yes Unique call ID, refer to the method "get.call_legs_report"
There can be several calls in one call session
calling_phone_number string yes yes yes Calling phone number
called_phone_number string yes yes yes Called phone number
duration number yes yes yes Call duration, value is in seconds
chargeable_duration number yes yes yes Chargeable call duration, value is in seconds
direction_type enum
  • international - international;
  • national - national;
  • local - local (Moscow and Moscow area);
  • mobile - Mobile
yes yes yes Call direction type
cost_per_minute number yes yes yes Cost per minute
total_charge number yes yes yes Total call cost
bonuses_charge number yes yes yes Payed with bonuses

JSON request structure

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.financial_call_legs_report",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "date_from":"iso8601",
    "date_till":"iso8601",
    "filter":{

    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

JSON reply structure

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

    },
    "data":[
      {
        "start_time":"iso8601",
        "direction":"enum",
        "source":"enum",
        "call_session_id":"string",
        "leg_id":"number",
        "calling_phone_number":"string",
        "called_phone_number":"string",
        "duration":"number",
        "chargeable_duration":"number",
        "direction_type":"enum",
        "cost_per_minute":"number",
        "total_charge":"number",
        "bonuses_charge":"number"
      }
    ]
  }
}

List of returning errors

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