Download a CDR File (v2.0)
Download a CDR file of specific extensions or all extensions.
Steps to download a CDR file
Request URL
GET {base_url}/{api_path}/cdr/download?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| time_begin | No | String | Specify the start time to filter CDR. The time format must follow the PBX's date and time display format (set in on PBX). Examples:
|
| time_end | No | String | Specify the end time to filter CDR. The time format must follow the PBX's date and time display format (set in on PBX). Examples:
|
| call_from | No | String | The number of caller. |
| call_to | No | String | The number of callee. |
| account_code | No | String | The PIN code used to make outbound calls via a PIN-restricted
outbound route and recorded in the CDR. Note:
|
| ext_group | No | String | The unique ID of the extension group to only query group
member's calls. Note:
|
| disposition_code_list | No | String | The ID(s) of the call disposition code(s) of call notes. Note:
|
| call_note_remark | No | String | The remark of call notes. |
| did | No | String | Specify the DID to filter the CDR. Valid value: {did_number}:{trunk_name} or {did_name}:{trunk_name} Note:
|
| ai_receptionist_list | No | String | The unique ID of the AI receptionist to only query specific
receptionist's calls. Note:
|
| ai_receptionist_status | No | String | The processing result of calls handled by AI
receptionists. Valid values:
|
| campaign_list | No | String | The unique ID of the outbound campaign to only query specific
campaign calls. Note:
|
| disconnected_by | No | String | The party that terminated the call.
|
| dod_number | No | String | The phone number that was displayed on the callee's phone. |
| handling_duration | No | String | The time between the call answered and the call ended,
including any hold time. Note: You can
enter number, -, =,
<, <=,
>, >=, or a number
range. |
| routing_duration | No | String | The time between the call started and the call answered. Note: You can
enter number,
-, =,
<, <=,
>, >=, or a number
range. |
| last_status | No | String | The final status of the call. Valid value:
|
| last_participant | No | String | The number of the callee who received the call from the last call leg. |
| order_by | No | String | Define the display order. Valid value:
|
| org_list | No | String | The unique ID of the organization to only query specific
organization's calls. Note:
|
| queue_list | No | String | The unique ID of the queue to only query specific queue's calls. Note:
|
| recording_type | No | Integer | Whether to display all CDRs, CDRs with recordings, or CDRs
without recordings. Valid value:
|
| second_participant | No | String | The callee who received the call from the second call leg. |
| segments | No | String | The number of call legs. |
| sort_by | No | String | Define the sorting field. Valid value:
|
| srcaddr | No | String | The IP address of caller. |
| trunk | No | String | Trunk name. |
| uid | No | String | The unique ID of CDR. |
| call_type | No | String | Communication type. Valid value:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| file | String | The CDR file. |
| download_resource_url | String | The CDR download URL. Note: The download
URL is only valid for 30 minutes. |
Examples
Request example
Obtain the download URL of the CDR during 2026/06/04 00:00:00 - 2026/06/04 23:59:59.
time_begin and time_end
MUST follow the date and time display format of your PBX, otherwise the response
will not return any CDR records.GET /openapi/v2.0/cdr/download?time_begin=2026/06/04 00:00:00&time_end=2026/06/04 23:59:59&access_token=MDl5yGy9Bq2Jk2BB5ew8ycNk7dHnmhXF HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "file": "P550-Cdr-37.23.0.109-download-20260610193341-35U4OSyeWE6Gqtdg.pdf", "download_resource_url": "/api/download/PBX-Cdr-37.23.0.109-download-20260610193341-35U4OSyeWE6Gqtdg.pdf" }
Download the CDR file
After obtaining the download URL for the CDR file, combine it with the {base_url} and append the
{access_token} parameter. Then, use the complete link to
download the desired file.
Download link format
{base_url}/{download_resource_url}?access_token={access_token}
Download link example
https://yeastardocs.example.yeastarcloud.com/api/download/P550-Cdr-37.23.0.109-download-20260610193341-35U4OSyeWE6Gqtdg.pdf?access_token=5tQstKGzg0Lt4MGTETC1eDjlzk97IIny