Download a Call Report
Download a specific call report.
Steps to download a call report
Request URL
GET {base_url}/{api_path}/call_report/download?access_token={access_token}
Before old call report data are cleaned
up, new and historical data are managed separately -
openapi/v2.0 for new data and
openapi/v1.0 for historical data. Make sure to use the
appropriate API path based on the type of data that you want to
retrieve.
Request parameters
| Parameter | Available | Required | Type | Description |
|---|---|---|---|---|
| type |
This parameter is available in default reports. |
Yes | String | Call report type. Valid value:
|
| my_report_id |
This parameter is available in user-created reports. |
Yes | Integer |
The ID of a user-created report. Note: You can query report ID using Query My Reports List.
|
| start_time | This parameter is available when querying the following types
of reports.
|
No | String | Specify the start time to filter the
reports. Note: The time format depends
on the date and time display format of PBX (set in on PBX). Examples:
|
| end_time | This parameter is available when querying the following types
of reports.
|
No | String | Specify the end time to filter the reports. Note: The time format depends
on the date and time display format of PBX (set in on PBX).
Examples:
|
| time | This parameter is available when querying the following types
of reports:
|
Yes | String |
Specify the time frame to filter the call report. Note: The time format depends on the date
display format of PBX.
For example, Date
Display Format of PBX is
Year/Month/Day, then the
valid time format is
Time format:
|
| ring_duration_range | This parameter is available when querying Inbound Queue Activity Analysis report. | This parameter is available when querying Inbound Queue Activity Analysis report. | String | Specify the time interval used to group the amount of time
that callers waited in the queue before connecting to an
agent. Valid value:
|
| ext_id_list | This parameter is available when querying the following types
of reports:
|
This parameter is required when querying the following types
of reports:
|
String | The ID(s) of the desired extension(s)/extension
group(s). Note:
|
| trunk_id | This parameter is available when querying DID/Outbound Caller ID Activity report. | Yes | String | The ID of the desired trunk. Note: You
can query the trunk's ID using Get Menu Options. |
| trunk_id_list | This parameter is available when querying the following types
of reports:
|
Yes | String | The ID(s) of the desired trunk(s). Note:
|
| ivr_id_list | This parameter is available when querying IVR Report. | Yes | String | The ID(s) of the desired IVR(s). Note:
|
| ring_group_id_list | This parameter is available when querying Ring Group Statistics report. | Yes | String | The ID(s) of the desired ring group(s). Note:
|
| queue_id | This parameter is available when querying the following types
of reports:
|
Yes | String | The ID of the desired queue. Note: You
can query the queue's ID using Get Menu Options. |
| queue_id_list | This parameter is available when querying the following types
of reports:
|
Yes | String | The ID(s) of the desired queue(s). Note:
|
| agent_id_list | This parameter is available when querying the following types
of reports:
|
No | String | The ID(s) of the desired agent(s). Note:
|
| abandon_time | This parameter is available when querying the following types
of reports:
|
No | String | Set a time. Calls abandoned within the specified time will not be included in report. (Unit: Second) |
| talk_time | This parameter is available when querying the following types
of reports:
|
No | Integer | Set a time. Calls that proceeded within the specified time will be not be included in report. (Unit: Second) |
| include_internal | This parameter is available when querying PBX Call Activity report. | No | Integer | Whether to include internal calls in the report. Valid
value:
|
| callback_result | This parameter is available when querying Queue Callback Activity report. | No | String | Queue callback result. Valid value:
|
| reason | This parameter is available when querying Agent Pause Activity report. | No | String | The reason why an agent switched status to pause. Valid value: The pause reasons set on PBX web portal (Path: ). |
| communication_type | This parameter is available when querying the following types
of reports:
|
No | String | Communication type. Note: If this
parameter is omitted, the system will query all the
communication types. Valid value for extension
related reports:
Valid value for trunk related reports:
|
| call_from |
This parameter is available when querying the following types
of reports:
|
No | String | The number of the caller. |
| call_to | This parameter is available when querying the Unreturned Missed Call Report. | No | String | The number of the callee. |
| call_to_type | This parameter is available when querying the Unreturned Missed Call Report. | No | String | The type of the destination to which the call is
routed. Valid value:
|
| miss_call_type | This parameter is available when querying the Unreturned Missed Call Report. | No | String | The type of a missed call. Valid value:
|
| unreturn_status | This parameter is available when querying the Unreturned Missed Call Report. | No | Integer | The return status of a missed call. Valid value:
|
| ai_receptionist_id_list | This parameter is available when querying the AI Receptionist Call Activity report. | No | String | The ID(s) of the AI receptionist(s). Note:
|
| status | This parameter is available when querying the following types
of reports:
|
No | String | The status of a queue call. Valid value:
|
| agent_speed_to_answer | This parameter is available when querying the Inbound Queue Logs report. | No | String | The amount of time agents took to answer queue calls. (Unit: Second) |
| talk_time_range | This parameter is available when querying the following types
of reports:
|
No | String | The amount of time that agents spent talking to callers, including hold time. (Unit: Second) |
| pure_talk_time | This parameter is available when querying the following types
of reports:
|
No | String | The amount of time that agents spent talking to callers, excluding hold time. (Unit: Second) |
| hold_time | This parameter is available when querying the following types
of reports:
|
No | String | The amount of time that agents held queue calls. (Unit: Second) |
| agent_last_status | This parameter is available when querying the Inbound Queue Logs for Agent report. | No | String | The last call status of agents. Valid value:
|
| process_result | This parameter is available when querying the Inbound Queue Logs for Agent report. | No | String | The process result for an abandoned or a missed queue
call. Valid value:
|
| waiting_time_in_queue | This parameter is available when querying the Inbound Queue Logs for Agent report. | No | String | The amount of time callers waited in the queue before connecting to an agent or leavin. (Unit: Second) |
| waiting_time_in_agent | This parameter is available when querying the Inbound Queue Logs for Agent report. | No | String | The amount of time it took for agents to answer queue calls. (Unit: Second) |
| did_num_list | This parameter is available when querying the DID/Outbound Caller ID Activity report. | No | String | The DID number that caller dialed. Note: Use commas to separate multiple
DID numbers.
|
| dod_num_list | This parameter is available when querying the DID/Outbound Caller ID Activity report. | No | String | The DOD number that caller dialed. Note: Use commas to separate multiple
DOD numbers.
|
| pin_list | This parameter is available when querying the Extension Call Accounting Details report. | No | String | The PIN code used when making a call via a restricted
outbound route. Note: Use commas to
separate multiple PIN codes. |
| need_detail | This parameter is available when querying the following types of
reports:
|
No | Integer | Whether to include details about the associated calls. Valid
value:
|
| detail_type | This parameter is available in all call report types. | No | String | How to display details about the associated calls. Valid
value:
|
| format | This parameter is available in all call report types. | No | String | The download format. Valid value:
|
| duration_format | This parameter is available in all call report types. | No | String | The display format for all duration-related fields. Valid value:
|
| is_async | This parameter is available in all call report types. | No | Integer |
Whether to retrieve data and obtain the download URL of call report asynchronously. Valid value:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note:
|
| errmsg | String | Returned message.
|
| file | String | The call report file. |
| download_resource_url | String | The call report download URL. Note: The
download URL is only valid for 30 minutes. |
Examples
Request example
Obtain the download URL of the IVR report (IVR ID: "1") during 2025/12/01 00:00:00 - 2025/12/31 23:59:59.
- If you want to filter call reports by date and time, the format of
start_timeandend_timeMUST follow the date and time display format of your PBX, otherwise the response will not return any records. - Make sure to use the appropriate API path based on the
type of report data that you want to retrieve.
- For new report data generated on version 84.21.0.117 or later, use
openapi/v2.0. - For legacy report data generated on version 84.21.0.66 or
earlier, use
openapi/v1.0.
- For new report data generated on version 84.21.0.117 or later, use
GET openapi/v2.0/call_report/download?access_token=5qcixSatPqNQfjsepgFdUsQBID1ZWnu8&type=ivr&start_time=2025/12/01 00:00:00&end_time=2025/12/31 23:59:59&ivr_id_list=1&need_detail=1&is_async=0&detail_type=same_list&format=pdf&duration_format=seconds HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "file": "QueueSatisfaction-X.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv", "download_resource_url": "/api/download/QueueSatisfaction-x.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv" }
Download the call report
After obtaining the download URL for the call report, combine it with the {base_url} and append the{access_token} parameter. Then, use the complete link to download
the call reports.Download link format
{base_url}/{download_resource_url}?access_token={access_token}
Download link example
https://yeastardocs.example.yeastarcloud.com/api/download/QueueSatisfaction-x.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv?access_token=MB1OklPar5hnDfhi4srZa8FrZ4znFSzr