Number Portout API

Number portout operations API

List portout requests

Returns the portout requests according to filters

SecuritybearerAuth
Request
query Parameters
filter[carrier_name]
string

Filter by new carrier name.

filter[spid]
string

Filter by new carrier spid.

filter[status]
string

Filter by portout status.

Enum: "pending" "authorized" "ported" "rejected" "rejected-pending" "canceled"
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

Responses
200

Portout Response

Response Schema: application/json
Array of objects (PortoutDetails)
object (Metadata)
401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

get/portouts
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortOut.list(page: { number: 1, size: 20 })
Response samples
application/json
{
  • "data": [
    • {
      • "already_ported": false,
      • "authorized_name": "McPortersen",
      • "carrier_name": "test",
      • "city": "Chicago",
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "current_carrier": "telnyx",
      • "end_user_name": "McPortersen",
      • "foc_date": "2018-02-02T22:25:27.521Z",
      • "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      • "inserted_at": "2018-02-02T22:25:27.521Z",
      • "phone_numbers": [
        • "+35312345678"
        ],
      • "pon": "00000000",
      • "reason": null,
      • "record_type": "portout",
      • "requested_foc_date": "2018-02-02T22:25:27.521Z",
      • "service_address": "000 Example Street",
      • "spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      • "state": "IL",
      • "status": "rejected",
      • "support_key": "PO_764725",
      • "updated_at": "2018-02-02T22:25:27.521Z",
      • "user_id": "7865816a-ee85-4e50-b19e-52983dcc6d4a",
      • "vendor": "0e66ed3b-37e6-4fed-93d6-a30ce2493661",
      • "zip": "00000"
      }
    ],
  • "meta": {
    • "page_number": 3,
    • "page_size": 1,
    • "total_pages": 13,
    • "total_results": 13
    }
}

Get a portout request

Returns the portout request based on the ID provided

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Portout id

Responses
200

Portout Response

Response Schema: application/json
object (PortoutDetails)
already_ported
boolean

Is true when the number is already ported

authorized_name
string

Name of person authorizing the porting order

carrier_name
string

Carrier the number will be ported out to

city
string

City or municipality of billing address

created_at
string

ISO 8601 formatted date of when the portout was created

current_carrier
string

The current carrier

end_user_name
string

Person name or company name requesting the port

foc_date
string

ISO 8601 formatted Date/Time of the FOC date

id
string
inserted_at
string

ISO 8601 formatted date of when the portout was created

lsr
Array of strings <uri>

The Local Service Request

phone_numbers
Array of strings

Phone numbers associated with this portout

pon
string

Port order number assigned by the carrier the number will be ported out to

reason
string

The reason why the order is being rejected by the user. If the order is authorized, this field can be left null

record_type
string

Identifies the type of the resource.

requested_foc_date
string

ISO 8601 formatted Date/Time of the user requested FOC date

service_address
string

First line of billing address (street address)

spid
string

New service provider spid

state
string

State, province, or similar of billing address

status
string

Status of portout request

Enum: "pending" "authorized" "ported" "rejected" "rejected-pending" "canceled"
support_key
string

A key to reference this port out request when contacting Telnyx customer support

updated_at
string

ISO 8601 formatted date of when the portout was last updated

user_id
string <uuid>

Identifies the user (or organization) who requested the port out

vendor
string <uuid>

Telnyx partner providing network coverage

zip
string

Postal Code of billing address

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

get/portouts/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortOut.retrieve(PORTOUT_ID)
Response samples
application/json
{
  • "data": {
    • "already_ported": false,
    • "authorized_name": "McPortersen",
    • "carrier_name": "test",
    • "city": "Chicago",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "current_carrier": "telnyx",
    • "end_user_name": "McPortersen",
    • "foc_date": "2018-02-02T22:25:27.521Z",
    • "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    • "inserted_at": "2018-02-02T22:25:27.521Z",
    • "phone_numbers": [
      • "+35312345678"
      ],
    • "pon": "00000000",
    • "reason": null,
    • "record_type": "portout",
    • "requested_foc_date": "2018-02-02T22:25:27.521Z",
    • "service_address": "000 Example Street",
    • "spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    • "state": "IL",
    • "status": "rejected",
    • "support_key": "PO_764725",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "user_id": "7865816a-ee85-4e50-b19e-52983dcc6d4a",
    • "vendor": "0e66ed3b-37e6-4fed-93d6-a30ce2493661",
    • "zip": "00000"
    }
}

List all comments for a portout request

Returns a list of comments for a portout request.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Portout id

Responses
200

Portout Comments

Response Schema: application/json
Array of objects (PortoutComment)
object (Metadata)
401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

get/portouts/{id}/comments
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

resource = telnyx.PortOut.retrieve(PORTOUT_ID)
resource.list_comments()
Response samples
application/json
{
  • "data": [
    • {
      • "body": "This is a comment",
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      • "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      • "record_type": "portout",
      • "user_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
      }
    ],
  • "meta": {
    • "page_number": 3,
    • "page_size": 1,
    • "total_pages": 13,
    • "total_results": 13
    }
}

Create a comment on a portout request

Creates a comment on a portout request.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Portout id

Request Body schema: application/json
required
body
string

Comment to post on this portout request

Responses
201

Portout Comment Response

Response Schema: application/json
object (PortoutComment)
body
required
string

Comment body

created_at
required
string

Comment creation timestamp in ISO 8601 format

id
required
string
portout_id
string
Default: null

Identifies the associated port request

record_type
string

Identifies the type of the resource.

user_id
required
string

Identifies the user who created the comment. Will be null if created by Telnyx Admin

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

post/portouts/{id}/comments
Request samples
application/json
{
  • "body": "string"
}
Response samples
application/json
{
  • "data": {
    • "body": "This is a comment",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    • "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    • "record_type": "portout",
    • "user_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
    }
}

List supporting documents on a portout request

List every supporting documents for a portout request.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Portout id

Responses
201

Portout Supporting Documents

Response Schema: application/json
Array of objects (PortOutSupportingDocument)
Array
created_at
required
string

Supporting document creation timestamp in ISO 8601 format

document_id
required
string <uuid>

Identifies the associated document

id
required
string <uuid>
portout_id
required
string <uuid>

Identifies the associated port request

record_type
required
string

Identifies the type of the resource.

type
required
string

Identifies the type of the document

Enum: "loa" "invoice"
updated_at
required
string

Supporting document last changed timestamp in ISO 8601 format

401

Unauthorized

404

Resource not found

get/portouts/{id}/supporting_documents
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.Portouts.retrieve_supporting_document.retrieve("id")
Response samples
application/json
{
  • "data": [
    • {
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "document_id": "f1c5e079-9d82-4f50-95bc-ae2f6b8d84d7",
      • "id": "5a16902a-2ee9-4882-a247-420fc6627b62",
      • "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      • "record_type": "supporting_document",
      • "type": "loa",
      • "updated_at": "2018-02-02T22:25:27.521Z"
      }
    ]
}

Create a list of supporting documents on a portout request

Creates a list of supporting documents on a portout request.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Portout id

Request Body schema: application/json
required
Array of objects [ 1 .. 10 ] items

List of supporting documents parameters

Array ([ 1 .. 10 ] items)
document_id
required
string <uuid>

Identifies the associated document

type
required
string

Identifies the type of the document

Enum: "loa" "invoice"
Responses
201

Portout Supporting Documents

Response Schema: application/json
Array of objects (PortOutSupportingDocument)
Array
created_at
required
string

Supporting document creation timestamp in ISO 8601 format

document_id
required
string <uuid>

Identifies the associated document

id
required
string <uuid>
portout_id
required
string <uuid>

Identifies the associated port request

record_type
required
string

Identifies the type of the resource.

type
required
string

Identifies the type of the document

Enum: "loa" "invoice"
updated_at
required
string

Supporting document last changed timestamp in ISO 8601 format

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

post/portouts/{id}/supporting_documents
Request samples
application/json
{
  • "documents": [
    • {
      • "document_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      • "type": "loa"
      }
    ]
}
Response samples
application/json
{
  • "data": [
    • {
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "document_id": "f1c5e079-9d82-4f50-95bc-ae2f6b8d84d7",
      • "id": "5a16902a-2ee9-4882-a247-420fc6627b62",
      • "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      • "record_type": "supporting_document",
      • "type": "loa",
      • "updated_at": "2018-02-02T22:25:27.521Z"
      }
    ]
}

Update Status

Authorize or reject portout request

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Portout id

status
required
string

Updated portout status

Enum: "authorized" "rejected-pending"
Request Body schema: application/json
required
reason
string

Provide a reason if rejecting the port out request

Responses
200

Portout Response

Response Schema: application/json
object (PortoutDetails)
already_ported
boolean

Is true when the number is already ported

authorized_name
string

Name of person authorizing the porting order

carrier_name
string

Carrier the number will be ported out to

city
string

City or municipality of billing address

created_at
string

ISO 8601 formatted date of when the portout was created

current_carrier
string

The current carrier

end_user_name
string

Person name or company name requesting the port

foc_date
string

ISO 8601 formatted Date/Time of the FOC date

id
string
inserted_at
string

ISO 8601 formatted date of when the portout was created

lsr
Array of strings <uri>

The Local Service Request

phone_numbers
Array of strings

Phone numbers associated with this portout

pon
string

Port order number assigned by the carrier the number will be ported out to

reason
string

The reason why the order is being rejected by the user. If the order is authorized, this field can be left null

record_type
string

Identifies the type of the resource.

requested_foc_date
string

ISO 8601 formatted Date/Time of the user requested FOC date

service_address
string

First line of billing address (street address)

spid
string

New service provider spid

state
string

State, province, or similar of billing address

status
string

Status of portout request

Enum: "pending" "authorized" "ported" "rejected" "rejected-pending" "canceled"
support_key
string

A key to reference this port out request when contacting Telnyx customer support

updated_at
string

ISO 8601 formatted date of when the portout was last updated

user_id
string <uuid>

Identifies the user (or organization) who requested the port out

vendor
string <uuid>

Telnyx partner providing network coverage

zip
string

Postal Code of billing address

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

patch/portouts/{id}/{status}
Request samples
application/json
{
  • "reason": "I do not recognize this transaction"
}
Response samples
application/json
{
  • "data": {
    • "already_ported": false,
    • "authorized_name": "McPortersen",
    • "carrier_name": "test",
    • "city": "Chicago",
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "current_carrier": "telnyx",
    • "end_user_name": "McPortersen",
    • "foc_date": "2018-02-02T22:25:27.521Z",
    • "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    • "inserted_at": "2018-02-02T22:25:27.521Z",
    • "phone_numbers": [
      • "+35312345678"
      ],
    • "pon": "00000000",
    • "reason": null,
    • "record_type": "portout",
    • "requested_foc_date": "2018-02-02T22:25:27.521Z",
    • "service_address": "000 Example Street",
    • "spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    • "state": "IL",
    • "status": "rejected",
    • "support_key": "PO_764725",
    • "updated_at": "2018-02-02T22:25:27.521Z",
    • "user_id": "7865816a-ee85-4e50-b19e-52983dcc6d4a",
    • "vendor": "0e66ed3b-37e6-4fed-93d6-a30ce2493661",
    • "zip": "00000"
    }
}