History
Methods
GetCallHistory
Gets the account's call history, including call duration, cost, logs and other call information. You can filter the call history by a certain date
To call this method, make sure your service account has one of the following roles:
Parameters
from_date:
timestamp
The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
to_date:
timestamp
The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
timezone:
string
OptionalDefaults on: Etc/GMTThe selected timezone or the 'auto' value (the account location)
call_session_history_id:
intlist
OptionalTo get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). You can find the session ID in the AppEvents.Started event's sessionID property in a scenario, or retrieve it from the call_session_history_id value returned from the StartScenarios or StartConference methods
application_id:
number
OptionalTo receive the call history for a specific application, pass the application ID to this parameter
application_name:
string
OptionalThe application name, can be used instead of application_id
user_id:
intlist
OptionalTo receive the call history for a specific users, pass the user ID list separated by semicolon (;). If it's specified, the output contains the calls from the listed users only
rule_name:
string
OptionalTo receive the call history for a specific routing rule, pass the rule name to this parameter. Applies only if you set application_id or application_name
remote_number:
stringlist
OptionalTo receive a call history for a specific remote numbers, pass the number list separated by semicolon (;). A remote number is a number on the client side
local_number:
stringlist
OptionalTo receive a call history for a specific local numbers, pass the number list separated by semicolon (;). A local number is a number on the platform side
call_session_history_custom_data:
string
OptionalTo filter the call history by the custom_data passed to the call sessions, pass the custom data to this parameter
with_calls:
boolean
OptionalDefaults on: falseSpecifies whether to receive a list of sessions with all calls within the sessions, including phone numbers, call cost and other information
with_records:
boolean
OptionalDefaults on: falseSpecifies whether to get the calls' records
with_other_resources:
boolean
OptionalDefaults on: trueSet true to get other resources usage (see ResourceUsageType)
child_account_id:
intlist
OptionalThe child account ID list separated by semicolon (;). Use the 'all' value to select all child accounts
children_calls_only:
boolean
OptionalDefaults on: falseSet true to get the children account calls only
with_header:
boolean
OptionalDefaults on: trueSet false to get a CSV file without the column names if the output=csv
desc_order:
boolean
OptionalDefaults on: falseSet true to get records in the descent order
with_total_count:
boolean
OptionalDefaults on: trueSet false to omit the 'total_count' and increase performance
count:
number
OptionalDefaults on: 20The number of returning records. In the synchronous mode, the maximum value is 1000
offset:
number
OptionalDefaults on: 0The number of records to skip in the output with a maximum value of 10000
output:
string
OptionalDefaults on: jsonThe output format. The following values available: json, csv
is_async:
boolean
OptionalDefaults on: falseSet true to get records in the asynchronous mode (for csv output only). Use this mode to download large amounts of data. See the GetHistoryReports, DownloadHistoryReport functions for details
Returns
result:
The CallSessionInfoType records in sync mode or 1 in async mode
total_count:
number
The total found call session count (sync mode)
count:
number
The returned call session count (sync mode)
timezone:
string
The used timezone
history_report_id:
number
The history report ID (async mode)
GetBriefCallHistory
Gets the account's brief call history. Use the GetHistoryReports, DownloadHistoryReport methods to download the report.
To call this method, make sure your service account has one of the following roles:
Parameters
from_date:
timestamp
The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
to_date:
timestamp
The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
timezone:
string
OptionalDefaults on: Etc/GMTThe selected timezone or the 'auto' value (the account location)
call_session_history_id:
intlist
OptionalTo get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). You can find the session ID in the AppEvents.Started event's sessionID property in a scenario, or retrieve it from the call_session_history_id value returned from the StartScenarios or StartConference methods
application_id:
number
OptionalTo receive the call history for a specific application, pass the application ID to this parameter
application_name:
string
OptionalThe application name, can be used instead of application_id
rule_name:
string
OptionalTo receive the call history for a specific routing rule, pass the rule name to this parameter. Applies only if you set application_id or application_name
remote_number:
stringlist
OptionalTo receive a call history for a specific remote numbers, pass the number list separated by semicolon (;). A remote number is a number on the client side
local_number:
stringlist
OptionalTo receive a call history for a specific local numbers, pass the number list separated by semicolon (;). A local number is a number on the platform side
call_session_history_custom_data:
string
OptionalTo filter the call history by the custom_data passed to the call sessions, pass the custom data to this parameter
with_header:
boolean
OptionalDefaults on: trueSet false to get a CSV file without the column names if the output=csv
desc_order:
boolean
OptionalDefaults on: falseSet true to get records in the descent order
output:
string
The output format. The following values available: csv
is_async:
boolean
Set true to get records in the asynchronous mode. Use this mode to download large amounts of data. See the GetHistoryReports, DownloadHistoryReport functions for details
Returns
result:
number
In the async mode, the value is always 1
history_report_id:
number
The history report ID
GetHistoryReports
Gets the list of history reports and their statuses. The method returns info about reports made via GetCallHistory with the specified output=csv and is_async=true parameters. Note that the file_size field in response is valid only for video calls.
To call this method, make sure your service account has one of the following roles:
Parameters
history_report_id:
number
OptionalThe history report ID to filter
history_type:
stringlist
OptionalDefaults on: callsThe history report type list separated by semicolon (;). Use the 'all' value to select all history report types. The following values are possible: calls, transactions, audit, call_list
created_from:
timestamp
OptionalThe UTC creation from date filter in 24-h format: YYYY-MM-DD HH:mm:ss
created_to:
timestamp
OptionalThe UTC creation to date filter in 24-h format: YYYY-MM-DD HH:mm:ss
is_completed:
boolean
OptionalReport is completed
desc_order:
boolean
OptionalDefaults on: falseSet true to get records in the descent order
count:
number
OptionalDefaults on: 20The max returning record count
offset:
number
OptionalDefaults on: 0The first N records will be skipped in the output
application_id:
intlist
OptionalThe application ID to filter. Can be a list separated by semicolon (;). Use the 'all' value to select all applications
Returns
result:
total_count:
number
The total found reports count
count:
number
The returned reports count
DownloadHistoryReport
Downloads the required history report.
To call this method, make sure your service account has one of the following roles:
Parameters
history_report_id:
number
The history report ID
Returns
unknown:
unknown
See the HTTP Content-Type header instead
GetTransactionHistory
Gets the transaction history.
To call this method, make sure your service account has one of the following roles:
Parameters
from_date:
timestamp
The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
to_date:
timestamp
The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss
timezone:
string
OptionalDefaults on: Etc/GMTThe selected timezone or the 'auto' value (the account location)
transaction_id:
intlist
OptionalThe transaction ID list separated by semicolon (;)
transaction_type:
stringlist
OptionalThe transaction type list separated by semicolon (;). The following values are possible: resource_charge, money_distribution, subscription_charge, subscription_installation_charge, card_periodic_payment, card_overrun_payment, card_payment, rub_card_periodic_payment, rub_card_overrun_payment, rub_card_payment, robokassa_payment, gift, promo, adjustment, wire_transfer, us_wire_transfer, refund, discount, mgp_charge, mgp_startup, mgp_business, mgp_big_business, mgp_enterprise, mgp_large_enterprise, techsupport_charge, tax_charge, monthly_fee_charge, grace_credit_payment, grace_credit_provision, mau_charge, mau_overrun, im_charge, im_overrun, fmc_charge, sip_registration_charge, development_fee, money_transfer_to_child, money_transfer_to_parent, money_acceptance_from_child, money_acceptance_from_parent, phone_number_installation, phone_number_charge, toll_free_phone_number_installation, toll_free_phone_number_charge, services, user_money_transfer, paypal_payment, paypal_overrun_payment, paypal_periodic_payment
user_id:
intlist
OptionalThe user ID list separated by semicolon (;)
child_account_id:
intlist
OptionalThe child account ID list separated by semicolon (;). Use the 'all' value to select all child accounts
children_transactions_only:
boolean
OptionalDefaults on: falseSet true to get the children account transactions only
users_transactions_only:
boolean
OptionalDefaults on: falseSet true to get the users' transactions only
desc_order:
boolean
OptionalSet true to get records in the descent order
count:
number
OptionalDefaults on: 20The number of returning records. In the synchronous mode, the maximum value is 1000
offset:
number
OptionalDefaults on: 0The number of records to skip in the output with a maximum value of 10000
output:
string
OptionalDefaults on: jsonThe output format. The following values available: json, csv
is_async:
boolean
OptionalDefaults on: falseSet true to get records in the asynchronous mode (for csv output only). Use this mode to download large amounts of data. See the GetHistoryReports, DownloadHistoryReport functions for details
is_uncommitted:
boolean
OptionalDefaults on: falseSet true to get transactions on hold (transactions for which money is reserved but not yet withdrawn from the account)
Returns
result:
total_count:
number
The total found transaction count
timezone:
string
The used timezone. 'Etc/GMT' for example
count:
number
The returned transaction count
history_report_id:
number
The history report ID (async mode)
DeleteRecord
Try to remove a record and transcription files.
To call this method, make sure your service account has one of the following roles:
Parameters
record_url:
string
OptionalThe record URL to remove. You can retrieve the record URL via the CallSessionInfoType.records method
record_id:
number
OptionalThe record ID to remove. You can retrieve the record ID via the CallSessionInfoType.records method
Returns
result:
number
GetACDHistory
Gets the ACD history.
To call this method, make sure your service account has one of the following roles:
Parameters
from_date:
timestamp
The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss
to_date:
timestamp
The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss
acd_session_history_id:
intlist
OptionalThe ACD session history ID list separated by semicolon (;)
acd_request_id:
stringlist
OptionalThe ACD request ID list separated by semicolon (;)
acd_queue_id:
intlist
OptionalThe ACD queue ID list to filter separated by semicolon (;)
user_id:
intlist
OptionalThe user ID list to filter separated by semicolon (;)
operator_hangup:
boolean
OptionalSet true to get the calls terminated by the operator
unserviced:
boolean
OptionalThe unserviced calls by the operator
min_waiting_time:
number
OptionalThe min waiting time filter
rejected:
boolean
OptionalThe rejected calls by the 'max_queue_size', 'max_waiting_time' threshold
with_events:
boolean
OptionalDefaults on: falseSet true to get the bound events
with_header:
boolean
OptionalDefaults on: trueSet false to get a CSV file without the column names if the output=csv
desc_order:
boolean
OptionalSet true to get records in the descent order
count:
number
OptionalDefaults on: 20The max returning record count
offset:
number
OptionalDefaults on: 0The first N records will be skipped in the output
output:
string
OptionalDefaults on: jsonThe output format. The following values available: json, csv
Returns
result:
total_count:
number
The total found ACD session count
count:
number
The returned ACD session count
GetAuditLog
Gets the history of account changes.
To call this method, make sure your service account has one of the following roles:
Parameters
from_date:
timestamp
The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss
to_date:
timestamp
The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss
timezone:
string
OptionalDefaults on: Etc/GMTThe selected timezone or the 'auto' value (the account location)
audit_log_id:
intlist
OptionalThe audit history ID list separated by semicolon (;)
filtered_admin_user_id:
string
OptionalThe admin user ID to filter
filtered_ip:
stringlist
OptionalThe IP list separated by semicolon (;) to filter
filtered_cmd:
stringlist
OptionalThe function list separated by semicolon (;) to filter
advanced_filters:
string
OptionalA relation ID to filter (for example: a phone_number value, a user_id value, an application_id value)
with_header:
boolean
OptionalDefaults on: trueSet false to get a CSV file without the column names if the output=csv
desc_order:
boolean
OptionalDefaults on: falseSet true to get records in the descent order
with_total_count:
boolean
OptionalDefaults on: falseSet false to omit the 'total_count' and increase performance
count:
number
OptionalDefaults on: 100The max returning record count
offset:
number
OptionalDefaults on: 0The first N records will be skipped in the output
output:
string
OptionalDefaults on: jsonThe output format. The following values available: json, csv
is_async:
boolean
OptionalDefaults on: falseSet true to get records in the asynchronous mode (for csv output only). If it's true, the request is available via GetHistoryReports and DownloadHistoryReport methods
Returns
result:
total_count:
number
The total found item count
count:
number
The returned item count
timezone:
string
The used timezone
history_report_id:
number
The history report ID (async mode)