QueryCdr
Overview
- Method:
GET
- Endpoint:
/api/QueryCdr
- Description: Retrieves a list of Call Detail Records (CDRs) based on specified filters and sorting criteria.
GET /api/QueryCdr
Query Parameters
The following parameters can be used to filter and sort the results:
yearMonth
(string, required): Filter by year and month (YYYY_MM).id
(string, optional): Filter by specific CDR ID.customerId
(string, optional): Filter by customer ID.phoneNumber
(string, optional): Filter by phone number.include
(string, optional): Related data to include in the response.fields
(string, optional): Specific fields to include in the response.meta
(string, optional): Additional metadata for the query.take
(integer, optional): Number of results to return (pagination).skip
(integer, optional): Number of results to skip (pagination).orderBy
/orderByDesc
(string, optional): Sort results in ascending or descending order by a specific field.
Response Structure
The response will contain metadata about the queried CDRs:
{
"offset": 0,
"total": 90,
"results": [
{
"id": "###9fa78###8e251c49",
"subscriptionId": "###AM8FA###bc9no6",
"phoneNumber": "06-######290",
"yearMonth": "2025_01",
"providerGroup": "KPNMOBIEL",
"description": "Bellen naar mobiel",
"rateClass": "N_MOBOV",
"usageDate": "2024-12-27T10:29:48Z",
"volume": 5,
"amount": 0,
"destination": "316#######94",
"countryCodeOwn": "NL",
"countryCodeDestination": "NL"
},
{
"id": "###9fa79###8e251c4a",
"subscriptionId": "###tSUso###PpTVze",
"phoneNumber": "06-######611",
"yearMonth": "2025_01",
"providerGroup": "KPNMOBIEL",
"description": "Internet nationaal",
"rateClass": "INT_NAT",
"usageDate": "2024-12-19T10:17:23Z",
"volume": 31,
"amount": 0.0002,
"destination": "000INTERNET",
"countryCodeOwn": "NL"
},
{
"id": "###9fa79###8e251c4b",
"subscriptionId": "###tSUso###PpTVze",
"phoneNumber": "06-######611",
"yearMonth": "2025_01",
"providerGroup": "KPNMOBIEL",
"description": "Internet nationaal",
"rateClass": "INT_NAT",
"usageDate": "2024-12-19T18:17:24Z",
"volume": 18,
"amount": 0.0001,
"destination": "000INTERNET",
"countryCodeOwn": "NL"
},
{
"id": "###9fa79###8e251c4c",
"subscriptionId": "###tSUso###PpTVze",
"phoneNumber": "06-######611",
"yearMonth": "2025_01",
"providerGroup": "KPNMOBIEL",
"description": "Internet nationaal",
"rateClass": "INT_NAT",
"usageDate": "2024-12-20T02:17:24Z",
"volume": 458,
"amount": 0.0022,
"destination": "000INTERNET",
"countryCodeOwn": "NL"
}
],
"meta": {}
}
Field Descriptions
id
: Unique identifier for the CDR record.subscriptionId
: ID of the subscription associated with the record.phoneNumber
: The phone number linked to the CDR entry.yearMonth
: The year and month of the record inYYYY_MM
format.providerGroup
: The provider group handling the service.userName
: The user associated with the CDR.description
: Description of the CDR entry.rateClass
: Classification of the rate applied to the call.usageDate
: Timestamp of when the usage occurred.volume
: The volume used. Units are kB for internet, seconds for voice and pieces for sms.amount
: The charge associated with the record.destination
: The destination number or service contacted.countryCodeOwn
: The country code of the caller.countryCodeDestination
: The country code of the recipient.
Info
The response provides detailed metadata for each CDR record, including call and data usage details.
Usage Notes
Combine filters like
yearMonth
andphoneNumber
to refine search results.Use pagination (
take
andskip
) to manage large result sets.orderBy
andorderByDesc
allow sorting results by a specific field.To improve query performance, use
QueryCdrMonth
before querying this endpoint to ensure the requested data exists.
Table 'rateclass'
code | invoice_description | traffic_type | foreign_country_type | mo_mt |
---|---|---|---|---|
BEELDBELLEN | Beeldbellen | VOICE | NATIONAL | MO |
DOORSCHAKEL | Doorgeschakelde gesprekken | VOICE | NATIONAL | MO |
IAO_BENEFIT | Bellen vanuit voordeellanden | VOICE | INTERNATIONAL | MO |
IAO_EU | Bellen vanuit de EU | VOICE | INTERNATIONAL | MO |
IAO_RESTEU | Bellen vanuit de rest van Europa | VOICE | INTERNATIONAL | MO |
IAO_SAT | Bellen vanuit satelliet | VOICE | INTERNATIONAL | MO |
IAO_SPEC | Bellen vanuit speciale landen | VOICE | INTERNATIONAL | MO |
IAO_USCAN | Bellen vanuit VS of Canada | VOICE | INTERNATIONAL | MO |
IAO_WORLD | Bellen vanuit de rest van de wereld | VOICE | INTERNATIONAL | MO |
IAT_BENEFIT | Gebeld worden in voordeellanden | VOICE | INTERNATIONAL | MT |
IAT_EU | Gebeld worden in de EU | VOICE | INTERNATIONAL | MT |
IAT_RESTEU | Gebeld worden in de rest van Europa | VOICE | INTERNATIONAL | MT |
IAT_SAT | Gebeld worden satelliet | VOICE | INTERNATIONAL | MT |
IAT_SPEC | Gebeld worden in speciale landen | VOICE | INTERNATIONAL | MT |
IAT_USCAN | Gebeld worden in VS of Canada | VOICE | INTERNATIONAL | MT |
IAT_WORLD | Gebeld worden in de rest van de wereld | VOICE | INTERNATIONAL | MT |
IAS_BENEFIT | SMS vanuit voordeellanden | SMS | INTERNATIONAL | MO |
IAS_EU | SMS vanuit de EU | SMS | INTERNATIONAL | MO |
IAS_SAT | SMS vanuit satelliet | SMS | INTERNATIONAL | MO |
IAS_USCAN | SMS vanuit VS of Canada | SMS | INTERNATIONAL | MO |
IAS_WORLD | SMS vanuit de rest van de wereld | SMS | INTERNATIONAL | MO |
INT_BENEFIT | Internet in voordeellanden | DATA | INTERNATIONAL | MO |
INT_BENEFITEXTRA | Internet in extra voordeellanden | DATA | INTERNATIONAL | MO |
INT_EU | Internet EU | DATA | INTERNATIONAL | MO |
INT_NAT | Internet nationaal | DATA | NATIONAL | MO |
INT_SAT | Internet via satelliet | DATA | INTERNATIONAL | MO |
INT_USCAN | Internet in VS of Canada | DATA | INTERNATIONAL | MO |
INT_WORLD | Internet in de rest van de wereld | DATA | INTERNATIONAL | MO |
MMS | MMS | MMS | NATIONAL | MO |
MOBSERV | Mobiele diensten | DATA | NATIONAL | MO |
N_FIXED | Bellen naar vaste nummers | VOICE | NATIONAL | MO |
N_FREE | Gratis nummer | VOICE | NATIONAL | MO |
N_MOBOV | Bellen naar mobiel | VOICE | NATIONAL | MO |
N_SMS | Sms-berichten | SMS | NATIONAL | MO |
PRMINFO | Servicenummers | VOICE | NATIONAL | MO |
PRMINFOENT | 0906/0909 nummers | VOICE | NATIONAL | MO |
PRMINFOFWD_SERV | Bemiddeling/nummerinfo - dienst | VOICE | NATIONAL | MO |
PRMINFOFWD_TRAF | Bemiddeling/nummerinfo - verkeer | VOICE | NATIONAL | MO |
PRMINFONOVAT_SERV | 0900 nummers BTW-vrij - dienst | VOICE | NATIONAL | MO |
PRMINFONOVAT_TRAF | 0900 nummers BTW-vrij - verkeer | VOICE | NATIONAL | MO |
PRMINFOPERS | 06-Informatienummers | VOICE | NATIONAL | MO |
PRMINFOSERV_SERV | 0900 Servicenummers - dienst | VOICE | NATIONAL | MO |
PRMINFOSERV_TRAF | 0900 Servicenummers - verkeer | VOICE | NATIONAL | MO |
PRMSMS | Sms info: zie www.payinfo.nl | SMS | NATIONAL | MT |
TAO_BENEFIT | Bellen naar voordeellanden | VOICE | INTERNATIONAL | MO |
TAO_EU | Bellen naar een EU-land | VOICE | INTERNATIONAL | MO |
TAO_RESTEU | Bellen naar de rest van Europa | VOICE | INTERNATIONAL | MO |
TAO_SAT | Bellen naarsatelliet | VOICE | INTERNATIONAL | MO |
TAO_SPEC | Bellen naar speciale landen | VOICE | INTERNATIONAL | MO |
TAO_USCAN | Bellen naar VS of Canada | VOICE | INTERNATIONAL | MO |
TAO_WORLD | Bellen naar de rest van de wereld | VOICE | INTERNATIONAL | MO |
TAS_BENEFIT | SMS naar voordeellanden | SMS | INTERNATIONAL | MO |
TAS_EU | SMS naar een EU-land | SMS | INTERNATIONAL | MO |
TAS_SAT | SMS naar satelliet | SMS | INTERNATIONAL | MO |
TAS_USCAN | SMS naar VS of Canada | SMS | INTERNATIONAL | MO |
TAS_WORLD | SMS naar de rest van de wereld | SMS | INTERNATIONAL | MO |
Example Requests
Retrieve all CDRs for a specific year and month
GET /api/QueryCdr?yearMonth=2024_01
Retrieve CDRs for a specific phone number
GET /api/QueryCdr?phoneNumber=0612345678
Paginate through results, 50 records at a time
GET /api/QueryCdr?yearMonth=2024_01&skip=0&take=50
Sort results by usage date in descending order
GET /api/QueryCdr?yearMonth=2024_01&orderByDesc=usageDate
Summary
The /api/QueryCdr
endpoint provides detailed records of call and data usage.
- Requires
yearMonth
as a mandatory filter. - Supports filtering by phone number, customer ID, and other metadata.
- Allows sorting and pagination for optimized data retrieval.
- Provides detailed information on call destinations, charges, and volume usage.
Use this API to retrieve and analyze Call Detail Records efficiently.