import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const simCardOrder of client.simCardOrders.list()) {
console.log(simCardOrder.id);
}{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card_order",
"quantity": 21,
"cost": {
"amount": "2.52",
"currency": "USD"
},
"order_address": {
"id": "1293384261075731499",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"country_code": "US",
"postal_code": "78701"
},
"tracking_url": "http://www.example.com/",
"status": "pending",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Get all SIM card orders according to filters.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const simCardOrder of client.simCardOrders.list()) {
console.log(simCardOrder.id);
}{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card_order",
"quantity": 21,
"cost": {
"amount": "2.52",
"currency": "USD"
},
"order_address": {
"id": "1293384261075731499",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"country_code": "US",
"postal_code": "78701"
},
"tracking_url": "http://www.example.com/",
"status": "pending",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter for SIM card orders (deepObject style). Originally: filter[created_at], filter[updated_at], filter[quantity], filter[cost.amount], filter[cost.currency], filter[address.id], filter[address.street_address], filter[address.extended_address], filter[address.locality], filter[address.administrative_area], filter[address.country_code], filter[address.postal_code]
Show child attributes
Filter by ISO 8601 formatted date-time string matching resource creation date-time.
"2018-02-02T22:25:27.521Z"
Filter by ISO 8601 formatted date-time string matching resource last update date-time.
"2018-02-02T22:25:27.521Z"
Filter orders by how many SIM cards were ordered.
21
The total monetary amount of the order.
"2.53"
Filter by ISO 4217 currency string.
"USD"
Uniquely identifies the address for the order.
"1293384261075731499"
Returns entries with matching name of the street where the address is located.
"600 Congress Avenue"
Returns entries with matching name of the supplemental field for address information.
"14th Floor"
Filter by the name of the city where the address is located.
"Austin"
Filter by state or province where the address is located.
"TX"
Filter by the mobile operator two-character (ISO 3166-1 alpha-2) origin country code.
"US"
Filter by postal code for the address.
"78701"
Successful Response
Show child attributes
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Identifies the type of the resource.
"sim_card_order"
The amount of SIM cards requested in the SIM card order.
x >= 121
An object representing the address information from when the order was submitted.
Show child attributes
Uniquely identifies the address for the order.
"1293384261075731499"
The first name of the shipping recipient.
"John"
The last name of the shipping recipient.
"Smith"
The name of the business where the address is located.
"Telnyx LLC"
The name of the street where the address is located.
"600 Congress Avenue"
Supplemental field for address information.
"14th Floor"
The name of the city where the address is located.
"Austin"
State or province where the address is located.
"TX"
The mobile operator two-character (ISO 3166-1 alpha-2) origin country code.
"US"
Postal code for the address.
"78701"
{
"id": "1293384261075731499",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"country_code": "US",
"postal_code": "78701"
}The URL used to get tracking information about the order.
"http://www.example.com/"
The current status of the SIM Card order.
pending - the order is waiting to be processed.processing - the order is currently being processed.ready_to_ship - the order is ready to be shipped to the specified address.shipped - the order was shipped and is on its way to be delivered to the specified address.delivered - the order was delivered to the specified address.canceled - the order was canceled.pending, processing, ready_to_ship, shipped, delivered, canceled "pending"
ISO 8601 formatted date-time indicating when the resource was last created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date-time indicating when the resource was last updated.
"2018-02-02T22:25:27.521Z"
Was this page helpful?