import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const numberOrders = await client.numberOrders.list();
console.log(numberOrders.data);{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "number_order",
"phone_numbers_count": 1,
"connection_id": "346789098765567",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
"billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
"phone_numbers": [
{
"phone_number": "+19705555000",
"id": "<string>"
}
],
"sub_number_orders_ids": [
"<string>"
],
"status": "pending",
"customer_reference": "MY REF 001",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"requirements_met": true
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Get a paginated list of number orders.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const numberOrders = await client.numberOrders.list();
console.log(numberOrders.data);{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "number_order",
"phone_numbers_count": 1,
"connection_id": "346789098765567",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
"billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
"phone_numbers": [
{
"phone_number": "+19705555000",
"id": "<string>"
}
],
"sub_number_orders_ids": [
"<string>"
],
"status": "pending",
"customer_reference": "MY REF 001",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"requirements_met": true
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[status], filter[created_at], filter[phone_numbers_count], filter[customer_reference], filter[requirements_met]
Show child attributes
Filter number orders by status.
Filter number order with this amount of numbers
Filter number orders via the customer reference set.
Filter number orders by requirements met.
Successful response with a list of number orders.
Show child attributes
"12ade33a-21c0-473b-b055-b3c836e1c292"
"number_order"
The count of phone numbers in the number order.
1
Identifies the connection associated with this phone number.
"346789098765567"
Identifies the messaging profile associated with the phone number.
"abc85f64-5717-4562-b3fc-2c9600"
Identifies the messaging profile associated with the phone number.
"abc85f64-5717-4562-b3fc-2c9600"
The status of the order.
pending, success, failure A customer reference string for customer look ups.
"MY REF 001"
An ISO 8901 datetime string denoting when the number order was created.
"2018-01-01T00:00:00.000000Z"
An ISO 8901 datetime string for when the number order was updated.
"2018-01-01T00:00:00.000000Z"
True if all requirements are met for every phone number, false otherwise.
true
Was this page helpful?