Number Block Orders API

Number Block Orders API

List number block orders

Get a paginated list of number block orders.

SecuritybearerAuth
Request
query Parameters
filter[status]
string

Filter number block orders by status.

Example: filter[status]=pending
filter[created_at][gt]
string

Filter number block orders later than this value.

Example: filter[created_at][gt]=2018-01-01T00:00:00.000000Z
filter[created_at][lt]
string

Filter number block orders earlier than this value.

Example: filter[created_at][lt]=2018-01-01T00:00:00.000000Z
filter[phone_numbers.starting_number]
string

Filter number block orders having these phone numbers.

Example: filter[phone_numbers.starting_number]=+19705555000
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

Successful response with a list of number block orders.

Response Schema: application/json
Array of objects (NumberBlockOrder)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/number_block_orders
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "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": 10,
      • "range": 10,
      • "record_type": "number_block_order",
      • "requirements_met": true,
      • "starting_number": "+19705555000",
      • "status": "pending",
      • "updated_at": "2018-01-01T00:00:00.000000Z"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Create a number block order

Creates a phone number block order.

SecuritybearerAuth
Request
Request Body schema: application/json
required
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.

range
required
integer

The phone number range included in the block.

starting_number
required
string <e164_phone_number>

Starting phone number block

Responses
200

Successful response with details about a number block order.

Response Schema: application/json
object (NumberBlockOrder)
connection_id
string

Identifies the connection associated to all numbers in the phone number block.

created_at
string <datetime>

An ISO 8901 datetime string denoting when the number order was created.

customer_reference
string

A customer reference string for customer look ups.

id
string <uuid>
messaging_profile_id
string

Identifies the messaging profile associated to all numbers in the phone number block.

phone_numbers_count
integer

The count of phone numbers in the number order.

range
integer

The phone number range included in the block.

record_type
string
requirements_met
boolean

True if all requirements are met for every phone number, false otherwise.

starting_number
string <e164_phone_number>

Starting phone number block

status
string

The status of the order.

Enum: "pending" "success" "failure"
updated_at
string <datetime>

An ISO 8901 datetime string for when the number order was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
Callbacks
postOrder Status Update Post
post/number_block_orders
Request samples
application/json
{
  • "range": 10,
  • "starting_number": "+19705555000"
}
Response samples
application/json
{
  • "data": {
    • "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": 10,
    • "range": 10,
    • "record_type": "number_block_order",
    • "requirements_met": true,
    • "starting_number": "+19705555000",
    • "status": "pending",
    • "updated_at": "2018-01-01T00:00:00.000000Z"
    }
}
Callback payload samples
POST: Order Status Update Post
application/json
{
  • "data": {
    • "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": 10,
    • "range": 10,
    • "record_type": "number_block_order",
    • "requirements_met": true,
    • "starting_number": "+19705555000",
    • "status": "pending",
    • "updated_at": "2018-01-01T00:00:00.000000Z"
    }
}

Retrieve a number block order

Get an existing phone number block order.

SecuritybearerAuth
Request
path Parameters
number_block_order_id
required
string

The number block order ID.

Responses
200

Successful response with details about a number block order.

Response Schema: application/json
object (NumberBlockOrder)
connection_id
string

Identifies the connection associated to all numbers in the phone number block.

created_at
string <datetime>

An ISO 8901 datetime string denoting when the number order was created.

customer_reference
string

A customer reference string for customer look ups.

id
string <uuid>
messaging_profile_id
string

Identifies the messaging profile associated to all numbers in the phone number block.

phone_numbers_count
integer

The count of phone numbers in the number order.

range
integer

The phone number range included in the block.

record_type
string
requirements_met
boolean

True if all requirements are met for every phone number, false otherwise.

starting_number
string <e164_phone_number>

Starting phone number block

status
string

The status of the order.

Enum: "pending" "success" "failure"
updated_at
string <datetime>

An ISO 8901 datetime string for when the number order was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/number_block_orders/{number_block_order_id}
Request samples
Response samples
application/json
{
  • "data": {
    • "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": 10,
    • "range": 10,
    • "record_type": "number_block_order",
    • "requirements_met": true,
    • "starting_number": "+19705555000",
    • "status": "pending",
    • "updated_at": "2018-01-01T00:00:00.000000Z"
    }
}