Skip to main content
PATCH
/
porting_orders
/
{id}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const portingOrder = await client.portingOrders.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(portingOrder.data);
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
porting_order = client.porting_orders.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(porting_order.data)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
portingOrder, err := client.PortingOrders.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.PortingOrderUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", portingOrder.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.portingorders.PortingOrderUpdateParams;
import com.telnyx.sdk.models.portingorders.PortingOrderUpdateResponse;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

PortingOrderUpdateResponse portingOrder = client.portingOrders().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

porting_order = telnyx.porting_orders.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(porting_order)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
use Telnyx\PortingOrders\PortingOrderType;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$portingOrder = $client->portingOrders->update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
activationSettings: [
'focDatetimeRequested' => new \DateTimeImmutable(
'2021-03-19T10:07:15.527Z'
),
],
customerGroupReference: 'customer_group_reference',
customerReference: 'customer_reference',
documents: [
'invoice' => 'ce74b771-d23d-4960-81ec-8741b3862146',
'loa' => '64ffb720-04c7-455b-92d6-20fcca92e935',
],
endUser: [
'admin' => [
'accountNumber' => '123abc',
'authPersonName' => 'Porter McPortersen II',
'billingPhoneNumber' => '13035551234',
'businessIdentifier' => 'abc123',
'entityName' => 'Porter McPortersen',
'pinPasscode' => '1234',
'taxIdentifier' => '1234abcd',
],
'location' => [
'administrativeArea' => 'TX',
'countryCode' => 'US',
'extendedAddress' => '14th Floor',
'locality' => 'Austin',
'postalCode' => '78701',
'streetAddress' => '600 Congress Avenue',
],
],
messaging: ['enableMessaging' => true],
misc: [
'newBillingPhoneNumber' => 'new_billing_phone_number',
'remainingNumbersAction' => 'disconnect',
'type' => PortingOrderType::FULL,
],
phoneNumberConfiguration: [
'billingGroupID' => 'f1486bae-f067-460c-ad43-73a92848f902',
'connectionID' => 'f1486bae-f067-460c-ad43-73a92848f902',
'emergencyAddressID' => 'f1486bae-f067-460c-ad43-73a92848f902',
'messagingProfileID' => 'f1486bae-f067-460c-ad43-73a92848f901',
'tags' => ['abc', '123'],
],
requirementGroupID: 'DE748D99-06FA-4D90-9F9A-F4B62696BADA',
requirements: [
[
'fieldValue' => '9787fb5f-cbe5-4de4-b765-3303774ee9fe',
'requirementTypeID' => '59b0762a-b274-4f76-ac32-4d5cf0272e66',
],
],
userFeedback: [
'userComment' => 'I loved my experience porting numbers with Telnyx',
'userRating' => 5,
],
webhookURL: 'https://example.com',
);

var_dump($portingOrder);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx porting-orders update \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
curl --request PATCH \
--url https://api.telnyx.com/v2/porting_orders/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"misc": {
"type": "full",
"remaining_numbers_action": "disconnect",
"new_billing_phone_number": "<string>"
},
"end_user": {
"admin": {
"entity_name": "Porter McPortersen",
"auth_person_name": "Porter McPortersen II",
"billing_phone_number": "13035551234",
"account_number": "123abc",
"tax_identifier": "1234abcd",
"pin_passcode": "1234",
"business_identifier": "abc123"
},
"location": {
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"postal_code": "78701",
"country_code": "US"
}
},
"documents": {
"loa": "64ffb720-04c7-455b-92d6-20fcca92e935",
"invoice": "ce74b771-d23d-4960-81ec-8741b3862146"
},
"activation_settings": {
"foc_datetime_requested": "2021-03-19T10:07:15.527Z"
},
"phone_number_configuration": {
"billing_group_id": "f1486bae-f067-460c-ad43-73a92848f902",
"connection_id": "f1486bae-f067-460c-ad43-73a92848f902",
"messaging_profile_id": "f1486bae-f067-460c-ad43-73a92848f901",
"emergency_address_id": "f1486bae-f067-460c-ad43-73a92848f902",
"tags": [
"abc",
"123"
]
},
"requirement_group_id": "DE748D99-06FA-4D90-9F9A-F4B62696BADA",
"requirements": [
{
"field_value": "9787fb5f-cbe5-4de4-b765-3303774ee9fe",
"requirement_type_id": "59b0762a-b274-4f76-ac32-4d5cf0272e66"
}
],
"user_feedback": {
"user_rating": 5,
"user_comment": "I loved my experience porting numbers with Telnyx"
},
"webhook_url": "<string>",
"customer_reference": "<string>",
"customer_group_reference": "<string>",
"messaging": {
"enable_messaging": true
}
}
'
{
  "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": null,
      "invoice": null
    },
    "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": null,
    "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": false,
    "status": {
      "details": [],
      "value": "draft"
    },
    "support_key": null,
    "updated_at": "2022-03-24T14:26:53Z",
    "user_feedback": {
      "user_comment": null,
      "user_rating": null
    },
    "messaging": {
      "messaging_capable": true,
      "enable_messaging": true,
      "messaging_port_status": "pending",
      "messaging_port_completed": false
    },
    "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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Porting Order id

Body

application/json
misc
object | null
end_user
object
documents
object

Can be specified directly or via the requirement_group_id parameter.

activation_settings
object
phone_number_configuration
object
requirement_group_id
string<uuid>

If present, we will read the current values from the specified Requirement Group into the Documents and Requirements for this Porting Order. Note that any future changes in the Requirement Group would have no impact on this Porting Order. We will return an error if a specified Requirement Group conflicts with documents or requirements in the same request.

Example:

"DE748D99-06FA-4D90-9F9A-F4B62696BADA"

requirements
object[]

List of requirements for porting numbers.

user_feedback
object
webhook_url
string<uri>
customer_reference
string
customer_group_reference
string
messaging
object

Response

Successful response

data
object
meta
object