Obtaining a detailed report on the history of charges for all arms of call sessions
| Method | get.financial_call_legs_report |
|---|---|
| Description | Obtaining a detailed report on the history of charges for all arms of calling sessions |
| Available to | Partner, Client |
Calls from consultant and sitephone forms are considered outgoing calls.
Request parameters
| Title | 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 agentTo 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" |
|
fields |
array | no | See "View of Returned Data" | |
sort |
array | no | See section "Sorting data" | |
date_from |
iso8601 | yes | YYYY-MM-DD hh:mm:ss | Sample start date |
date_till |
iso8601 | yes | YYYY-MM-DD hh:mm:ss | Sampling end date |
Response parameters
| Name | Type | Valid values | Filtering | Sorting | Default response | Description |
|---|---|---|---|---|---|---|
start_time |
iso8601 | YYYY-MM-DD hh:mm:ss | yes | yes | Leverage date and time | |
direction |
enum |
|
yes | yes | yes | Shoulder direction |
source |
enum |
|
yes | yes | yes | Arm source |
call_session_id |
number | yes | yes | yes |
Unique
session ID
call, see method "get.calls_report"
|
|
leg_id |
number | yes | yes | yes |
Unique
call ID,
see method "get.call_legs_report" Within one call session perhaps several calls |
|
calling_phone_number |
string | yes | yes | yes | Caller's phone number | |
called_phone_number |
string | yes | yes | yes | Phone number that was called | |
duration |
number | yes | yes | yes | Call duration, value in seconds | |
chargeable_duration |
number | yes | yes | yes | Charged call duration, value in seconds | |
direction_type |
enum |
|
yes | yes | yes | Call direction type |
cost_per_minute |
number | yes | yes | yes | Cost per minute | |
total_charge |
number | yes | yes | yes | Total cost of the call | |
bonuses_charge |
number | yes | yes | yes | Paid with bonuses |
JSON request structure```json
{ "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 response structure```json
{
"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 returned errors
See the section "List of errors for methods with the verb get"