import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const customerServiceRecord = await client.customerServiceRecords.retrieve('customer_service_record_id');
console.log(customerServiceRecord.data);{
"data": {
"id": "f1486bae-f067-460c-ad43-73a92848f902",
"phone_number": "+12065551212",
"status": "completed",
"error_message": "CSR information not available.",
"result": {
"carrier_name": "ABC CARRIER, INC.",
"associated_phone_numbers": [
"+12065551212"
],
"admin": {
"name": "John Doe",
"billing_phone_number": "+12065551212",
"account_number": "1234567890",
"authorized_person_name": "John Doe"
},
"address": {
"administrative_area": "NY",
"locality": "New York",
"postal_code": "10001",
"street_address": "123 Main St",
"full_address": "123 Main St; New York; NY; 10001"
}
},
"record_type": "customer_service_record",
"created_at": "2021-03-19T10:07:15.527Z",
"updated_at": "2021-03-19T10:07:15.527Z"
}
}Get a specific customer service record.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const customerServiceRecord = await client.customerServiceRecords.retrieve('customer_service_record_id');
console.log(customerServiceRecord.data);{
"data": {
"id": "f1486bae-f067-460c-ad43-73a92848f902",
"phone_number": "+12065551212",
"status": "completed",
"error_message": "CSR information not available.",
"result": {
"carrier_name": "ABC CARRIER, INC.",
"associated_phone_numbers": [
"+12065551212"
],
"admin": {
"name": "John Doe",
"billing_phone_number": "+12065551212",
"account_number": "1234567890",
"authorized_person_name": "John Doe"
},
"address": {
"administrative_area": "NY",
"locality": "New York",
"postal_code": "10001",
"street_address": "123 Main St",
"full_address": "123 Main St; New York; NY; 10001"
}
},
"record_type": "customer_service_record",
"created_at": "2021-03-19T10:07:15.527Z",
"updated_at": "2021-03-19T10:07:15.527Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the customer service record
Successful Response
Show child attributes
Uniquely identifies this customer service record
"f1486bae-f067-460c-ad43-73a92848f902"
The phone number of the customer service record.
"+12065551212"
The status of the customer service record
pending, completed, failed "completed"
The error message in case status is failed. This field would be null in case of pending or completed status.
"CSR information not available."
The result of the CSR request. This field would be null in case of pending or failed status.
Show child attributes
The name of the carrier that the customer service record is for.
"ABC CARRIER, INC."
The associated phone numbers of the customer service record.
The admin of the customer service record.
Show child attributes
The name of the customer service record.
"John Doe"
The billing phone number of the customer service record.
"+12065551212"
The account number of the customer service record.
"1234567890"
The authorized person name of the customer service record.
"John Doe"
The address of the customer service record
Show child attributes
The state of the address
"NY"
The city of the address
"New York"
The zip code of the address
"10001"
The street address
"123 Main St"
The full address
"123 Main St; New York; NY; 10001"
Identifies the type of the resource.
"customer_service_record"
ISO 8601 formatted date indicating when the resource was created.
"2021-03-19T10:07:15.527Z"
ISO 8601 formatted date indicating when the resource was created.
"2021-03-19T10:07:15.527Z"
Was this page helpful?