import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.portingOrders.actions.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);{
"data": {
"activation_settings": {
"activation_status": null,
"fast_port_eligible": true,
"foc_datetime_actual": null,
"foc_datetime_requested": "2022-04-08T15:00:00Z"
},
"created_at": "2022-03-24T14:22:28Z",
"customer_reference": "Test1234",
"customer_group_reference": "Group-789",
"description": "FP Telnyx",
"documents": {
"loa": "3a5b98a0-5049-47c3-96e1-aa6c8d119117",
"invoice": "3a5b98a0-5049-47c3-96e1-aa6c8d119117"
},
"end_user": {
"admin": {
"account_number": "123abc",
"auth_person_name": "Porter McPortersen II",
"billing_phone_number": "+13035551234",
"business_identifier": "abc123",
"entity_name": "Porter McPortersen",
"pin_passcode": "1234",
"tax_identifier": "1234abcd"
},
"location": {
"administrative_area": "TX",
"country_code": "US",
"extended_address": "14th Floor",
"locality": "Austin",
"postal_code": "78701",
"street_address": "600 Congress Avenue"
}
},
"id": "eef10fb8-f3df-4c67-97c5-e18179723222",
"misc": {
"new_billing_phone_number": null,
"remaining_numbers_action": null,
"type": "full"
},
"old_service_provider_ocn": "Unreal Communications",
"parent_support_key": "pr_4bec1a",
"phone_number_configuration": {
"billing_group_id": null,
"connection_id": "1752379429071357070",
"emergency_address_id": null,
"messaging_profile_id": null,
"tags": []
},
"phone_number_type": "local",
"porting_phone_numbers_count": 1,
"record_type": "porting_order",
"requirements": [],
"requirements_met": true,
"status": {
"details": [],
"value": "cancel-pending"
},
"support_key": "sr_10b316",
"updated_at": "2022-03-24T16:43:35Z",
"user_feedback": {
"user_comment": null,
"user_rating": null
},
"user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
"webhook_url": "https://example.com/porting_webhooks"
},
"meta": {
"phone_numbers_url": "/v2/porting_phone_numbers?filter[porting_order_id]=eef10fb8-f3df-4c67-97c5-e18179723222"
}
}Cancel a porting order
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const response = await client.portingOrders.actions.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);{
"data": {
"activation_settings": {
"activation_status": null,
"fast_port_eligible": true,
"foc_datetime_actual": null,
"foc_datetime_requested": "2022-04-08T15:00:00Z"
},
"created_at": "2022-03-24T14:22:28Z",
"customer_reference": "Test1234",
"customer_group_reference": "Group-789",
"description": "FP Telnyx",
"documents": {
"loa": "3a5b98a0-5049-47c3-96e1-aa6c8d119117",
"invoice": "3a5b98a0-5049-47c3-96e1-aa6c8d119117"
},
"end_user": {
"admin": {
"account_number": "123abc",
"auth_person_name": "Porter McPortersen II",
"billing_phone_number": "+13035551234",
"business_identifier": "abc123",
"entity_name": "Porter McPortersen",
"pin_passcode": "1234",
"tax_identifier": "1234abcd"
},
"location": {
"administrative_area": "TX",
"country_code": "US",
"extended_address": "14th Floor",
"locality": "Austin",
"postal_code": "78701",
"street_address": "600 Congress Avenue"
}
},
"id": "eef10fb8-f3df-4c67-97c5-e18179723222",
"misc": {
"new_billing_phone_number": null,
"remaining_numbers_action": null,
"type": "full"
},
"old_service_provider_ocn": "Unreal Communications",
"parent_support_key": "pr_4bec1a",
"phone_number_configuration": {
"billing_group_id": null,
"connection_id": "1752379429071357070",
"emergency_address_id": null,
"messaging_profile_id": null,
"tags": []
},
"phone_number_type": "local",
"porting_phone_numbers_count": 1,
"record_type": "porting_order",
"requirements": [],
"requirements_met": true,
"status": {
"details": [],
"value": "cancel-pending"
},
"support_key": "sr_10b316",
"updated_at": "2022-03-24T16:43:35Z",
"user_feedback": {
"user_comment": null,
"user_rating": null
},
"user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
"webhook_url": "https://example.com/porting_webhooks"
},
"meta": {
"phone_numbers_url": "/v2/porting_phone_numbers?filter[porting_order_id]=eef10fb8-f3df-4c67-97c5-e18179723222"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Porting Order id
Successful response
Show child attributes
Uniquely identifies this porting order
"f1486bae-f067-460c-ad43-73a92848f902"
A customer-specified reference number for customer bookkeeping purposes
"Acct 123abc"
A customer-specified group reference for customer bookkeeping purposes
"Group-456"
ISO 8601 formatted date indicating when the resource was created.
"2021-03-19T10:07:15.527Z"
ISO 8601 formatted date indicating when the resource was created.
"2021-03-19T10:07:15.527Z"
Porting order status
Show child attributes
A list of 0 or more details about this porting order's status
Show child attributes
Identifier of an exception type
ACCOUNT_NUMBER_MISMATCH, AUTH_PERSON_MISMATCH, BTN_ATN_MISMATCH, ENTITY_NAME_MISMATCH, FOC_EXPIRED, FOC_REJECTED, LOCATION_MISMATCH, LSR_PENDING, MAIN_BTN_PORTING, OSP_IRRESPONSIVE, OTHER, PASSCODE_PIN_INVALID, PHONE_NUMBER_HAS_SPECIAL_FEATURE, PHONE_NUMBER_MISMATCH, PHONE_NUMBER_NOT_PORTABLE, PORT_TYPE_INCORRECT, PORTING_ORDER_SPLIT_REQUIRED, POSTAL_CODE_MISMATCH, RATE_CENTER_NOT_PORTABLE, SV_CONFLICT, SV_UNKNOWN_FAILURE "ENTITY_NAME_MISMATCH"
Description of an exception type
"Entity name does not match that on the CSR"
The current status of the porting order
draft, in-process, submitted, exception, foc-date-confirmed, ported, cancelled, cancel-pending "ported"
A key to reference this porting order when contacting Telnyx customer support. This information is not available in draft porting orders.
"sr_123abc"
A key to reference for the porting order group when contacting Telnyx customer support. This information is not available for porting orders in draft state
"pr_123abc"
Count of phone numbers associated with this porting order
1
Identifies the old service provider
"Unreal Communications"
Can be specified directly or via the requirement_group_id parameter.
Show child attributes
Show child attributes
A port can be either 'full' or 'partial'. When type is 'full' the other attributes should be omitted.
full, partial "full"
Remaining numbers can be either kept with their current service provider or disconnected. 'new_billing_telephone_number' is required when 'remaining_numbers_action' is 'keep'.
keep, disconnect "disconnect"
New billing phone number for the remaining numbers. Used in case the current billing phone number is being ported to Telnyx. This will be set on your account with your current service provider and should be one of the numbers remaining on that account.
Show child attributes
Show child attributes
Person Name or Company name requesting the port
"Porter McPortersen"
Name of person authorizing the porting order
"Porter McPortersen II"
Billing phone number associated with these phone numbers
13035551234
The authorized person's account number with the current service provider
"123abc"
European tax identification number. Applicable only in the European Union
"1234abcd"
PIN/passcode possibly required by the old service provider for extra verification
1234
European business identification number. Applicable only in the European Union
"abc123"
Show child attributes
First line of billing address
"600 Congress Avenue"
Second line of billing address
"14th Floor"
City or municipality of billing address
"Austin"
State, province, or similar of billing address
"TX"
Postal Code of billing address
"78701"
ISO3166-1 alpha-2 country code of billing address
"US"
Show child attributes
ISO 8601 formatted Date/Time requested for the FOC date
"2021-03-19T10:07:15.527Z"
ISO 8601 formatted Date/Time of the FOC date
"2021-03-19T10:07:15.527Z"
Indicates whether this porting order is eligible for FastPort
true
Activation status
New, Pending, Conflict, Cancel Pending, Failed, Concurred, Activate RDY, Disconnect Pending, Concurrence Sent, Old, Sending, Active, Cancelled "Active"
Show child attributes
identifies the billing group to set on the numbers when ported
"f1486bae-f067-460c-ad43-73a92848f902"
identifies the connection to set on the numbers when ported
"f1486bae-f067-460c-ad43-73a92848f902"
identifies the messaging profile to set on the numbers when ported
"f1486bae-f067-460c-ad43-73a92848f901"
identifies the emergency address to set on the numbers when ported
"f1486bae-f067-460c-ad43-73a92848f902"
Tag to set on the numbers when ported
["abc", "123"]The type of the phone number
landline, local, mobile, national, shared_cost, toll_free "local"
A description of the porting order
"FP Telnyx"
List of documentation requirements for porting numbers. Can be set directly or via the requirement_group_id parameter.
Show child attributes
Type of value expected on field_value field
document "document"
identifies the document that satisfies this requirement
"9787fb5f-cbe5-4de4-b765-3303774ee9fe"
Identifies the requirement type that meets this requirement
"59b0762a-b274-4f76-ac32-4d5cf0272e66"
Identifies the type of the resource.
"porting_requirement"
Is true when the required documentation is met
false
Show child attributes
Identifies the user (or organization) who requested the porting order
"40d68ba2-0847-4df2-be9c-b0e0cb673e75"
"https://example.com/porting_webhooks"
Identifies the type of the resource.
"porting_order"
Information about messaging porting process.
Show child attributes
Indicates whether the porting order can also port messaging capabilities.
true
Indicates whether Telnyx will port messaging capabilities from the losing carrier. If false, any messaging capabilities will stay with their current provider.
true
The current status of the messaging porting.
not_applicable, pending, activating, exception, canceled, partial_port_complete, ported "pending"
Indicates whether the messaging porting has been completed.
false
For specific porting orders, we may require additional steps to be taken before submitting the porting order.
associated_phone_numbers, phone_number_verification_codes Was this page helpful?