CREATE NUMBER ORDER

Order new numbers and/or keywords

You can purchase numbers and keywords by creating a number order that includes a list of numbers, a list of keywords, a region, or specifying which numbers are toll-free or regular ones. An OrderId is returned from the request.

Creating a number order is an asynchronous process. The returned orderId can be used in a GetNumberOrder request to see the status of the order. However, there is no guarantee the order will be finished by the time GetNumberOrder is called. Therefore the GetNumberOrder operation must be polled (no more than once per second) until the order is in a terminal state (FINISHED or ERRORED).

The recommended way to determine whether an order is finished is not to poll, but to use a Postback. See SubscriptionService for information on registering a postback using subscriptions.

REQUEST PARAMETERS

Parameter Data Type Demo Value Description
CreateNumberOrder object Create NumberOrder using attached info
Numbers List[PhoneNumber] 13105551212 18185551212 List E.164 11 digit numbers space seperated
Keywords List[string] CHOCOLATE VANILLA List of keywords space seperated
BulkLocal object Local numbers to aquire
Count int
Region object Region of number represented by city, state, prefix, etc...
Prefix string 1920659 4-7 digit prefix
City string Seattle Name of a city
State string WA State abbreviation
Zipcode string 98154 5 digit zipcode
Country string US 2 digit country code
Lata string 674 Lata
RateCenter string SEATTLE
Latitude float 47.61string Latitude
Longitude float -122.331 Longitude
TimeZone string America/Los_Angeles
BulkTollFree object Toll free numbers to aquire
Count int 3 Amount of phone numbers to aquire

RESPONSE PARAMETERS

Parameter Data Type Description
CreatedId long Unique ID of resource

EXAMPLE

using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string CreateNumberOrder()
        {
            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest("number/order", Method.POST);
            request.AddParameter("Numbers", "18559875391");
            request.AddParameter("City", "Seattle");
            request.AddParameter("State", "WA");
            request.AddParameter("Country", "US");

            var response = client.Execute(request);
            string content = response.Content;
            return content;
        }
    }
}

The XML returned is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<r:ResourceReference xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

    <r:Id>1428507003</r:Id>

<r:Location>https://www.callfire.com/api/1.1/rest/number/order/1428507003</r:Location>

</r:ResourceReference>