Skip to main content
PATCH
/
number_orders
/
{number_order_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 numberOrder = await client.numberOrders.update('number_order_id');

console.log(numberOrder.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
)
number_order = client.number_orders.update(
number_order_id="number_order_id",
)
print(number_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"),
)
numberOrder, err := client.NumberOrders.Update(
context.TODO(),
"number_order_id",
telnyx.NumberOrderUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", numberOrder.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.numberorders.NumberOrderUpdateParams;
import com.telnyx.sdk.models.numberorders.NumberOrderUpdateResponse;

public final class Main {
private Main() {}

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

NumberOrderUpdateResponse numberOrder = client.numberOrders().update("number_order_id");
}
}
require "telnyx"

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

number_order = telnyx.number_orders.update("number_order_id")

puts(number_order)
<?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 {
$numberOrder = $client->numberOrders->update(
'number_order_id',
customerReference: 'MY REF 001',
regulatoryRequirements: [
[
'fieldValue' => '45f45a04-b4be-4592-95b1-9306b9db2b21',
'requirementID' => '8ffb3622-7c6b-4ccc-b65f-7a3dc0099576',
],
],
);

var_dump($numberOrder);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx number-orders update \
--api-key 'My API Key' \
--number-order-id number_order_id
curl --request PATCH \
--url https://api.telnyx.com/v2/number_orders/{number_order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"regulatory_requirements": [
{
"requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21"
}
],
"customer_reference": "MY REF 001"
}
'
{
  "data": {
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "record_type": "number_order",
    "phone_numbers_count": 1,
    "connection_id": "346789098765567",
    "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
    "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
    "phone_numbers": [
      {
        "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
        "record_type": "number_order_phone_number",
        "phone_number": "+19705555098",
        "bundle_id": "bc8e4d67-33a0-4cbb-af74-7b58f05bd474",
        "regulatory_requirements": [
          {
            "record_type": "phone_number_regulatory_requirement",
            "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
            "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
            "field_type": "address"
          }
        ],
        "requirements_met": true,
        "status": "success"
      }
    ],
    "sub_number_orders_ids": [
      "<string>"
    ],
    "customer_reference": "MY REF 001",
    "created_at": "2018-01-01T00:00:00.000000Z",
    "updated_at": "2018-01-01T00:00:00.000000Z",
    "requirements_met": true
  }
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}
{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not understand the provided credentials.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "<string>"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

number_order_id
string
required

The number order ID.

Body

application/json
regulatory_requirements
object[]
customer_reference
string

A customer reference string for customer look ups.

Example:

"MY REF 001"

Response

Successful response with details about a number order.

data
NumberOrder · object