Order Telephone Number

CreateTNOrder

POST https://api.opentact.org/rest/order/tn

Headers

Name
Type
Description

Authorization

string

JWT_TOKEN

Content-Type

string

application/json

Request Body

Name
Type
Description

autorenew

boolean

Default: "true"

voice

string

Default:"true" Voice feature

fax

string

Fax feature

sms

boolean

SMS feature Default: "true"

mms

boolean

MMS feature

emergency

boolean

Emergency feature

tns

string

Array of numbers <double> non-empty Array of numbers to order

profile

string

[ 1 .. 255 ] characters Default: US TNProfile name

sip_connection

string

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ SIP Connection uuid

sip_control_app

string

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ SIP Control app uuid

{
  "success": true,
  "payload": {
    "voice": true,
    "fax": true,
    "sms": true,
    "mms": true,
    "emergency": true,
    "autorenew": true,
    "state": "created",
    "request": {
      "voice": true,
      "fax": true,
      "sms": true,
      "mms": true,
      "emergency": true,
      "tns": [
        0
      ],
      "autorenew": true,
      "profile": "US"
    },
    "uuid": "e7fad289-f977-45bb-bc42-448d1290555c",
    "price": null,
    "created_on": "2020-10-28T10:47:28.270Z",
    "modified_on": "2020-10-28T10:47:28.270Z"
  }
}

Code Example

curl -X POST "https://api.opentact.org/rest/order/tn" \
-H  "accept: application/json" \
-H  "X-Auth-Token: JWT_TOKEN" \
-H  "Content-Type: application/json" \
-d "{\"voice\":true,\"fax\":true,\"sms\":true,\"mms\":true,\"emergency\":true,\"tns\":[0],\"autorenew\":true,\"profile\":\"string\",\"sip_connection\":\"string\",\"sip_control_app\":\"string\"}"

GetOrderPrice

POST https://api.opentact.org/rest/order/price

Get order price

Headers

Name
Type
Description

Authorization

string

JWT_TOKEN

Content-Type

string

application/json

Request Body

Name
Type
Description

autorenew

boolean

Default: "true"

voice

string

Default:"true" Voice feature

fax

string

Fax feature

sms

boolean

SMS feature Default: "true"

mms

boolean

MMS feature

emergency

boolean

Emergency feature

tns

string

Array of numbers <double> non-empty Array of numbers to order

profile

string

[ 1 .. 255 ] characters Default: US TNProfile name

sip_connection

string

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ SIP Connection uuid

sip_control_app

string

^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ SIP Control app uuid

{
  "success": true,
  "payload": {
    "nrc": 0,
    "mrc": 0,
    "items": [
      {
        "nrc": "0",
        "mrc": "0",
        "voice_nrc": "0",
        "voice_mrc": "0",
        "voice_incoming_per_min_cost": "0",
        "voice_outgoing_per_min_cost": "0",
        "fax_nrc": "0",
        "fax_mrc": "0",
        "fax_incoming_per_min_cost": "0",
        "fax_outgoing_per_min_cost": "0",
        "emergency_nrc": "0",
        "emergency_mrc": "0",
        "emergency_incoming_per_min_cost": "0",
        "emergency_outgoing_per_min_cost": "0",
        "sms_nrc": "0",
        "sms_mrc": "0",
        "sms_per_send_cost": "0",
        "sms_per_receive_cost": "0",
        "mms_nrc": "0",
        "mms_mrc": "0",
        "mms_per_send_cost": "0",
        "mms_per_receive_cost": "0",
        "id": "string",
        "name": "string",
        "description": "string"
      }
    ]
  }
}

Code Example

curl -X POST "https://api.opentact.org/rest/order/price" -H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN" -H  "Content-Type: application/json" \
-d "{\"voice\":true,\"fax\":true,\"sms\":true,\"mms\":true,\"emergency\":true,\"tns\":[0],\"autorenew\":true,\"profile\":\"string\",\"sip_connection\":\"string\",\"sip_control_app\":\"string\"}"

ListOrders

POST https://api.opentact.org/rest/order

This return the order list.

Headers

Name
Type
Description

Authorization

string

JWT_TOKEN

Content-Type

string

application/json

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "state": "created",
    "tns": [],
    "account": {},
    "profile": {},
    "sip_connection": {},
    "sip_control_app": {},
    "created_by": {},
    "modified_by": {},
    "request": {},
    "price": {},
    "autorenew": true,
    "tnleases": []
  }
}

Code Example

curl -X GET "https://api.opentact.org/rest/order" \
-H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"

GetOrderByUUID

GET https://api.opentact.org/rest/order/{uuid}

Get extended order info.

Path Parameters

Name
Type
Description

uuid

string

Headers

Name
Type
Description

X-Auth-Token

string

JWT_TOKEN

{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "state": "created",
    "tns": [
      {}
    ],
    "account": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "email": "string",
      "level": "ServiceAccount",
      "balance": 0,
      "class4_id": 0,
      "deleted_on": "2019-08-24T14:15:22Z",
      "time_zone": {},
      "users": [],
      "admin": {},
      "messaging_profile_default": {},
      "messaging_profiles": [],
      "addresses": []
    },
    "profile": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "description": "string",
      "priority": "high",
      "tn_provider": {},
      "toll_free": true,
      "class4_client_billing_rule_id": 1,
      "class4_vendor_res_id": 1,
      "class4_vendor_billing_rule_id": 1,
      "register_provider": {},
      "nrc": 0,
      "mrc": 0,
      "sms_provider": {},
      "sms_nrc": 0,
      "sms_mrc": 0,
      "sms_per_send_cost": 0,
      "sms_per_receive_cost": 0,
      "mms_nrc": 0,
      "mms_mrc": 0,
      "mms_per_send_cost": 0,
      "mms_per_receive_cost": 0,
      "voice_provider": {},
      "voice_nrc": 0,
      "voice_mrc": 0,
      "voice_incoming_per_min_cost": 0,
      "voice_outgoing_per_min_cost": 0,
      "fax_nrc": 0,
      "fax_mrc": 0,
      "fax_incoming_per_min_cost": 0,
      "fax_outgoing_per_min_cost": 0,
      "emergency_nrc": 0,
      "emergency_mrc": 0,
      "emergency_incoming_per_min_cost": 0,
      "emergency_outgoing_per_min_cost": 0
    },
    "sip_connection": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "is_active": true,
      "tech_prefix": 0,
      "product": {},
      "subdomain": "string",
      "ip": "string",
      "port": 0,
      "class4_ingress_trunk_id": 0,
      "class4_ingress_trunk_settings": {},
      "class4_ingress_resource_ip_id": 0,
      "class4_egress_trunk_id": 0,
      "class4_egress_trunk_settings": {},
      "class4_egress_resource_ip_id": 0,
      "class4_trunk_prefix_id": 0,
      "tnleases": [],
      "sipusers": [],
      "sip_user_invites": [],
      "account": {},
      "created_by": {},
      "modified_by": {},
      "outbound_voice_profile": {}
    },
    "sip_control_app": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "name": "string",
      "is_active": true,
      "subdomain": "string",
      "tnleases": [],
      "class4_egress_trunk_id": 0,
      "class4_egress_trunk_settings": {},
      "class4_egress_resource_ip_id": 0,
      "account": {},
      "created_by": {},
      "modified_by": {},
      "outbound_voice_profile": {},
      "webhook_url": "string",
      "webhook_method": "GET",
      "webhook_request_timeout": 0,
      "call_flow_url": "string",
      "call_flow_request_timeout": 0,
      "call_flow_method": "GET"
    },
    "created_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    },
    "modified_by": {
      "created_on": "2019-08-24T14:15:22Z",
      "modified_on": "2019-08-24T14:15:22Z",
      "uuid": "string",
      "email": "string",
      "password": "string",
      "phone_number": "string",
      "first_name": "string",
      "last_name": "string",
      "avatar": "string",
      "gender": "Agender",
      "dob": "2019-08-24T14:15:22Z",
      "role": "Admin",
      "gmail_user_id": "string",
      "facebook_user_id": "string",
      "apple_user_id": "string",
      "wechat_user_id": "string",
      "deleted_on": "2019-08-24T14:15:22Z",
      "token": "string",
      "account": {}
    },
    "request": {
      "voice": "true",
      "fax": true,
      "sms": "true",
      "mms": true,
      "emergency": true,
      "tns": [],
      "autorenew": true,
      "profile": "US",
      "sip_connection": "string",
      "sip_control_app": "string"
    },
    "price": {
      "nrc": 0,
      "mrc": 0,
      "items": []
    },
    "autorenew": true,
    "tnleases": [
      {}
    ]
  }
}

Code Example

curl -X GET "https://api.opentact.org/rest/order/{uuid}" \
-H  "accept: application/json" -H  "X-Auth-Token: JWT_TOKEN"

Last updated

Was this helpful?