api:customer:cdr
Table of Contents
API : Customer CDR list
Introduction
This request will return a list of all CDR of customers related to specific reseller. Checks of CDR older than 6 months can't be made and it can only be within a time window of one month.
Request
| URL | https://api.telecomx.dk/customer/cdrs | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER, RESELLER_ADMIN or ADMIN | |
| Query | offset | [optional] Index of the first CDR to return, default 0. |
| limit | [optional] The number of CDR return, default 10000, min 1, max 10000. |
|
| fromDate | To filter CDR from specific date. Format: YYYY-MM-DD | |
| toDate | [optional] To filter CDR to specific date. Default one month from fromDate. Format: YYYY-MM-DD |
|
| type | [optional] Type of calls to check for. INBOUND or OUTBOUND |
|
Query examples
https://api.telecomx.dk/customer/cdrs?fromDate=2025-08-01 https://api.telecomx.dk/customer/cdrs?fromDate=2025-08-01&offset=0&limit=10000 https://api.telecomx.dk/customer/cdrs?fromDate=2025-08-01&toDate=2025-08-21&offset=0&limit=10000 https://api.telecomx.dk/customer/cdrs?fromDate=2025-08-01&toDate=2025-08-21&type=INBOUND&offset=0&limit=10000
Response
| Response object (JSON) | ||
|---|---|---|
| offset | Number | Current pagination offset for CDR. |
| limit | Number | Number of CDR requested per page (max 10000). |
| count | Number | Total number of CDR found. |
| cdrs | Array | Array of CDR objects |
| CDR object | ||
| cdrs[]._id | Id | Unique CDR id. |
| cdrs[].aNumber | String | A-number (calling party). Returns empty string if aNumber is secret |
| cdrs[].bNumber | String | B-number (called party). |
| cdrs[].customer | Id | Customer id the CDR belongs to. |
| cdrs[].talkLength | Number | Duration of the call in seconds. |
| cdrs[].terminatedBy | String | Party that terminated the call (A or B). |
| cdrs[].terminationCause | String | Reason for call termination. |
| cdrs[].minutesWholeSale | Number | Wholesale cost in minutes. |
| cdrs[].minutesPrice | Number | Retail price in minutes. |
| cdrs[].start | Date | Call start timestamp (ISO format). |
| cdrs[].type | String | Type of call. Can be MVNO_OUTBOUND, MVNO_INBOUND, SIP_OUTBOUND and SIP_INBOUND |
| cdrs[].destination | Object | Destination details. |
| cdrs[].destination.country | String | ISO country code (e.g., DK, SE). |
| cdrs[].destination.type | String | Destination type (e.g., mobile). |
| cdrs[].destination.name | String | Destination name (null if not available). |
Example
{ offset: 0, limit: 10000, count: 9217, records: [ { _id: '67890ABCDEF1234567890ABC', aNumber: '+4512345678', bNumber: '+4587654321', destination: { country: 'DK', type: 'mobile', name: null, }, customer: '1234567890ABCDEF12345678', talkLength: 183, terminatedBy: 'A', terminationCause: 'NORMAL', minutesWholeSale: 0.02, minutesPrice: 0.15, start: '2025-12-15T14:32:18.000Z', type: 'MVNO_OUTBOUND', }, { _id: '67890ABCDEF1234567890ABD', aNumber: '', bNumber: '+46701234567', destination: { country: 'SE', type: 'mobile', name: null, }, customer: '1234567890ABCDEF12345679', talkLength: 425, terminatedBy: 'B', terminationCause: 'NORMAL', minutesWholeSale: 0.05, minutesPrice: 0.25, start: '2025-12-15T10:15:42.000Z', type: 'MVNO_OUTBOUND', }, { _id: '67890ABCDEF1234567890ABE', aNumber: '+4587654321', bNumber: '+4512345678', destination: { country: 'DK', type: 'mobile', name: null, }, customer: '1234567890ABCDEF12345678', talkLength: 67, terminatedBy: 'A', terminationCause: 'BUSY', minutesWholeSale: 0.02, minutesPrice: 0.15, start: '2025-12-14T16:48:05.000Z', type: 'MVNO_OUTBOUND', } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/customer/cdr.txt · Last modified: 2026/01/27 13:49 by Thomas Andersen