# Inbound Call Detail Records

## <span style="color: rgb(2, 106, 73);">**API: inbound\_cdr**</span>

### **Description**

This API provides detailed information about inbound calls handled by crocodial. It includes timestamps, caller and destination numbers, queue and campaign metadata, agent assignments, and call outcomes. This API is useful for analyzing call flow, queue behavior, and agent performance in inbound call operations.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/goAPI.php

<p class="callout info align-left">**Note:** Replace `DOMAIN` with the specific domain you want to query.</p>

### **📝 Required Parameters**

<table border="1" id="bkmrk-parameter-value-desc" style="border-collapse: collapse; width: 100%; height: 178.667px;"><colgroup><col style="width: 22.9972%;"></col><col style="width: 20.0399%;"></col><col style="width: 57.0543%;"></col></colgroup><thead><tr style="height: 29.6px;"><td style="height: 29.6px;">**Parameter**</td><td style="height: 29.6px;">**Value**</td><td style="height: 29.6px;">**Description**</td></tr></thead><tbody><tr style="height: 29.6px;"><td style="height: 29.6px;">goAction</td><td style="height: 29.6px;">inbound\_cdr</td><td style="height: 29.6px;">API's name. Action to perform.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goUser</td><td style="height: 29.6px;">MyUser</td><td style="height: 29.6px;">API authorized user.</td></tr><tr style="height: 29.6px;"><td style="height: 29.6px;">goPass</td><td style="height: 29.6px;">MyPass</td><td style="height: 29.6px;">Authorized user's password.</td></tr><tr style="height: 30.6667px;"><td style="height: 30.6667px;">responsetype</td><td style="height: 30.6667px;">json/xml</td><td style="height: 30.6667px;">Format of the response (`json` recommended).</td></tr></tbody></table>

### **Optional Parameters**

<table border="1" id="bkmrk-parameter-value-desc-1" style="border-collapse: collapse; width: 100%; height: 169.417px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 28.0062%;"></col><col style="width: 48.9811%;"></col></colgroup><thead><tr style="height: 29.7167px;"><td style="height: 29.7167px;">**Parameter**</td><td style="height: 29.7167px;">**Value**</td><td style="height: 29.7167px;">**Description**</td></tr></thead><tbody><tr style="height: 31.0667px;"><td style="height: 31.0667px;">tenant</td><td style="height: 31.0667px;">\['AAA', 'BBB'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">tenants </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results. (Three characters only)</span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">profile</td><td style="height: 31.0667px;">\['LOANS', 'COLLECTIONS'\]</td><td style="height: 31.0667px;"><span class="_fadeIn_m1hgl_8">A </span><span class="_fadeIn_m1hgl_8">list </span><span class="_fadeIn_m1hgl_8">of </span><span class="_fadeIn_m1hgl_8">profiles </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">filter </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">results.</span></td></tr><tr style="height: 46.5px;"><td style="height: 46.5px;">fromDate</td><td style="height: 46.5px;">`YYYY-MM-DD`</td><td style="height: 46.5px;"><span class="_fadeIn_m1hgl_8">The </span><span class="_fadeIn_m1hgl_8">start </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">for </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">report. </span><span style="color: rgb(22, 145, 121);"><span class="_fadeIn_m1hgl_8">If </span><span class="_fadeIn_m1hgl_8">no </span><span class="_fadeIn_m1hgl_8">date </span><span class="_fadeIn_m1hgl_8">range </span><span class="_fadeIn_m1hgl_8">is </span><span class="_fadeIn_m1hgl_8">provided, </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">endpoint </span><span class="_fadeIn_m1hgl_8">defaults </span><span class="_fadeIn_m1hgl_8">to </span><span class="_fadeIn_m1hgl_8">returning </span><span class="_fadeIn_m1hgl_8">records </span><span class="_fadeIn_m1hgl_8">from </span><span class="_fadeIn_m1hgl_8">the </span><span class="_fadeIn_m1hgl_8">last </span><span class="_fadeIn_m1hgl_8">24 </span><span class="_fadeIn_m1hgl_8">hours.</span></span></td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</td></tr></tbody></table>

**Note:** This endpoint uses body parameters for authentication instead of tokens or headers.

### **Request Examples:**

#### **GET:** 

```bash
curl -X GET "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php?goAction=inbound_cdr&goUser=MyUser&goPass=MyPass&responsetype=json"
```

#### **POST (Form Data):**

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=inbound_cdr" \
  --data-urlencode "goUser=MyUSer" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "tenant[]=CCC" \
  --data-urlencode "profile[]=COLLECTIONS" \

```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "rows": [
            {
                "call_date": "2025-05-29 22:23:05",
                "enter_on_queue": "2025-05-29 22:23:33",
                "src": "5551234567",
                "dst": "5559876543",
                "carrier": "SIP/EXAMPLE1-00000001",
                "uniq1": "1234567890.000001",
                "queue": "EXAMPLE_QUEUE_1",
                "agent": "Agent001",
                "campaign": "EXAMPLE_CAMPAIGN_A",
                "disposition": "Live Disconnect",
                "term_reason": "CALLER",
                "queue_time": "0",
                "call_duration": "34",
                "queue_position": "1",
                "portfolio": "PORTFOLIO_A",
                "lead_id": "10000001",
                "list_id": "Example List",
                "vendor_lead_code": "John Doe"
            },
            {
                "call_date": "2025-05-29 20:07:06",
                "enter_on_queue": "2025-05-29 20:07:15",
                "src": "5557654321",
                "dst": "5552468135",
                "carrier": "SIP/EXAMPLE2-00000002",
                "uniq1": "1234567890.000002",
                "queue": "EXAMPLE_QUEUE_2",
                "agent": "Agent002",
                "campaign": "EXAMPLE_CAMPAIGN_B",
                "disposition": "Denied",
                "term_reason": "CALLER",
                "queue_time": "0",
                "call_duration": "140",
                "queue_position": "1",
                "portfolio": "PORTFOLIO_B",
                "lead_id": "10000002",
                "list_id": "Example List",
                "vendor_lead_code": "Jane Smith"
            }
        ],
        "headers": [
            ...
        ]
    }
}

```

### <span class="_fadeIn_m1hgl_8">📌 </span>**<span class="_fadeIn_m1hgl_8">Response </span><span class="_fadeIn_m1hgl_8">Fields</span>**

<table border="1" id="bkmrk-field-name-descripti" style="border-collapse: collapse; border-color: rgb(206, 212, 217);"><thead><tr><th style="border-color: rgb(206, 212, 217);">**Field Name**</th><th style="border-color: rgb(206, 212, 217);">**Description**</th></tr></thead><tbody><tr><td style="border-color: rgb(206, 212, 217);">`call_date`</td><td style="border-color: rgb(206, 212, 217);">Date and time when the call started.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`enter_on_queue`</td><td style="border-color: rgb(206, 212, 217);">Timestamp when the caller entered the queue.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`src`</td><td style="border-color: rgb(206, 212, 217);">Caller’s phone number.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`dst`</td><td style="border-color: rgb(206, 212, 217);">Destination phone number (usually the DID or agent extension).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`carrier`</td><td style="border-color: rgb(206, 212, 217);">The SIP carrier or trunk that handled the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`uniq1`</td><td style="border-color: rgb(206, 212, 217);">Unique call identifier. Often used for logging and tracking.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`queue`</td><td style="border-color: rgb(206, 212, 217);">Queue name where the call was routed.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`agent`</td><td style="border-color: rgb(206, 212, 217);">Agent who handled the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`campaign`</td><td style="border-color: rgb(206, 212, 217);">Campaign associated with the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`disposition`</td><td style="border-color: rgb(206, 212, 217);">Final status of the call (e.g., Answered, Denied, Live Disconnect).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`term_reason`</td><td style="border-color: rgb(206, 212, 217);">Call termination reason (e.g., AGENT, CALLER, QUEUE\_TIMEOUT).</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`queue_time`</td><td style="border-color: rgb(206, 212, 217);">Time in seconds the caller spent in queue.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`call_duration`</td><td style="border-color: rgb(206, 212, 217);">Total duration of the call in seconds.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`queue_position`</td><td style="border-color: rgb(206, 212, 217);">Position of the caller in the queue at entry.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`portfolio`</td><td style="border-color: rgb(206, 212, 217);">Portfolio or business unit associated with the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`lead_id`</td><td style="border-color: rgb(206, 212, 217);">Identifier of the lead/contact associated with the call.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`list_id`</td><td style="border-color: rgb(206, 212, 217);">Name or ID of the list from which the lead came.</td></tr><tr><td style="border-color: rgb(206, 212, 217);">`vendor_lead_code`</td><td style="border-color: rgb(206, 212, 217);">Lead code from the vendor (usually the customer's name or tag).</td></tr></tbody></table>