Fulfill an action requirement for a sub number order
Submits the end user’s details to the external verification provider and returns the requirement action. Australia mobile ID verification is currently the only action requirement. It generates a unique Onfido verification link, returned in requirement_action.value, which you share with the end user. The end user’s first_name and last_name must be nested inside a requirement object; sending them at the top level is rejected.
POST
/
external_requirements
/
{regulatory_requirement_id}
/
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 response = await client.externalRequirements.subNumberOrders.update('regulatory_requirement_id', 'sub_number_order_id', {
requirement: {},
});
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.external_requirements.sub_number_orders.update(
regulatory_requirement_id="regulatory_requirement_id",
sub_number_order_id="sub_number_order_id",
requirement={},
)
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"),
)
subNumberOrder, err := client.ExternalRequirements.SubNumberOrders.Update(
context.TODO(),
"regulatory_requirement_id",
"sub_number_order_id",
telnyx.ExternalRequirementSubNumberOrderUpdateParams{
Requirement: "requirement",
},
)
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.externalRequirements.subNumberOrders.SubNumberOrderUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SubNumberOrderUpdateParams params = SubNumberOrderUpdateParams.builder()
.requirement(null)
.build();
var response = client.externalRequirements().subNumberOrders().update("regulatory_requirement_id", "sub_number_order_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.external_requirements.sub_number_orders.update("regulatory_requirement_id", "sub_number_order_id", requirement: {})
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->externalRequirements->subNumberOrders->update(
'regulatory_requirement_id',
'sub_number_order_id',
requirement: [],
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx external-requirements:sub-number-orders update \
--api-key 'My API Key' \
--regulatory-requirement-id regulatory_requirement_id \
--sub-number-order-id sub_number_order_id \
--requirement '{}'curl --request POST \
--url https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requirement": {
"first_name": "Jane",
"last_name": "Doe"
}
}
'{
"data": {
"sub_order_id": "5f8e6b1a-2d3c-4e5f-9a0b-1c2d3e4f5a6b",
"regulatory_requirement_id": "a5b8f1d2-3c4e-4f6a-8b9c-0d1e2f3a4b5c",
"requirement_action": {
"type": "id_verification",
"value": "https://verify.onfido.com/v/8f3c2a1b-9d4e-4f6a-8b9c-0d1e2f3a4b5c"
}
}
}{
"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
Path Parameters
Body
application/json
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.externalRequirements.subNumberOrders.update('regulatory_requirement_id', 'sub_number_order_id', {
requirement: {},
});
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.external_requirements.sub_number_orders.update(
regulatory_requirement_id="regulatory_requirement_id",
sub_number_order_id="sub_number_order_id",
requirement={},
)
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"),
)
subNumberOrder, err := client.ExternalRequirements.SubNumberOrders.Update(
context.TODO(),
"regulatory_requirement_id",
"sub_number_order_id",
telnyx.ExternalRequirementSubNumberOrderUpdateParams{
Requirement: "requirement",
},
)
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.externalRequirements.subNumberOrders.SubNumberOrderUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
SubNumberOrderUpdateParams params = SubNumberOrderUpdateParams.builder()
.requirement(null)
.build();
var response = client.externalRequirements().subNumberOrders().update("regulatory_requirement_id", "sub_number_order_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.external_requirements.sub_number_orders.update("regulatory_requirement_id", "sub_number_order_id", requirement: {})
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->externalRequirements->subNumberOrders->update(
'regulatory_requirement_id',
'sub_number_order_id',
requirement: [],
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx external-requirements:sub-number-orders update \
--api-key 'My API Key' \
--regulatory-requirement-id regulatory_requirement_id \
--sub-number-order-id sub_number_order_id \
--requirement '{}'curl --request POST \
--url https://api.telnyx.com/v2/external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requirement": {
"first_name": "Jane",
"last_name": "Doe"
}
}
'{
"data": {
"sub_order_id": "5f8e6b1a-2d3c-4e5f-9a0b-1c2d3e4f5a6b",
"regulatory_requirement_id": "a5b8f1d2-3c4e-4f6a-8b9c-0d1e2f3a4b5c",
"requirement_action": {
"type": "id_verification",
"value": "https://verify.onfido.com/v/8f3c2a1b-9d4e-4f6a-8b9c-0d1e2f3a4b5c"
}
}
}{
"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"
}
}
]
}