Skip to main content
PATCH
/
advanced_orders
/
{advanced-order-id}
/
requirement_group
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.advancedOrders.updateRequirementGroup(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
);

console.log(response.id);
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.advanced_orders.update_requirement_group(
advanced_order_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.id)
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.AdvancedOrders.UpdateRequirementGroup(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AdvancedOrderUpdateRequirementGroupParams{
AdvancedOrder: telnyx.AdvancedOrderParam{},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ID)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.advancedorders.AdvancedOrder;
import com.telnyx.sdk.models.advancedorders.AdvancedOrderUpdateRequirementGroupParams;
import com.telnyx.sdk.models.advancedorders.AdvancedOrderUpdateRequirementGroupResponse;

public final class Main {
private Main() {}

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

AdvancedOrderUpdateRequirementGroupParams params = AdvancedOrderUpdateRequirementGroupParams.builder()
.advancedOrderId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.advancedOrder(AdvancedOrder.builder().build())
.build();
AdvancedOrderUpdateRequirementGroupResponse response = client.advancedOrders().updateRequirementGroup(params);
}
}
require "telnyx"

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

response = telnyx.advanced_orders.update_requirement_group("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->advancedOrders->updateRequirementGroup(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
areaCode: 'xxx',
comments: 'comments',
countryCode: 'xx',
customerReference: 'customer_reference',
features: ['sms'],
phoneNumberType: 'local',
quantity: 1,
requirementGroupID: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
);

var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx advanced-orders update-requirement-group \
--api-key 'My API Key' \
--advanced-order-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
curl --request PATCH \
--url https://api.telnyx.com/v2/advanced_orders/{advanced-order-id}/requirement_group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country_code": "US",
"comments": "",
"quantity": 1,
"area_code": "",
"phone_number_type": "local",
"features": [],
"customer_reference": "",
"requirement_group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
'
{
  "country_code": "US",
  "comments": "",
  "quantity": 1,
  "area_code": "",
  "phone_number_type": "",
  "features": [],
  "customer_reference": "",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": [],
  "orders": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "requirement_group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
{
"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

advanced-order-id
string<uuid>
required

Unique identifier of the advanced order.

Body

application/json
country_code
string
default:US
Required string length: 2
comments
string
default:""
Maximum string length: 255
quantity
integer
default:1
Required range: 1 <= x <= 10000
area_code
string
default:""
Maximum string length: 3
phone_number_type
enum<string>
default:local
Available options:
local,
mobile,
toll_free,
shared_cost,
national,
landline
features
enum<string>[]
Available options:
sms,
mms,
voice,
fax,
emergency
customer_reference
string
default:""
requirement_group_id
string<uuid>

The ID of the requirement group to associate with this advanced order

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Response

An Advanced Order Response

country_code
string
default:US
Required string length: 2
comments
string
default:""
Maximum string length: 255
quantity
integer
default:1
Required range: 1 <= x <= 10000
area_code
string
default:""
Maximum string length: 3
phone_number_type
enum<string>[]
Available options:
local,
mobile,
toll_free,
shared_cost,
national,
landline
features
enum<string>[]
Available options:
sms,
mms,
voice,
fax,
emergency
customer_reference
string
default:""
id
string<uuid>
status
enum<string>[]
Available options:
pending,
processing,
ordered
orders
string<uuid>[]
requirement_group_id
string<uuid>

The ID of the requirement group associated with this advanced order

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"