Update a sub number order's requirements
Updates a sub number order.
PATCH
/
sub_number_orders
/
{sub_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 subNumberOrder = await client.subNumberOrders.update('sub_number_order_id');
console.log(subNumberOrder.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
)
sub_number_order = client.sub_number_orders.update(
sub_number_order_id="sub_number_order_id",
)
print(sub_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"),
)
subNumberOrder, err := client.SubNumberOrders.Update(
context.TODO(),
"sub_number_order_id",
telnyx.SubNumberOrderUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", subNumberOrder.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateParams;
import com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SubNumberOrderUpdateResponse subNumberOrder = client.subNumberOrders().update("sub_number_order_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
sub_number_order = telnyx.sub_number_orders.update("sub_number_order_id")
puts(sub_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 {
$subNumberOrder = $client->subNumberOrders->update(
'sub_number_order_id',
regulatoryRequirements: [
[
'fieldValue' => '45f45a04-b4be-4592-95b1-9306b9db2b21',
'requirementID' => '8ffb3622-7c6b-4ccc-b65f-7a3dc0099576',
],
],
);
var_dump($subNumberOrder);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx sub-number-orders update \
--api-key 'My API Key' \
--sub-number-order-id sub_number_order_idcurl --request PATCH \
--url https://api.telnyx.com/v2/sub_number_orders/{sub_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"
}
]
}
'{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"order_request_id": "12ade33a-21c0-473b-b055-b3c836e1c293",
"country_code": "US",
"phone_number_type": "local",
"user_id": "d70873cd-7c98-401a-81b6-b1ae08246995",
"regulatory_requirements": [
{
"record_type": "phone_number_regulatory_requirement",
"requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"field_type": "address"
}
],
"record_type": "sub_number_order",
"phone_numbers_count": 1,
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"requirements_met": true,
"customer_reference": "MY REF 001",
"is_block_sub_number_order": false
}
}{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The sub number order ID.
Body
application/json
Show child attributes
Show child attributes
Response
Successful response with details about a sub number order.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const subNumberOrder = await client.subNumberOrders.update('sub_number_order_id');
console.log(subNumberOrder.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
)
sub_number_order = client.sub_number_orders.update(
sub_number_order_id="sub_number_order_id",
)
print(sub_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"),
)
subNumberOrder, err := client.SubNumberOrders.Update(
context.TODO(),
"sub_number_order_id",
telnyx.SubNumberOrderUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", subNumberOrder.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateParams;
import com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SubNumberOrderUpdateResponse subNumberOrder = client.subNumberOrders().update("sub_number_order_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
sub_number_order = telnyx.sub_number_orders.update("sub_number_order_id")
puts(sub_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 {
$subNumberOrder = $client->subNumberOrders->update(
'sub_number_order_id',
regulatoryRequirements: [
[
'fieldValue' => '45f45a04-b4be-4592-95b1-9306b9db2b21',
'requirementID' => '8ffb3622-7c6b-4ccc-b65f-7a3dc0099576',
],
],
);
var_dump($subNumberOrder);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx sub-number-orders update \
--api-key 'My API Key' \
--sub-number-order-id sub_number_order_idcurl --request PATCH \
--url https://api.telnyx.com/v2/sub_number_orders/{sub_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"
}
]
}
'{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"order_request_id": "12ade33a-21c0-473b-b055-b3c836e1c293",
"country_code": "US",
"phone_number_type": "local",
"user_id": "d70873cd-7c98-401a-81b6-b1ae08246995",
"regulatory_requirements": [
{
"record_type": "phone_number_regulatory_requirement",
"requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
"field_type": "address"
}
],
"record_type": "sub_number_order",
"phone_numbers_count": 1,
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"requirements_met": true,
"customer_reference": "MY REF 001",
"is_block_sub_number_order": false
}
}{
"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"
}
}
]
}