> For the complete documentation index, see [llms.txt](https://bitel.gitbook.io/bitel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bitel.gitbook.io/bitel/master/call/call-detail.md).

# Call Detail

Retrieve detail of single or batch call

## Single call detail by requestId

In order to retrieve the details of a single call, make sure to store the **requestId**.

<mark style="color:blue;">`GET`</mark> `https://api.bitel.rest/api/v1/voice/cdr/:requestId`

#### Path Parameters

| Name      | Type   | Description                                           |
| --------- | ------ | ----------------------------------------------------- |
| requestId | string | requestId retrieved from single otp/tts/voice request |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "result": {
    "requestId": "1096bc35120e41c7a3935b4c5d658fdc",
    "targetNumber": "09124986385",
    "status": "NORMAL",
    "billSec": 7,
    "requestDate": 1541484727,
    "executionDate": 1541484728,
    "transactionId": 111,
    "balanceSubtracted": 70
  },
  "error": null
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "result": null
  "error": "NotFound"
}
```

{% endtab %}
{% endtabs %}

## Batch call detail by campaignId

In order to retrieve details of multiple calls, make sure to store the **campaignId** of the batch/tts request.

<mark style="color:blue;">`GET`</mark> `https://api.bitel.rest/api/v1/voice/campaign/cdr/:campaignId`

#### Path Parameters

| Name       | Type   | Description                                            |
| ---------- | ------ | ------------------------------------------------------ |
| campaignId | string | campaignId retrieved from batch / tts campaign request |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "result": [
    {
      "requestId": "a3dc3d8e704d47679c42205900331c63",
      "targetNumber": "09124986385",
      "status": "NORMAL",
      "billSec": 11,
      "requestDate": 1542463032,
      "executionDate": 1542463033,
      "transactionId": 230194,
      "balanceSubtracted": 11000
    }
  ],
  "error": null
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "result": null
  "error": "NotFound"
}
```

{% endtab %}
{% endtabs %}

## Detail Description

| Key               | Type          | Description                                   |
| ----------------- | ------------- | --------------------------------------------- |
| requestId         | string        | request identifier                            |
| targetNumber      | string        | phone number that was called                  |
| status            | string        | call status (see Call Status table)           |
| requestDate       | int64         | date the request was created in epoch format  |
| executionDate     | int64         | date the request was executed in epoch format |
| billSec           | string        | duration of the call in seconds               |
| balanceSubtracted | float(double) | the cost of request in Toman                  |

### Call Status

| Code       | Description                       |
| ---------- | --------------------------------- |
| NORMAL     | the call has finished normally    |
| NO\_ANSWER | the user didn't pick up the phone |
| USER\_BUSY | the phone number was busy         |
| WAITING    | the request is being processed    |
