Update requirement group for a sub number order
Associates an existing requirement group with the specified sub number order. The response contains the updated sub number order requirement-group relationship.
POST
/
sub_number_orders
/
{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.subNumberOrders.updateRequirementGroup(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ requirement_group_id: 'a4b201f9-8646-4e54-a7d2-b2e403eeaf8c' },
);
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.sub_number_orders.update_requirement_group(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
requirement_group_id="a4b201f9-8646-4e54-a7d2-b2e403eeaf8c",
)
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.SubNumberOrders.UpdateRequirementGroup(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.SubNumberOrderUpdateRequirementGroupParams{
RequirementGroupID: "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c",
},
)
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.subnumberorders.SubNumberOrderUpdateRequirementGroupParams;
import com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateRequirementGroupResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SubNumberOrderUpdateRequirementGroupParams params = SubNumberOrderUpdateRequirementGroupParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.requirementGroupId("a4b201f9-8646-4e54-a7d2-b2e403eeaf8c")
.build();
SubNumberOrderUpdateRequirementGroupResponse response = client.subNumberOrders().updateRequirementGroup(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.sub_number_orders.update_requirement_group(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
requirement_group_id: "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c"
)
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->subNumberOrders->updateRequirementGroup(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
requirementGroupID: 'a4b201f9-8646-4e54-a7d2-b2e403eeaf8c',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx sub-number-orders update-requirement-group \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--requirement-group-id a4b201f9-8646-4e54-a7d2-b2e403eeaf8ccurl --request POST \
--url https://api.telnyx.com/v2/sub_number_orders/{id}/requirement_group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requirement_group_id": "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c"
}
'{
"data": {
"country_code": "AT",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"regulatory_requirements": [
{
"record_type": "phone_number_regulatory_requirement",
"requirement_id": "2708e569-696a-4fc7-9305-5fdb3eb9c7dd",
"field_type": "textual"
}
],
"phone_numbers_count": 1,
"phone_numbers": [
{
"country_code": "AT",
"regulatory_requirements": [
{
"field_value": "4804570924",
"requirement_id": "2708e569-696a-4fc7-9305-5fdb3eb9c7dd",
"field_type": "textual",
"status": "pending-approval"
}
],
"bundle_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"requirements_status": "requirement-info-under-review",
"phone_number_type": "toll_free",
"requirements_met": false,
"record_type": "number_order_phone_number",
"status": "pending",
"id": "613d517a-0432-4bae-a785-c11033bd0985",
"phone_number": "+43800300238"
}
],
"is_block_sub_number_order": false,
"phone_number_type": "toll_free",
"requirements_met": false,
"id": "f826ed66-b27c-4340-9dc0-57dc3459f1bd",
"order_request_id": "a11d58fe-88a4-494a-b752-8dea411993c6",
"status": "pending",
"customer_reference": "missing",
"record_type": "sub_number_order"
}
}{
"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 ID of the sub number order
Body
application/json
The ID of the requirement group to associate
Response
Sub number order requirement group updated successfully
Show child attributes
Show child attributes
Was this page helpful?
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.subNumberOrders.updateRequirementGroup(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
{ requirement_group_id: 'a4b201f9-8646-4e54-a7d2-b2e403eeaf8c' },
);
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.sub_number_orders.update_requirement_group(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
requirement_group_id="a4b201f9-8646-4e54-a7d2-b2e403eeaf8c",
)
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.SubNumberOrders.UpdateRequirementGroup(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.SubNumberOrderUpdateRequirementGroupParams{
RequirementGroupID: "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c",
},
)
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.subnumberorders.SubNumberOrderUpdateRequirementGroupParams;
import com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateRequirementGroupResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SubNumberOrderUpdateRequirementGroupParams params = SubNumberOrderUpdateRequirementGroupParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.requirementGroupId("a4b201f9-8646-4e54-a7d2-b2e403eeaf8c")
.build();
SubNumberOrderUpdateRequirementGroupResponse response = client.subNumberOrders().updateRequirementGroup(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.sub_number_orders.update_requirement_group(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
requirement_group_id: "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c"
)
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->subNumberOrders->updateRequirementGroup(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
requirementGroupID: 'a4b201f9-8646-4e54-a7d2-b2e403eeaf8c',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx sub-number-orders update-requirement-group \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--requirement-group-id a4b201f9-8646-4e54-a7d2-b2e403eeaf8ccurl --request POST \
--url https://api.telnyx.com/v2/sub_number_orders/{id}/requirement_group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requirement_group_id": "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c"
}
'{
"data": {
"country_code": "AT",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"regulatory_requirements": [
{
"record_type": "phone_number_regulatory_requirement",
"requirement_id": "2708e569-696a-4fc7-9305-5fdb3eb9c7dd",
"field_type": "textual"
}
],
"phone_numbers_count": 1,
"phone_numbers": [
{
"country_code": "AT",
"regulatory_requirements": [
{
"field_value": "4804570924",
"requirement_id": "2708e569-696a-4fc7-9305-5fdb3eb9c7dd",
"field_type": "textual",
"status": "pending-approval"
}
],
"bundle_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"requirements_status": "requirement-info-under-review",
"phone_number_type": "toll_free",
"requirements_met": false,
"record_type": "number_order_phone_number",
"status": "pending",
"id": "613d517a-0432-4bae-a785-c11033bd0985",
"phone_number": "+43800300238"
}
],
"is_block_sub_number_order": false,
"phone_number_type": "toll_free",
"requirements_met": false,
"id": "f826ed66-b27c-4340-9dc0-57dc3459f1bd",
"order_request_id": "a11d58fe-88a4-494a-b752-8dea411993c6",
"status": "pending",
"customer_reference": "missing",
"record_type": "sub_number_order"
}
}{
"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"
}
}
]
}