Get available CDR report fields
Retrieves all available fields that can be used in CDR reports
GET
/
legacy_reporting
/
batch_detail_records
/
voice
/
fields
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.legacy.reporting.batchDetailRecords.voice.retrieveFields();
console.log(response.Billing);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.legacy.reporting.batch_detail_records.voice.retrieve_fields()
print(response.billing)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Legacy.Reporting.BatchDetailRecords.Voice.GetFields(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Billing)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.voice.VoiceRetrieveFieldsParams;
import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.voice.VoiceRetrieveFieldsResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VoiceRetrieveFieldsResponse response = client.legacy().reporting().batchDetailRecords().voice().retrieveFields();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.legacy.reporting.batch_detail_records.voice.retrieve_fields
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client
->legacy
->reporting
->batchDetailRecords
->voice
->retrieveFields();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx legacy:reporting:batch-detail-records:voice retrieve-fields \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/legacy_reporting/batch_detail_records/voice/fields \
--header 'Authorization: Bearer <token>'{
"Interaction Data": [
"origination_number",
"terminating_number",
"start_timestamp_utc",
"start_timestamp",
"answer_timestamp",
"end_timestamp",
"direction"
],
"Number Information": [
"origination_city",
"origination_state",
"origination_lata",
"origination_country",
"terminating_city",
"terminating_state"
],
"Telephony Data": [
"route",
"connection_id",
"hangup_code",
"pdd",
"tags",
"sip_call_id",
"mos"
],
"Billing": [
"billable_time",
"cost",
"rate",
"billing_group_id"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Available fields retrieved successfully
Available CDR report fields grouped by category
Fields related to call interaction and basic call information
Example:
[
"origination_number",
"terminating_number",
"start_timestamp_utc",
"start_timestamp",
"answer_timestamp",
"end_timestamp",
"direction"
]
Geographic and routing information for phone numbers
Example:
[
"origination_city",
"origination_state",
"origination_lata",
"origination_country",
"terminating_city",
"terminating_state"
]
Technical telephony and call control information
Example:
[
"route",
"connection_id",
"hangup_code",
"pdd",
"tags",
"sip_call_id",
"mos"
]
Cost and billing related information
Example:
[
"billable_time",
"cost",
"rate",
"billing_group_id"
]
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.legacy.reporting.batchDetailRecords.voice.retrieveFields();
console.log(response.Billing);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.legacy.reporting.batch_detail_records.voice.retrieve_fields()
print(response.billing)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Legacy.Reporting.BatchDetailRecords.Voice.GetFields(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Billing)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.voice.VoiceRetrieveFieldsParams;
import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.voice.VoiceRetrieveFieldsResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VoiceRetrieveFieldsResponse response = client.legacy().reporting().batchDetailRecords().voice().retrieveFields();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.legacy.reporting.batch_detail_records.voice.retrieve_fields
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client
->legacy
->reporting
->batchDetailRecords
->voice
->retrieveFields();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx legacy:reporting:batch-detail-records:voice retrieve-fields \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/legacy_reporting/batch_detail_records/voice/fields \
--header 'Authorization: Bearer <token>'{
"Interaction Data": [
"origination_number",
"terminating_number",
"start_timestamp_utc",
"start_timestamp",
"answer_timestamp",
"end_timestamp",
"direction"
],
"Number Information": [
"origination_city",
"origination_state",
"origination_lata",
"origination_country",
"terminating_city",
"terminating_state"
],
"Telephony Data": [
"route",
"connection_id",
"hangup_code",
"pdd",
"tags",
"sip_call_id",
"mos"
],
"Billing": [
"billable_time",
"cost",
"rate",
"billing_group_id"
]
}