Search Specific CDR (v2.0)
Search specific CDR from the CDR list.
Note: This documentation applies to API version 2.0.
Request URL
GET {base_url}/{api_path}/cdr/search?access_token={access_token}
Request parameters
Note: To perform a fuzzy search for the phone number, you can
enable the fuzzy search feature using the Edit CDR Options (v2.0) interface.
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | No | Integer | Define which page is displayed. Note: If
this parameter is left blank, the response result will
return the first page by default. |
| page_size | No | Integer | Define how many records per page. Maximum value: 10,000 Note: If this parameter is
left blank, the response result will return 10,000 records
per page by default. |
| order_by | No | String | Define the display order. Valid value:
|
| sort_by | No | String | Define the sorting field. Valid value:
|
| 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. |
| second_participant | No | String | The callee who received the call from the second call leg. |
| last_participant | No | String | The number of the callee who received the call from the last call leg. |
| last_status | No | String | The final status of the call. 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:
|
| segments | No | String | The number of call legs. |
| srcaddr | No | String | The IP address of caller. |
| trunk | No | String | Trunk name. |
| uid | No | String | The unique ID of CDR. |
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.
|
| total_number | Integer | The total number of the searched CDR. |
| data | Array<CDR_Details> | The detailed information of the CDR. |
- CDR_Details
-
Parameter Type Description id Integer The sequence number of the record. uid String The unique ID of the CDR. time String The time when the call was made or received. call_type String Communication type. InboundOutboundInternal
call_from String The number and name of the caller. call_from_name String The name of the caller. call_from_number String The number of the caller. call_to String The number and name of the callee. call_to_name String The name of the callee. call_to_number String The number of the callee. second_participant String The callee in the second call leg. second_participant_name String The name of the callee in the second call leg. second_participant_number String The number of the callee in the second call leg. last_participant String The callee in the last call leg. last_participant_name String The name of the callee in the last call leg. last_participant_number String The number of the callee in the last call leg. last_status String The final status of the call. ANSWEREDNO ANSWERABANDONEDBUSYFAILEDVOICEMAIL
queues Array<Queue> The queue information and call status. ivrs Array The IVR number. ring_groups Array<Ring_Group> The ring group information and call status. call_flows Array The call flow name and number. call_duration Integer The time between the call started and the call ended. routing_duration Integer The time between the call started and the call answered. handling_duration Integer The time between the call answered and the call ended, including any hold time. call_notes Object<Call_Note> The call note of the call. disconnected_by String The party that terminated the call. Extension: Internal extension.External: External number.System: A party not involved in the call.Note: This could happen when an incoming call is not answered within the maximum waiting time, or when it is interrupted by an emergency call.
segments Integer The number of call legs. ai_receptionist Array<AI_Receptionist> The information of AI receptionists. source_trunks Array The call was received via which trunk. destination_trunks Array The call was sent out via which trunk. dids Array The phone number that the caller dialed and the associated name. outbound_caller_ids Array The phone number that was displayed on the callee's phone. pin_codes Array The PIN code used to make outbound calls via a PIN-restricted outbound route and recorded in the CDR.
Examples
Request example
Query the record details of the calls made by extension 1002 during 2026/06/04
00:00:00-2026/06/04 11:59:59.
Important: If
you want to filter CDR by date and time, the format of
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/search?access_token=cnZNgpnGWZ47KqcGTRFErxWdiRPWcxXD&time_begin=2026/06/04 00:00:00&time_end=2026/06/04 11:59:59&call_from=1002 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "total_number": 1, "data": [ { "id": "67A41F2D-E38002F3", "uid": "20260604103519BEC58", "time": "2026/06/04 10:35:19", "call_type": "Internal", "call_from": "Terrell Smith<1002>", "call_from_name": "Terrell Smith", "call_from_number": "1002", "call_to": "Queue 81801<81801>", "call_to_name": "81801", "call_to_number": "81801", "second_participant": "Phillip Huff<1001>", "second_participant_name": "Phillip Huff", "second_participant_number": "1001", "last_participant": "81801:Phillip Huff<1001>", "last_participant_name": "Phillip Huff", "last_participant_number": "1001", "last_status": "ANSWERED", "queues": [ { "name": "81801", "number": "81801", "status": "ANSWERED" } ], "ivrs": null, "ring_groups": null, "call_flows": null, "call_duration": 33, "routing_duration": 3, "handling_duration": 30, "call_notes": null, "disconnected_by": "Extension", "segments": 2, "ai_receptionist": null, "source_trunks": null, "destination_trunks": null, "dids": null, "outbound_caller_ids": null, "pin_codes": null } ] }