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

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

const response = await client.portingOrders.actions.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(response.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
)
response = client.porting_orders.actions.cancel(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.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"),
)
response, err := client.PortingOrders.Actions.Cancel(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.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.actions.ActionCancelParams;
import com.telnyx.sdk.models.portingorders.actions.ActionCancelResponse;

public final class Main {
private Main() {}

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

ActionCancelResponse response = client.portingOrders().actions().cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
}
}
require "telnyx"

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

response = telnyx.porting_orders.actions.cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(response)
<?php

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

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

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

try {
$response = $client->portingOrders->actions->cancel(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'
);

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx porting-orders:actions cancel \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
curl --request POST \
--url https://api.telnyx.com/v2/porting_orders/{id}/actions/cancel \
--header 'Authorization: Bearer <token>'
{
  "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"
  }
}

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

Response

Successful response

data
object
meta
object