import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.legacy.reporting.batchDetailRecords.voice.retrieveFields();
console.log(response.Billing);{
"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"
]
}Retrieves all available fields that can be used in CDR reports
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.legacy.reporting.batchDetailRecords.voice.retrieveFields();
console.log(response.Billing);{
"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"
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Available fields retrieved successfully
Available CDR report fields grouped by category
Fields related to call interaction and basic call information
[
"origination_number",
"terminating_number",
"start_timestamp_utc",
"start_timestamp",
"answer_timestamp",
"end_timestamp",
"direction"
]Geographic and routing information for phone numbers
[
"origination_city",
"origination_state",
"origination_lata",
"origination_country",
"terminating_city",
"terminating_state"
]Technical telephony and call control information
[
"route",
"connection_id",
"hangup_code",
"pdd",
"tags",
"sip_call_id",
"mos"
]Cost and billing related information
[
"billable_time",
"cost",
"rate",
"billing_group_id"
]Was this page helpful?