Purchase Toll-Free Numbers

After finding, or finding and reserving your unique Tool-Free (TF) numbers, use Purchase TF Numbers to buy them.

Endpoint and Methods

POST /_rest/v3/my/tf/orders

Parameters

Header

  • Accept: application/json
  • Authorization: xxxxxxxxxxxxxxxxx
  • Content-Type: application/json
Field Type Description
Accept STRING application/json
Authorization STRING Authorization token (for more information, see Atmosphere® API Authentication)
Content-Type STRING application/json

Path

Field Type Description
Email (optional) STRING

An e-mail address to notify about changes in the order’s status.

Must be scalar.

myRespOrg (optional) BOOLEAN

Should numbers be provisioned to customer’s RespOrg instead of carrier RespOrg?

Defaults to false.

Notes (optional) STRING

Notes regarding the fulfilment of the order.

Must be scalar.

numbers ARRAY

An array of reserved numbers to order.

Mutually exclusive with quantity and reservations.

Each item is in the following form:

{

"countryCode": "1",

"number": "1112223456"

}

packageID INTEGER

The target packageID to order numbers for.

Must be scalar.

quantity INTEGER

The quantity of numbers to order.

Must be scalar.

Mutually exclusive with numbers and reservations.

reservations STRING

One or more reservationIDs indicating the numbers to order.

Mutually exclusive with numbers and quantity.

referenceID (optional) STRING

A non-empty string indicating your reference ID or code.

Must be scalar.

serviceArea INTEGER

The service area for desired number(s) (for more information, see Lookups – Service Area).

Must be scalar.

Order Specific Numbers

Copy
{

    "reservationID": [

        "BD929A2A-7F48-11E6-B908-52540029234D",

        "0F85813F-7E8B-11E6-B908-52540029234D"

    ],

    "packageID": 1234567,

    "serviceArea": 4

}

Order by Quantity

Copy
{

    "quantity": 1,

    "packageID": 1234567,

    "serviceArea": 4

}

 

Field Type
Order ID INTEGER

Success Response

Copy
HTTP/1.1 200 OK

{

    "orderID": 287225,

    "batches": [

        { "batchID": 31458 },

        { "batchID": 31460 },

        { "batchID": 31462 }

    ]

}

Error

Name Type Description
code INTEGER Error code
error STRING Error description

Code 401 Response

Copy
HTTP/1.1 401 Unauthorized

{

    "code": 401,

    "error": "Unauthorized"

}

 

Copy
HTTP/1.1 401 Unauthorized

{

    "code": 401,

    "error": "Session Expired"

}

Code 402 Response

Copy
HTTP/1.1 402 Payment Required

{

    "code": 402,

    "error": "Order blocked; trial limit realized.  Limit: %d seats."

}

 

Copy
HTTP/1.1 402 Payment Required

{

    "code": 402,

    "error": "Order too large; trial limit exceeded.  Available: %d seats."

}

Code 406 Response

Copy
HTTP/1.1 406 Not Acceptable

{

    "code": 406,

    "error": "Not Acceptable"

}

Code 422 Response

Copy
HTTP/1.1 422 Unprocessable Entity

{

    "code": 422,

    "error": "The '%s' parameter is required."

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

    "code": 422,

    "error": "The '%s' parameter must be scalar."

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

    "code": 422,

    "error": "The '%s' parameter must be formatted as a(n) integer."

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

    "code": 422,

    "error": "The '%s' parameter must be formatted as a(n) string."

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

    "code": 422,

    "error": "The '%' parameter is required for each Number object."

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

    "code": 422,

    "error": "The 'countryCode' parameter must match one of the following values: 1"

}

 

Copy
HTTP/1.1 422 Unprocessable Entity

{

    "code": 422,

    "error": "The 'serviceArea' parameter must match one of the following values: 1, 2, 3, 4, 5"

}