Initiate an action requirement
Initiates a specific action requirement for a porting order.
POST
/
porting_orders
/
{porting_order_id}
/
action_requirements
/
{id}
/
initiate
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.portingOrders.actionRequirements.initiate('id', {
porting_order_id: 'porting_order_id',
params: { first_name: 'John', last_name: 'Doe' },
});
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.porting_orders.action_requirements.initiate(
id="id",
porting_order_id="porting_order_id",
params={
"first_name": "John",
"last_name": "Doe",
},
)
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.PortingOrders.ActionRequirements.Initiate(
context.TODO(),
"id",
telnyx.PortingOrderActionRequirementInitiateParams{
PortingOrderID: "porting_order_id",
Params: telnyx.PortingOrderActionRequirementInitiateParamsParams{
FirstName: "John",
LastName: "Doe",
},
},
)
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.portingorders.actionrequirements.ActionRequirementInitiateParams;
import com.telnyx.sdk.models.portingorders.actionrequirements.ActionRequirementInitiateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionRequirementInitiateParams params = ActionRequirementInitiateParams.builder()
.portingOrderId("porting_order_id")
.id("id")
.params(ActionRequirementInitiateParams.Params.builder()
.firstName("John")
.lastName("Doe")
.build())
.build();
ActionRequirementInitiateResponse response = client.portingOrders().actionRequirements().initiate(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.porting_orders.action_requirements.initiate(
"id",
porting_order_id: "porting_order_id",
params: {first_name: "John", last_name: "Doe"}
)
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->portingOrders->actionRequirements->initiate(
'id',
portingOrderID: 'porting_order_id',
params: ['firstName' => 'John', 'lastName' => 'Doe'],
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx porting-orders:action-requirements initiate \
--api-key 'My API Key' \
--porting-order-id porting_order_id \
--id id \
--params '{first_name: John, last_name: Doe}'curl --request POST \
--url https://api.telnyx.com/v2/porting_orders/{porting_order_id}/action_requirements/{id}/initiate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"params": {
"first_name": "John",
"last_name": "Doe"
}
}
'{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "porting_action_requirement",
"porting_order_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"requirement_type_id": "53970723-fbff-4f46-a975-f62be6c1a585",
"action_type": "document_upload",
"action_url": "https://example.com/action",
"status": "created",
"cancel_reason": null,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the porting order
The ID of the action requirement
Body
application/json
Parameters for initiating the action requirement
Required information for initiating the action requirement for AU ID verification.
Show child attributes
Show child attributes
Response
Successful response
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 response = await client.portingOrders.actionRequirements.initiate('id', {
porting_order_id: 'porting_order_id',
params: { first_name: 'John', last_name: 'Doe' },
});
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.porting_orders.action_requirements.initiate(
id="id",
porting_order_id="porting_order_id",
params={
"first_name": "John",
"last_name": "Doe",
},
)
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.PortingOrders.ActionRequirements.Initiate(
context.TODO(),
"id",
telnyx.PortingOrderActionRequirementInitiateParams{
PortingOrderID: "porting_order_id",
Params: telnyx.PortingOrderActionRequirementInitiateParamsParams{
FirstName: "John",
LastName: "Doe",
},
},
)
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.portingorders.actionrequirements.ActionRequirementInitiateParams;
import com.telnyx.sdk.models.portingorders.actionrequirements.ActionRequirementInitiateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionRequirementInitiateParams params = ActionRequirementInitiateParams.builder()
.portingOrderId("porting_order_id")
.id("id")
.params(ActionRequirementInitiateParams.Params.builder()
.firstName("John")
.lastName("Doe")
.build())
.build();
ActionRequirementInitiateResponse response = client.portingOrders().actionRequirements().initiate(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.porting_orders.action_requirements.initiate(
"id",
porting_order_id: "porting_order_id",
params: {first_name: "John", last_name: "Doe"}
)
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->portingOrders->actionRequirements->initiate(
'id',
portingOrderID: 'porting_order_id',
params: ['firstName' => 'John', 'lastName' => 'Doe'],
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx porting-orders:action-requirements initiate \
--api-key 'My API Key' \
--porting-order-id porting_order_id \
--id id \
--params '{first_name: John, last_name: Doe}'curl --request POST \
--url https://api.telnyx.com/v2/porting_orders/{porting_order_id}/action_requirements/{id}/initiate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"params": {
"first_name": "John",
"last_name": "Doe"
}
}
'{
"data": {
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "porting_action_requirement",
"porting_order_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"requirement_type_id": "53970723-fbff-4f46-a975-f62be6c1a585",
"action_type": "document_upload",
"action_url": "https://example.com/action",
"status": "created",
"cancel_reason": null,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}