import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const event = await client.portouts.events.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(event.data);{
"data": {
"id": "eef3340b-8903-4466-b445-89b697315a3a",
"event_type": "portout.status_changed",
"portout_id": "9471c873-e3eb-4ca1-957d-f9a451334d52",
"available_notification_methods": [
"email"
],
"payload_status": "created",
"payload": {
"id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
"status": "authorized",
"phone_numbers": [
"+35312345678"
],
"carrier_name": "Testing Carrier",
"spid": "987H",
"user_id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
"subscriber_name": "John Doe",
"rejection_reason": null,
"attempted_pin": "1234"
},
"record_type": "portout_event",
"created_at": "2021-03-19T10:07:15.527000Z",
"updated_at": "2021-03-19T10:07:15.527000Z"
}
}Show a specific port-out event.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const event = await client.portouts.events.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(event.data);{
"data": {
"id": "eef3340b-8903-4466-b445-89b697315a3a",
"event_type": "portout.status_changed",
"portout_id": "9471c873-e3eb-4ca1-957d-f9a451334d52",
"available_notification_methods": [
"email"
],
"payload_status": "created",
"payload": {
"id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
"status": "authorized",
"phone_numbers": [
"+35312345678"
],
"carrier_name": "Testing Carrier",
"spid": "987H",
"user_id": "96dfa9e4-c753-4fd3-97cd-42d66f26cf0c",
"subscriber_name": "John Doe",
"rejection_reason": null,
"attempted_pin": "1234"
},
"record_type": "portout_event",
"created_at": "2021-03-19T10:07:15.527000Z",
"updated_at": "2021-03-19T10:07:15.527000Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Identifies the port-out event.
Successful response
Show child attributes
Uniquely identifies the event.
"eef3340b-8903-4466-b445-89b697315a3a"
Identifies the event type
portout.status_changed, portout.foc_date_changed, portout.new_comment "portout.status_changed"
Identifies the port-out order associated with the event.
"9471c873-e3eb-4ca1-957d-f9a451334d52"
Indicates the notification methods used.
email, webhook The status of the payload generation.
created, completed "created"
The webhook payload for the portout.status_changed event
Show child attributes
Identifies the port out that was moved.
"96dfa9e4-c753-4fd3-97cd-42d66f26cf0c"
The new status of the port out.
pending, authorized, ported, rejected, rejected-pending, canceled "authorized"
Phone numbers associated with this port-out order
E164 formatted phone number
["+35312345678"]Carrier the number will be ported out to
"Testing Carrier"
The new carrier SPID.
"987H"
Identifies the user that the port-out order belongs to.
"96dfa9e4-c753-4fd3-97cd-42d66f26cf0c"
The name of the port-out's end user.
"John Doe"
The reason why the order is being rejected by the user. If the order is authorized, this field can be left null
null
The PIN that was attempted to be used to authorize the port out.
"1234"
Identifies the type of the resource.
"portout_event"
ISO 8601 formatted date indicating when the resource was created.
"2021-03-19T10:07:15.527000Z"
ISO 8601 formatted date indicating when the resource was updated.
"2021-03-19T10:07:15.527000Z"
Was this page helpful?