Retrieve a requirement types
Retrieve a requirement type by id
GET
/
requirement_types
/
{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 requirementType = await client.requirementTypes.retrieve(
'a38c217a-8019-48f8-bff6-0fdd9939075b',
);
console.log(requirementType.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
)
requirement_type = client.requirement_types.retrieve(
"a38c217a-8019-48f8-bff6-0fdd9939075b",
)
print(requirement_type.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"),
)
requirementType, err := client.RequirementTypes.Get(context.TODO(), "a38c217a-8019-48f8-bff6-0fdd9939075b")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementType.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeRetrieveParams;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RequirementTypeRetrieveResponse requirementType = client.requirementTypes().retrieve("a38c217a-8019-48f8-bff6-0fdd9939075b");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
requirement_type = telnyx.requirement_types.retrieve("a38c217a-8019-48f8-bff6-0fdd9939075b")
puts(requirement_type)<?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 {
$requirementType = $client->requirementTypes->retrieve(
'a38c217a-8019-48f8-bff6-0fdd9939075b'
);
var_dump($requirementType);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx requirement-types retrieve \
--api-key 'My API Key' \
--id a38c217a-8019-48f8-bff6-0fdd9939075bcurl --request GET \
--url https://api.telnyx.com/v2/requirement_types/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"acceptance_criteria": {
"time_limit": "Current and not expired",
"locality_limit": "Issued by the same country that the phone number belongs to",
"acceptable_values": [
"US"
],
"max_length": 20,
"min_length": 16,
"acceptable_characters": "abcdef0123456789"
},
"description": "Proves the customer has a physical address in the same locality as the phone number",
"example": "Utility bill, internet bill, phone bill, or lease",
"type": "document",
"name": "Proof of Address",
"record_type": "requirement_type",
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"created_at": "2021-04-09T22:25:27.521Z",
"updated_at": "2021-04-12T20:20:20.020Z"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}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 requirementType = await client.requirementTypes.retrieve(
'a38c217a-8019-48f8-bff6-0fdd9939075b',
);
console.log(requirementType.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
)
requirement_type = client.requirement_types.retrieve(
"a38c217a-8019-48f8-bff6-0fdd9939075b",
)
print(requirement_type.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"),
)
requirementType, err := client.RequirementTypes.Get(context.TODO(), "a38c217a-8019-48f8-bff6-0fdd9939075b")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementType.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeRetrieveParams;
import com.telnyx.sdk.models.requirementtypes.RequirementTypeRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RequirementTypeRetrieveResponse requirementType = client.requirementTypes().retrieve("a38c217a-8019-48f8-bff6-0fdd9939075b");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
requirement_type = telnyx.requirement_types.retrieve("a38c217a-8019-48f8-bff6-0fdd9939075b")
puts(requirement_type)<?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 {
$requirementType = $client->requirementTypes->retrieve(
'a38c217a-8019-48f8-bff6-0fdd9939075b'
);
var_dump($requirementType);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx requirement-types retrieve \
--api-key 'My API Key' \
--id a38c217a-8019-48f8-bff6-0fdd9939075bcurl --request GET \
--url https://api.telnyx.com/v2/requirement_types/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"acceptance_criteria": {
"time_limit": "Current and not expired",
"locality_limit": "Issued by the same country that the phone number belongs to",
"acceptable_values": [
"US"
],
"max_length": 20,
"min_length": 16,
"acceptable_characters": "abcdef0123456789"
},
"description": "Proves the customer has a physical address in the same locality as the phone number",
"example": "Utility bill, internet bill, phone bill, or lease",
"type": "document",
"name": "Proof of Address",
"record_type": "requirement_type",
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"created_at": "2021-04-09T22:25:27.521Z",
"updated_at": "2021-04-12T20:20:20.020Z"
}
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
},
"meta": {}
}
]
}