import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const portouts = await client.portouts.list();
console.log(portouts.data);{
"data": [
{
"id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"record_type": "portout",
"phone_numbers": [
"+35312345678"
],
"authorized_name": "McPortersen",
"carrier_name": "test",
"current_carrier": "telnyx",
"end_user_name": "McPortersen",
"city": "Chicago",
"state": "IL",
"zip": "00000",
"lsr": [
"https://example.com/files/lsr.pdf"
],
"pon": "00000000",
"reason": null,
"rejection_code": 1002,
"service_address": "000 Example Street",
"foc_date": "2018-02-02T22:25:27.521Z",
"requested_foc_date": "2018-02-02T22:25:27.521Z",
"spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"support_key": "PO_764725",
"status": "rejected",
"already_ported": false,
"user_id": "7865816a-ee85-4e50-b19e-52983dcc6d4a",
"vendor": "0e66ed3b-37e6-4fed-93d6-a30ce2493661",
"created_at": "2018-02-02T22:25:27.521Z",
"inserted_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"host_messaging": false
}
],
"meta": {
"total_pages": 13,
"total_results": 13,
"page_number": 3,
"page_size": 1
}
}Returns the portout requests according to filters
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const portouts = await client.portouts.list();
console.log(portouts.data);{
"data": [
{
"id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"record_type": "portout",
"phone_numbers": [
"+35312345678"
],
"authorized_name": "McPortersen",
"carrier_name": "test",
"current_carrier": "telnyx",
"end_user_name": "McPortersen",
"city": "Chicago",
"state": "IL",
"zip": "00000",
"lsr": [
"https://example.com/files/lsr.pdf"
],
"pon": "00000000",
"reason": null,
"rejection_code": 1002,
"service_address": "000 Example Street",
"foc_date": "2018-02-02T22:25:27.521Z",
"requested_foc_date": "2018-02-02T22:25:27.521Z",
"spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"support_key": "PO_764725",
"status": "rejected",
"already_ported": false,
"user_id": "7865816a-ee85-4e50-b19e-52983dcc6d4a",
"vendor": "0e66ed3b-37e6-4fed-93d6-a30ce2493661",
"created_at": "2018-02-02T22:25:27.521Z",
"inserted_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"host_messaging": false
}
],
"meta": {
"total_pages": 13,
"total_results": 13,
"page_number": 3,
"page_size": 1
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[carrier_name], filter[country_code], filter[country_code_in], filter[foc_date], filter[inserted_at], filter[phone_number], filter[pon], filter[ported_out_at], filter[spid], filter[status], filter[status_in], filter[support_key]
Show child attributes
Filter by new carrier name.
Filter by Port Order Number (PON).
Filter by new carrier spid.
Filter by portout status.
pending, authorized, ported, rejected, rejected-pending, canceled Filter by a list of portout statuses
pending, authorized, ported, rejected, rejected-pending, canceled Filter by 2-letter country code
"US"
Filter by a list of 2-letter country codes
["CA", "US"]Filter by ported_out_at date range using nested operations
Filter by inserted_at date range using nested operations
Filter by foc_date. Matches all portouts with the same date
"2024-09-04T00:00:00.000Z"
Filter by a phone number on the portout. Matches all portouts with the phone number
"+13035551212"
Filter by the portout's support_key
"PO_abc123"
Portout Response
Show child attributes
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
Identifies the type of the resource.
"portout"
Phone numbers associated with this portout
E164 formatted phone number
["+35312345678"]Name of person authorizing the porting order
"McPortersen"
Carrier the number will be ported out to
"test"
The current carrier
"telnyx"
Person name or company name requesting the port
"McPortersen"
City or municipality of billing address
"Chicago"
State, province, or similar of billing address
"IL"
Postal Code of billing address
"00000"
The Local Service Request
A link to the Local Service Request
["https://example.com/files/lsr.pdf"]Port order number assigned by the carrier the number will be ported out to
"00000000"
The reason why the order is being rejected by the user. If the order is authorized, this field can be left null
null
The rejection code for one of the valid rejections to reject a port out order
1002
First line of billing address (street address)
"000 Example Street"
ISO 8601 formatted Date/Time of the FOC date
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted Date/Time of the user requested FOC date
"2018-02-02T22:25:27.521Z"
New service provider spid
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
A key to reference this port out request when contacting Telnyx customer support
"PO_764725"
Status of portout request
pending, authorized, ported, rejected, rejected-pending, canceled "rejected"
Is true when the number is already ported
false
Identifies the user (or organization) who requested the port out
"7865816a-ee85-4e50-b19e-52983dcc6d4a"
Telnyx partner providing network coverage
"0e66ed3b-37e6-4fed-93d6-a30ce2493661"
ISO 8601 formatted date of when the portout was created
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date of when the portout was created
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date of when the portout was last updated
"2018-02-02T22:25:27.521Z"
Indicates whether messaging services should be maintained with Telnyx after the port out completes
false
Show child attributes
Total number of pages based on pagination settings
13
Total number of results
13
Current Page based on pagination settings (included when defaults are used.)
3
Number of results to return per page based on pagination settings (included when defaults are used.)
1
Was this page helpful?