Query CDR List (v2.0)

Query the CDR list.

Note: This documentation applies to API version 2.0.

Request URL

GET {base_url}/{api_path}/cdr/list?access_token={access_token}

Request parameters

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:

  • asc: Ascending order.
  • desc: Descending order.
sort_by No String Define the sorting field.
Valid value:
  • uid
  • time
  • call_type
  • last_status
  • call_duration
  • routing_duration
  • handling_duration
call_from No String The number and name of the caller.
call_to No String The number and name of the callee.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
total_number Integer The total number of 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.
  • Inbound
  • Outbound
  • Internal
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.
  • ANSWERED
  • NO ANSWER
  • ABANDONED
  • BUSY
  • FAILED
  • VOICEMAIL
queues Object<Queue> The queue information and call status.
ivrs Array The IVR name and number.
ring_groups Object<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.

Call_Note

Parameter Type Description
agent_name String The name of the extension user who adds the call note.
disposition_code_list Array<Disposition_Codes> The disposition code(s) selected in the call note.
group_id String The group ID of the call note.
id String The unique ID of the call note.
registration_time Long The time when the extension user adds the call note.
remark String The remark of the call note.

Disposition_Codes

Parameter Type Description
id Integer The unique ID of the call disposition code.
name String The label of the call disposition code.
description String The description of the call disposition code

AI_Receptionist

Parameter Type Description
name String AI receptionist name.
number String AI receptionist number.
status String The processing result of calls handled by AI receptionists.
  • resolved: The AI receptionist successfully resolved the caller's issue without transferring the call.
  • unresolved: The AI receptionist transferred the call to another destination.
  • transfered: The AI receptionist neither resolved the caller's issue nor transferred the call.
  • noprocessingresult: The call ended abnormally due to an error or timeout, and no processing result could be determined.
Queue
Parameter Type Description
name String Queue name.
number String Queue number.
status String The call status.
Ring_Group
Parameter Type Description
name String The ring group name.
number String The ring group number.
status String The call status.

Examples

Request example

GET /openapi/v2.0/cdr/list?access_token=wiO21GxXLYmZABJBqsXy6oeIJ45Evr4T&page=1&page_size=2 HTTP/1.1  

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "total_number": 277,
    "data": [
        {
            "id": "67AE6498-7D80008A",
            "uid": "20260612100344A5466",
            "time": "2026/06/12 10:03:44",
            "call_type": "Outbound",
            "call_from": "Dialer",
            "call_from_name": "",
            "call_from_number": "Dialer",
            "call_to": "Becky<1002>",
            "call_to_name": "Becky",
            "call_to_number": "1002",
            "second_participant": "Queue 6400<6400>",
            "second_participant_name": "6400",
            "second_participant_number": "6400",
            "last_participant": "6400:Evelyn<3200>",
            "last_participant_name": "Evelyn",
            "last_participant_number": "3200",
            "last_status": "ANSWERED",
            "queues": [
                {
                    "name": "6400",
                    "number": "6400",
                    "status": "ANSWERED"
                }
            ],
            "ivrs": null,
            "ring_groups": null,
            "call_flows": null,
            
            "call_duration": 44,
            "routing_duration": 7,
            "handling_duration": 37,
            "call_notes": null,
            "disconnected_by": "Extension",
            "segments": 3,
            
            "source_trunks": [
                "2839"
            ],
            "destination_trunks": [
                "2839"
            ],
            "dids": null,
            "outbound_caller_ids": [
                "6700"
            ],
            "pin_codes": null
        },
        {
            "id": "67AE63FD-9D8000E7",
            "uid": "202606121000595F345",
            "time": "2026/06/12 10:00:59",
            "call_type": "Outbound",
            "call_from": "Dialer",
            "call_from_name": "",
            "call_from_number": "Dialer",
            "call_to": "Becky<1002>",
            "call_to_name": "Becky",
            "call_to_number": "1002",
            "second_participant": "Queue 6400<6400>",
            "second_participant_name": "6400",
            "second_participant_number": "6400",
            "last_participant": "6400:Evelyn<3200>",
            "last_participant_name": "Evelyn",
            "last_participant_number": "3200",
            "last_status": "ANSWERED",
            "queues": [
                {
                    "name": "6400",
                    "number": "6400",
                    "status": "ANSWERED"
                }
            ],
            "ivrs": null,
            "ring_groups": null,
            "call_flows": null,
            
            "call_duration": 50,
            "routing_duration": 7,
            "handling_duration": 43,
            "call_notes": null,
            "disconnected_by": "External",
            "segments": 3,
            
            "source_trunks": [
                "2839"
            ],
            "destination_trunks": [
                "2839"
            ],
            "dids": null,
            "outbound_caller_ids": [
                "6700"
            ],
            "pin_codes": null
        }
    ]
}