sTN Partner APIsTN Partner API
Home
Getting Started
Guide
Home
Getting Started
Guide
  • Guide

    • Introduction
    • Supported Features
    • Authentication
    • Base URLs
    • Advanced Query Parameters
    • Error Handling
  • Getting Started

    • Introduction
    • Quick Start Guide
  • API Endpoints

    • QuerySimcard
    • QueryActivation
    • QuerySubscription
    • NewSubscription
    • CancelNewSubscription
    • SuspendSubscription
    • ResumeSubscription
    • SimSwapSubscription
    • SetServicesSubscription
    • MoveEnvironmentSubscription
    • InPortSubscription
    • ChangeInPortSubscription
    • CancelInPortSubscription
    • PortingOutSubscription
    • CancelPortingOutSubscription
    • TerminateSubscription
    • CancelTerminateSubscription
    • QueryInvoice
    • QueryCdrMonth
    • QueryCdr
    • QueryUsageSubscription

QueryCdrMonth

Overview

  • Method: GET
  • Endpoint: /api/QueryCdrMonth
  • Description: Retrieves a list of available months for Call Detail Records (CDRs). This endpoint provides metadata about available CDR months, grouped by provider.
GET /api/QueryCdrMonth

Query Parameters

The following parameters can be used to filter the results:

  • yearMonth (string, optional): Filter by year and month (YYYY_MM).
  • 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 include metadata about available CDR months:

{
    "offset": 0,
    "total": 0,
    "results": [
        {
            "yearMonth": "2025_01",
            "providerGroup": "KPNMOBIEL"
        }
    ],
    "meta":{}
}

Field Descriptions

  • yearMonth: Year and month of available CDR data in YYYY_MM format.
  • providerGroup: The provider group associated with the CDR data.

Info

The response provides an overview of available CDR data grouped by provider.


Usage Notes

  • Use yearMonth to filter results for a specific month.
  • Use pagination (take and skip) to manage large result sets.
  • orderBy and orderByDesc allow sorting results by a specific field.
  • The response provides the latest available yearMonth that can be used in subsequent queries.

Example Requests

Retrieve available months for a specific year

GET /api/QueryCdrMonth?yearMonth=2024_01

Retrieve the first 10 months sorted by provider group

GET /api/QueryCdrMonth?take=10&orderBy=providerGroup

Retrieve the 3 most recent months

GET /api/QueryCdrMonth?orderByDesc=yearMonth&take=3

Example Response:

{
    "offset": 0,
    "total": 0,
    "results": [
        {
            "yearMonth": "2025_01",
            "providerGroup": "KPNMOBIEL"
        },
        {
            "yearMonth": "2024_12",
            "providerGroup": "KPNMOBIEL"
        },
        {
            "yearMonth": "2024_11",
            "providerGroup": "KPNMOBIEL"
        }
    ],
    "meta": {}
}

To check if a specific yearMonth is available, query:

GET /api/QueryCdrMonth?yearMonth=2025_01

If values are returned in the results field, data is available for that month.


Summary

The /api/QueryCdrMonth endpoint provides metadata on available CDR months.

  • Supports filtering by yearMonth.
  • Returns a list of available months grouped by provider.
  • Allows sorting and pagination for optimized data retrieval.

Use this API to verify the availability of CDR data before querying further details.

Last Updated:
Contributors: UP2media-AR
Prev
QueryInvoice
Next
QueryCdr