import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const subNumberOrders = await client.subNumberOrders.list();
console.log(subNumberOrders.data);{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"order_request_id": "12ade33a-21c0-473b-b055-b3c836e1c293",
"country_code": "US",
"phone_number_type": "local",
"user_id": "d70873cd-7c98-401a-81b6-b1ae08246995",
"regulatory_requirements": [
{
"record_type": "phone_number_regulatory_requirement",
"requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"field_type": "address"
}
],
"record_type": "sub_number_order",
"phone_numbers_count": 1,
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"requirements_met": true,
"status": "pending",
"customer_reference": "MY REF 001",
"is_block_sub_number_order": false
}
],
"meta": {
"total_pages": 3,
"page_number": 2,
"total_results": 55,
"page_size": 25
}
}Get a paginated list of sub number orders.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const subNumberOrders = await client.subNumberOrders.list();
console.log(subNumberOrders.data);{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"order_request_id": "12ade33a-21c0-473b-b055-b3c836e1c293",
"country_code": "US",
"phone_number_type": "local",
"user_id": "d70873cd-7c98-401a-81b6-b1ae08246995",
"regulatory_requirements": [
{
"record_type": "phone_number_regulatory_requirement",
"requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"field_type": "address"
}
],
"record_type": "sub_number_order",
"phone_numbers_count": 1,
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"requirements_met": true,
"status": "pending",
"customer_reference": "MY REF 001",
"is_block_sub_number_order": false
}
],
"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 (deepObject style). Originally: filter[status], filter[order_request_id], filter[country_code], filter[phone_number_type], filter[phone_numbers_count]
Show child attributes
Filter sub number orders by status.
ID of the number order the sub number order belongs to
"12ade33a-21c0-473b-b055-b3c836e1c293"
ISO alpha-2 country code.
"US"
Phone Number Type
"local"
Amount of numbers in the sub number order
1
Successful response with a list of sub number orders.
Show child attributes
"12ade33a-21c0-473b-b055-b3c836e1c292"
"12ade33a-21c0-473b-b055-b3c836e1c293"
"US"
local, toll_free, mobile, national, shared_cost, landline "local"
"d70873cd-7c98-401a-81b6-b1ae08246995"
Show child attributes
"phone_number_regulatory_requirement"
Unique id for a requirement.
"8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
textual, datetime, address, document "address"
"sub_number_order"
The count of phone numbers in the number order.
1
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
The status of the order.
pending, success, failure A customer reference string for customer look ups.
"MY REF 001"
True if the sub number order is a block sub number order
false
Was this page helpful?