import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.Comment.list(filter={"comment_record_type":"sub_number_order","comment_record_id":"8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"})
{- "data": [
- {
- "body": "Hi there, ....",
- "comment_record_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "comment_record_type": "sub_number_order",
- "commenter": "user@company.com",
- "commenter_type": "user",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "read_at": null,
- "updated_at": "2018-01-01T00:00:00.000000Z"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
A Comment Response
{- "body": "Hi there, ....",
- "comment_record_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "comment_record_type": "sub_number_order"
}
{- "data": {
- "body": "Hi there, ....",
- "comment_record_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "comment_record_type": "sub_number_order",
- "commenter": "user@company.com",
- "commenter_type": "user",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "read_at": null,
- "updated_at": "2018-01-01T00:00:00.000000Z"
}
}
A Comment Response
object | |||||||||||||||||||
|
{- "data": {
- "body": "Hi there, ....",
- "comment_record_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "comment_record_type": "sub_number_order",
- "commenter": "user@company.com",
- "commenter_type": "user",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "read_at": null,
- "updated_at": "2018-01-01T00:00:00.000000Z"
}
}
A Comment Response
object (ReadComment) | |||||||||||||||||||
|
{- "data": {
- "body": "Hi there, ....",
- "comment_record_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "comment_record_type": "sub_number_order",
- "commenter": "user@company.com",
- "commenter_type": "user",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "read_at": "2018-01-01T00:00:00.000000Z",
- "updated_at": "2018-01-01T00:00:00.000000Z"
}
}
Get a list of phone numbers associated to orders.
Successful response with a list of number order phone numbers.
Array of objects (NumberOrderPhoneNumber) | |
object (PaginationMeta) |
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.NumberOrderPhoneNumber.list()
{- "data": [
- {
- "country_code": "US",
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "order_request_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd495",
- "phone_number": "+19705555098",
- "phone_number_type": "local",
- "record_type": "number_order_phone_number",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21"
}
], - "requirements_met": true,
- "status": "pending",
- "sub_number_order_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd496"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Get an existing number order phone number.
Successful response with details about a number order phone number.
object (NumberOrderPhoneNumber) | |||||||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.NumberOrderPhoneNumber.retrieve("number_order_phone_number_id")
{- "data": {
- "country_code": "US",
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "order_request_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd495",
- "phone_number": "+19705555098",
- "phone_number_type": "local",
- "record_type": "number_order_phone_number",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21"
}
], - "requirements_met": true,
- "status": "pending",
- "sub_number_order_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd496"
}
}
Updates a number order phone number.
Successful response with details about a number order phone number.
object (NumberOrderPhoneNumber) | |||||||||||||||||||||
|
{- "regulatory_requirements": [
- {
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
]
}
{- "data": {
- "country_code": "US",
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "order_request_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd495",
- "phone_number": "+19705555098",
- "phone_number_type": "local",
- "record_type": "number_order_phone_number",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21"
}
], - "requirements_met": true,
- "status": "pending",
- "sub_number_order_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd496"
}
}
Get a paginated list of number orders.
filter[status] | string Filter number orders by status. |
filter[created_at][gt] | string Filter number orders later than this value. |
filter[created_at][lt] | string Filter number orders earlier than this value. |
filter[phone_numbers_count] | string Filter number order with this amount of numbers |
filter[customer_reference] | string Filter number orders via the customer reference set. |
filter[requirements_met] | boolean Filter number orders by requirements met. |
page[number] | integer >= 1 Default: 1 The page number to load |
page[size] | integer [ 1 .. 250 ] Default: 20 The size of the page |
Successful response with a list of number orders.
Array of objects (NumberOrder) | |
object (PaginationMeta) |
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.NumberOrder.list(filter={"phone_numbers.phone_number": ["+18665552368"]})
{- "data": [
- {
- "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
- "connection_id": "346789098765567",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "customer_reference": "MY REF 001",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
- "phone_numbers_count": 1,
- "record_type": "number_order",
- "requirements_met": true,
- "status": "pending",
- "sub_number_order_ids": [
- "string"
], - "updated_at": "2018-01-01T00:00:00.000000Z"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Creates a phone number order.
billing_group_id | string Identifies the billing group associated with the phone number. |
connection_id | string Identifies the connection associated with this phone number. |
customer_reference | string A customer reference string for customer look ups. |
messaging_profile_id | string Identifies the messaging profile associated with the phone number. |
Array of objects (PhoneNumber) |
Successful response with details about a number order.
object (NumberOrderWithPhoneNumbers) | |||||||||||||||||||||||||||
|
{- "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
- "connection_id": "346789098765567",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "customer_reference": "MY REF 001",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
- "phone_numbers": [
- {
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "phone_number": "+19705555098",
- "record_type": "number_order_phone_number",
- "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "status": "success"
}
], - "phone_numbers_count": 1,
- "record_type": "number_order",
- "requirements_met": true,
- "status": "pending",
- "updated_at": "2018-01-01T00:00:00.000000Z"
}
{- "data": {
- "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
- "connection_id": "346789098765567",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "customer_reference": "MY REF 001",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
- "phone_numbers_count": 1,
- "record_type": "number_order",
- "requirements_met": true,
- "status": "pending",
- "sub_number_order_ids": [
- "string"
], - "updated_at": "2018-01-01T00:00:00.000000Z",
- "phone_numbers": [
- {
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "phone_number": "+19705555098",
- "record_type": "number_order_phone_number",
- "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "status": "success"
}
]
}
}
{- "data": {
- "event_type": "number_order.complete",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "occurred_at": "2019-08-24T14:15:22Z",
- "payload": {
- "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
- "connection_id": "346789098765567",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "customer_reference": "MY REF 001",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
- "phone_numbers_count": 1,
- "record_type": "number_order",
- "requirements_met": true,
- "status": "pending",
- "sub_number_order_ids": [
- "string"
], - "updated_at": "2018-01-01T00:00:00.000000Z"
}, - "record_type": "event"
}
}
Get an existing phone number order.
Successful response with details about a number order.
object (NumberOrderWithPhoneNumbers) | |||||||||||||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.NumberOrder.retrieve("number_order_id")
{- "data": {
- "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
- "connection_id": "346789098765567",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "customer_reference": "MY REF 001",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
- "phone_numbers_count": 1,
- "record_type": "number_order",
- "requirements_met": true,
- "status": "pending",
- "sub_number_order_ids": [
- "string"
], - "updated_at": "2018-01-01T00:00:00.000000Z",
- "phone_numbers": [
- {
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "phone_number": "+19705555098",
- "record_type": "number_order_phone_number",
- "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "status": "success"
}
]
}
}
Updates a phone number order.
Successful response with details about a number order.
object (NumberOrderWithPhoneNumbers) | |||||||||||||||||||||||||||
|
{- "created_at": "2018-01-01T00:00:00.000000Z",
- "customer_reference": "MY REF 001",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "phone_numbers": [
- {
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "phone_number": "+19705555098",
- "record_type": "number_order_phone_number",
- "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "status": "success"
}
], - "phone_numbers_count": 1,
- "record_type": "number_order",
- "requirements_met": true,
- "status": "pending",
- "updated_at": "2018-01-01T00:00:00.000000Z"
}
{- "data": {
- "billing_group_id": "abc85f64-5717-4562-b3fc-2c9600",
- "connection_id": "346789098765567",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "customer_reference": "MY REF 001",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600",
- "phone_numbers_count": 1,
- "record_type": "number_order",
- "requirements_met": true,
- "status": "pending",
- "sub_number_order_ids": [
- "string"
], - "updated_at": "2018-01-01T00:00:00.000000Z",
- "phone_numbers": [
- {
- "id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "phone_number": "+19705555098",
- "record_type": "number_order_phone_number",
- "regulatory_group_id": "dc8e4d67-33a0-4cbb-af74-7b58f05bd494",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "status": "success"
}
]
}
}
An array of Regulatory Requiremenst Responses
Array of objects (RegulatoryRequirements) | |
object (PaginationMeta) |
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.PhoneNumbersRegulatoryRequirement.list(filter={"phone_number":"+41215470622,+41215470633"})
{- "data": [
- {
- "phone_number": "+41215471644",
- "phone_number_type": "local",
- "record_type": "phone_number_regulatory_requirements",
- "region_information": [
- {
- "region_name": "CH",
- "region_type": "country_code"
}
], - "regulatory_requirements": [
- {
- "acceptance_criteria": {
- "field_type": "address",
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "locality_limit": "Identical locality as the numbers desired"
}, - "description": "Address matching the DID area code (street, building number, postal code, city and country)",
- "example": "311 W Superior St, Chicago, IL 60654",
- "field_type": "address_id",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "label": "Address matching the DID area code",
- "record_type": "regulatory_requirement"
}
]
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Get a paginated list of sub number orders.
filter[user_id] | string <uuid> User ID of the user who owns the sub number order Example: filter[user_id]=d70873cd-7c98-401a-81b6-b1ae08246995 |
filter[order_request_id] | string <uuid> ID of the number order the sub number order belongs to Example: filter[order_request_id]=12ade33a-21c0-473b-b055-b3c836e1c293 |
filter[country_code] | string ISO alpha-2 country code. Example: filter[country_code]=US |
filter[phone_number_type] | string Phone Number Type Example: filter[phone_number_type]=local |
filter[phone_numbers_count] | integer Amount of numbers in the sub number order Example: filter[phone_numbers_count]=1 |
Successful response with a list of sub number orders.
Array of objects (SubNumberOrder) | |
object (PaginationMeta) |
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.SubNumberOrder.list(filter={"user_id":"d70873cd-7c98-401a-81b6-b1ae08246995","order_request_id":"12ade33a-21c0-473b-b055-b3c836e1c293"})
{- "data": [
- {
- "country_code": "US",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "order_request_id": "12ade33a-21c0-473b-b055-b3c836e1c293",
- "phone_number_type": "local",
- "phone_numbers_count": 1,
- "record_type": "sub_number_order",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "updated_at": "2018-01-01T00:00:00.000000Z",
- "user_id": "d70873cd-7c98-401a-81b6-b1ae08246995"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Get an existing sub number order.
Successful response with details about a sub number order.
object (SubNumberOrder) | |||||||||||||||||||||||
|
{- "data": {
- "country_code": "US",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "order_request_id": "12ade33a-21c0-473b-b055-b3c836e1c293",
- "phone_number_type": "local",
- "phone_numbers_count": 1,
- "record_type": "sub_number_order",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "updated_at": "2018-01-01T00:00:00.000000Z",
- "user_id": "d70873cd-7c98-401a-81b6-b1ae08246995"
}
}
Updates a sub number order.
Successful response with details about a sub number order.
object (SubNumberOrder) | |||||||||||||||||||||||
|
{- "regulatory_requirements": [
- {
- "field_value": "45f45a04-b4be-4592-95b1-9306b9db2b21",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
]
}
{- "data": {
- "country_code": "US",
- "created_at": "2018-01-01T00:00:00.000000Z",
- "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
- "order_request_id": "12ade33a-21c0-473b-b055-b3c836e1c293",
- "phone_number_type": "local",
- "phone_numbers_count": 1,
- "record_type": "sub_number_order",
- "regulatory_requirements": [
- {
- "field_type": "address",
- "record_type": "phone_number_regulatory_requirement",
- "requirement_id": "8ffb3622-7c6b-4ccc-b65f-7a3dc0099576"
}
], - "requirements_met": true,
- "updated_at": "2018-01-01T00:00:00.000000Z",
- "user_id": "d70873cd-7c98-401a-81b6-b1ae08246995"
}
}