V 2.0

Call Report

Introduction

This document provides comprehensive information about the Call Report API endpoints. These endpoints allow retrieving, filtering, and exporting call log reports in various formats (CSV, Excel, PDF). The API supports advanced filtering capabilities including date ranges, agent filtering, duration filters, call types, and custom call analysis fields.

Base URL

The base URL for this API endpoint is: v4-api.deepcall.com/api/v2/callreport

Authentication

Authentication is required for all endpoints. It can be done in two ways:

  1. Using ssid (Session ID)
  2. Using userId and token

Note: When userId and token are used, ssid should not be present in the request.


Common Error Codes

These error codes can be returned by any endpoint in this API. Endpoint-specific errors are documented in their respective sections.

Authentication & Authorization Errors

Error Code Error Message Description Solution
1000 Invalid parameters Request validation failed or authentication invalid Check all required parameters are provided
1014 Invalid token Authentication token is expired or invalid Generate a new token or use valid ssid
1015 Permission denied User does not have LIST_CALL_LOG permission Contact admin to grant required permissions
1047 Invalid Request Data Request body is empty or malformed Ensure request body is valid JSON

System Errors

Error Code Error Message Description Solution
1009 Something went wrong Unexpected server error occurred Retry the request or contact support
1010 Error in DB connect Database connection is not available Check system status or retry after some time

Common Error Response Format

All error responses follow this structure:

{
  "status": "error",
  "message": "Error description here",
  "code": 1000
}

Call Detail

https://v4-api.deepcall.com/api/v2/CallReport/detail

Endpoint

Description

The Call Detail endpoint retrieves comprehensive information about a specific call. It supports different report types including agent details, recording details, deduction logs, and complete raw data. This endpoint is essential for detailed call analysis and troubleshooting.

Use Cases

Request Parameters

Parameter Type Required Description
userId string Yes* User ID for authentication (*required if ssid not provided)
token string Yes* Authentication token (*required if ssid not provided)
ssid string Yes* Session ID (*required if userId/token not provided)
clId string Yes Call ID - unique identifier for the call
rType string No Report type (default: standard detail view)

Report Types (rType)

Value Description
(default) Standard detail view with formatted data
agts Agent handling details
rcrd Recording details and URLs
ddLog Deduction/billing log details
allDetail Complete raw data (unformatted)

Request Examples

Example 1: Get Standard Call Detail

{
  "ssid": "{{ssid}}",
  "clId": "2m660tx1m173744053175158438"
}

Example 2: Get Agent Details

{
  "ssid": "{{ssid}}",
  "clId": "2m660tx1m173744053175158438",
  "rType": "agts"
}

Example 3: Get Recording Details

{
  "userId": "{{userid}}",
  "token": "{{token}}",
  "clId": "2m660tx1m173744053175158438",
  "rType": "rcrd"
}

Example 4: Get Deduction Log

{
  "ssid": "{{ssid}}",
  "clId": "2m660tx1m173744053175158438",
  "rType": "ddLog"
}

Example 5: Get All Raw Data

{
  "ssid": "{{ssid}}",
  "clId": "2m660tx1m173744053175158438",
  "rType": "allDetail"
}

Response Details

Success Response (Standard Detail)

Status Code: 200

{
  "data": {
    "callId": "2m660tx1m173744053175158438",
    "customerNumber": "{{mobile}}",
    "date": "2025-11-22 10:30:45",
    "duration": "00:05:30",
    "status": "answered",
    "callType": "OMIT",
    "campaign": "Sales Campaign",
    "agent": "Agent Name",
    "recording": "https://..."
  }
}

Success Response (No Data)

Status Code: 200

{
  "data": []
}

Response Field Descriptions

Field Type Description
data object Call detail object (structure varies by rType)

Error Response Examples

Error 1: Empty Request Body

Status Code: 200

{
  "status": "error",
  "message": "Invalid Request Data",
  "code": 1047
}

Error 2: Call ID Not Provided

Status Code: 200

{
  "status": "error",
  "message": "Invalid parameter",
  "code": 1000
}

Error 3: Permission Denied

Status Code: 200

{
  "status": "error",
  "message": "Permission denied",
  "code": 1015
}

Call Detail

var axios = require('axios');
var data = '{"ssid": "{{ssid}}","userId": "29791451","clId": "kyrnwv1c8ps5zq6jcwaxtzicv","rType": ["dtl"]}';

var config = {
 method: 'post',
 url: 'https://{{brand}}/api/v2/CallReport/detail',
 headers: { 
'Content-Length': ''
 },
 data : data
};

axios(config)
.then(function (response) {
 console.log(JSON.stringify(response.data));
})
.catch(function (error) {
 console.log(error);
});
setUrl('https://{{brand}}/api/v2/CallReport/detail');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
 'follow_redirects' => TRUE
));
$request->setHeader(array(
 'Content-Length' => ''
));
$request->setBody('{"ssid": "{{ssid}}","userId": "29791451","clId": "kyrnwv1c8ps5zq6jcwaxtzicv","rType": ["dtl"]}');
try {
 $response = $request->send();
 if ($response->getStatus() == 200) {
echo $response->getBody();
 }
 else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
 }
}
catch(HTTP_Request2_Exception $e) {
 echo 'Error: ' . $e->getMessage();
}
import http.client

conn = http.client.HTTPSConnection("{{brand}}")
payload = "{\"ssid\": \"{{ssid}}\",\"userId\": \"29791451\",\"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\"rType\": [\"dtl\"]}"
headers = {
 'Content-Length': ''
}
conn.request("POST", "/api/v2/CallReport/detail", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var client = new RestClient("https://{{brand}}/api/v2/CallReport/detail");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
var body = @"{" + "\n" +
@"    ""ssid"": ""{{ssid}}""," + "\n" +
@"    ""userId"": ""29791451""," + "\n" +
@"    ""clId"": ""kyrnwv1c8ps5zq6jcwaxtzicv""," + "\n" +
@"    ""rType"": [" + "\n" +
@"        ""dtl""" + "\n" +
@"    ]" + "\n" +
@"}";
request.AddParameter("text/plain", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location -g --request POST 'https://{{brand}}/api/v2/CallReport/detail' \
--data-raw '{
    "ssid": "{{ssid}}",
    "userId": "29791451",
    "clId": "kyrnwv1c8ps5zq6jcwaxtzicv",
    "rType": [
        "dtl"
    ]
}'
var request = http.Request('POST', Uri.parse('https://{{brand}}/api/v2/CallReport/detail'));
request.body = '''{\n    "ssid": "{{ssid}}",\n    "userId": "29791451",\n    "clId": "kyrnwv1c8ps5zq6jcwaxtzicv",\n    "rType": [\n        "dtl"\n    ]\n}''';

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
   print(await response.stream.bytesToString());
}
else {
   print(response.reasonPhrase);
}
package main

import (
   "fmt"
   "strings"
   "net/http"
   "io/ioutil"
)

func main() {

   url := "https://%7B%7Bbrand%7D%7D/api/v2/CallReport/detail"
   method := "POST"

   payload := strings.NewReader(`{
    "ssid": "{{ssid}}",
    "userId": "29791451",
    "clId": "kyrnwv1c8ps5zq6jcwaxtzicv",
    "rType": [
        "dtl"
    ]
}`)

   client := &http.Client {
   }
   req, err := http.NewRequest(method, url, payload)

   if err != nil {
      fmt.Println(err)
      return
   }
   res, err := client.Do(req)
   if err != nil {
      fmt.Println(err)
      return
   }
   defer res.Body.Close()

   body, err := ioutil.ReadAll(res.Body)
   if err != nil {
      fmt.Println(err)
      return
   }
   fmt.Println(string(body))
}
POST /api/v2/CallReport/detail HTTP/1.1
Host: {{brand}}
Content-Length: 129

{
    "ssid": "{{ssid}}",
    "userId": "29791451",
    "clId": "kyrnwv1c8ps5zq6jcwaxtzicv",
    "rType": [
        "dtl"
    ]
}
OkHttpClient client = new OkHttpClient().newBuilder()
   .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\n    \"ssid\": \"{{ssid}}\",\n    \"userId\": \"29791451\",\n    \"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\n    \"rType\": [\n        \"dtl\"\n    ]\n}");
Request request = new Request.Builder()
   .url("https://{{brand}}/api/v2/CallReport/detail")
   .method("POST", body)
   .addHeader("Content-Length", "")
   .build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Content-Length", "");

var raw = "{\n    \"ssid\": \"{{ssid}}\",\n    \"userId\": \"29791451\",\n    \"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\n    \"rType\": [\n        \"dtl\"\n    ]\n}";

var requestOptions = {
   method: 'POST',
   headers: myHeaders,
   body: raw,
   redirect: 'follow'
};

fetch("https://{{brand}}/api/v2/CallReport/detail", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
   curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
   curl_easy_setopt(curl, CURLOPT_URL, "https://%7B%7Bbrand%7D%7D/api/v2/CallReport/detail");
   curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
   curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
   struct curl_slist *headers = NULL;
   headers = curl_slist_append(headers, "Content-Length: ");
   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
   const char *data = "{\n    \"ssid\": \"{{ssid}}\",\n    \"userId\": \"29791451\",\n    \"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\n    \"rType\": [\n        \"dtl\"\n    ]\n}";
   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
   res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
#import 

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://%7B%7Bbrand%7D%7D/api/v2/CallReport/detail"]
   cachePolicy:NSURLRequestUseProtocolCachePolicy
   timeoutInterval:10.0];
NSDictionary *headers = @{
   @"Content-Length": @""
};

[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n    \"ssid\": \"{{ssid}}\",\n    \"userId\": \"29791451\",\n    \"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\n    \"rType\": [\n        \"dtl\"\n    ]\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
   if (error) {
      NSLog(@"%@", error);
      dispatch_semaphore_signal(sema);
   } else {
      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
      NSError *parseError = nil;
      NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
      NSLog(@"%@",responseDictionary);
      dispatch_semaphore_signal(sema);
   }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix

let postData = ref "{\n    \"ssid\": \"{{ssid}}\",\n    \"userId\": \"29791451\",\n    \"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\n    \"rType\": [\n        \"dtl\"\n    ]\n}";;

let reqBody = 
   let uri = Uri.of_string "https://%7B%7Bbrand%7D%7D/api/v2/CallReport/detail" in
   let headers = Header.init ()
      |> fun h -> Header.add h "Content-Length" ""
   in
   let body = Cohttp_lwt.Body.of_string !postData in

   Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
   body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
   let respBody = Lwt_main.run reqBody in
   print_endline (respBody)
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Length", "")

$body = "{`n    `"ssid`": `"{{ssid}}`",`n    `"userId`": `"29791451`",`n    `"clId`": `"kyrnwv1c8ps5zq6jcwaxtzicv`",`n    `"rType`": [`n        `"dtl`"`n    ]`n}"

$response = Invoke-RestMethod 'https://{{brand}}/api/v2/CallReport/detail' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
require "uri"
require "net/http"

url = URI("https://{{brand}}/api/v2/CallReport/detail")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Length"] = ""
request.body = "{\n    \"ssid\": \"{{ssid}}\",\n    \"userId\": \"29791451\",\n    \"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\n    \"rType\": [\n        \"dtl\"\n    ]\n}"

response = https.request(request)
puts response.read_body
printf '{
    "ssid": "{{ssid}}",
    "userId": "29791451",
    "clId": "kyrnwv1c8ps5zq6jcwaxtzicv",
    "rType": [
        "dtl"
    ]
}'| http  --follow --timeout 3600 POST 'https://{{brand}}/api/v2/CallReport/detail' \
 Content-Length:
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

let parameters = "{\n    \"ssid\": \"{{ssid}}\",\n    \"userId\": \"29791451\",\n    \"clId\": \"kyrnwv1c8ps5zq6jcwaxtzicv\",\n    \"rType\": [\n        \"dtl\"\n    ]\n}"
let postData = parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "https://{{brand}}/api/v2/CallReport/detail")!,timeoutInterval: Double.infinity)
request.addValue("", forHTTPHeaderField: "Content-Length")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in 
   guard let data = data else {
      print(String(describing: error))
      semaphore.signal()
      return
   }
   print(String(data: data, encoding: .utf8)!)
   semaphore.signal()
}

task.resume()
semaphore.wait()

Example Response

 [{"key":"Date"
"value":"Sun
 23 Nov 2025 10:24:18 GMT"}
{"key":"Content-Type"
"value":"application\/json; charset=utf-8"}
{"key":"Content-Length"
"value":"1640"}
{"key":"Connection"
"value":"keep-alive"}
{"key":"Access-Control-Allow-Origin"
"value":"*"}
{"key":"Access-Control-Allow-Methods"
"value":"GET
 PUT
 POST
 DELETE
 OPTIONS"}
{"key":"Access-Control-Allow-Headers"
"value":"session-token
Authorization
Origin
Accept
Content-Type
DNT
Authorization
Keep-Alive
User-Agent
X-Requested-With
If-Modified-Since
Cache-Control
Content-Type
Content-Range
Range"}
{"key":"Access-Control-Allow-Credentials"
"value":"true"}
{"key":"Vary"
"value":"Origin"}
{"key":"ETag"
"value":"W\/\"668-4nPpUBJMDODHNydGaL3O87hTBIM\""}
{"key":"Strict-Transport-Security"
"value":"max-age=15724800; includeSubDomains"}
{"key":"Access-Control-Max-Age"
"value":"1728000"}]
 {
    "data": {
        "iExcFlw": "",
        "chIs": false,
        "clId": "kyrnwv1c8ps5zq6jcwaxtzicv",
        "cNum": "{{mobile}}",
        "cNm": "",
        "dur": {
            "q": "00:00:00",
            "c": "00:00:00",
            "agtOnCl": "00:01:23"
        },
        "amt": 0,
        "ivrAr": [
            -1
        ],
        "op": "",
        "crcl": "",
        "fAtnd": "Agent",
        "exc": 90,
        "uid": "29791451",
        "api": "{\"userId\":\"29791451\",\"callFirst\":\"agent\",\"customer\":\"{{mobile}}\",\"agent_id\":\"24\"}",
        "clTy": "CTC",
        "pWbU": "",
        "pWbS": "",
        "ndDt": [],
        "st": 3,
        "mAgt": 24,
        "tAgtCnt": 1,
        "clDt": "22/Nov/2025",
        "clTm": "4:13:18 pm",
        "tm": 1763808198000,
        "ctcc": [
            {
                "agt": 24,
                "nd": "agentCall",
                "rgDur": "00:00:05",
                "sTm": "4:13:38 pm",
                "sDt": "22/11/25",
                "dur": "00:01:13",
                "clDur": "00:01:23",
                "rty": "0",
                "ansTm": "00:00:00",
                "rcrd": "{{ssid}}*mp3*29791451*2025*11*22*kyrnwv1c8ps5zq6jcwaxtzicv_919376162321_2025-11-22-16-13-37_CTC.mp3"
            }
        ],
        "ctc": [
            {
                "num": "{{mobile}}",
                "nd": "",
                "ndTy": "",
                "rgDur": "00:00:08",
                "sTm": "00:00:00",
                "sDt": "",
                "dur": "00:00:00",
                "clDur": "00:01:14",
                "rty": "0",
                "ansTm": "00:00:00",
                "rcrd": "{{ssid}}*mp3*29791451*2025*11*22*kyrnwv1c8ps5zq6jcwaxtzicv_919376162321_2025-11-22-16-13-37_CTC.mp3"
            }
        ]
    }
}
©2021-2025 DeepCall (Powered by Sarv.com). All rights reserved.