CallFire Solutions

Get Number Order

Follow

GET NUMBER ORDER

Get the status and results of a previous order

This operation returns information on the order status, cost, and assets acquired.

Since CreateNumberOrder is an asynchronous process this GetNumberOrder operation may need to be polled for up to 20 seconds at a rate of no more than once per second to determine when the order is in a terminal state of FINISHED or ERRORED. The order will be in 'PROCESSING' status until finished.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData Type
GetNumberOrder   NumberOrder request by unique ID object
Id Unique ID of resource long

RESPONSE PARAMETERS

ParameterDescriptionData Type
NumberOrder Info on NumberOrder like id, status, and cost  
Id   long
Status [NEW, PROCESSING, FINISHED, ERRORED, VOID, WAIT_FOR_PAYMENT, ADJUSTED, APPROVE_TIER_ONE, APPROVE_TIER_TWO, REJECTED] OrderStatus
Created   dateTime
TotalCost   float
LocalNumbers    
Ordered   int
UnitCost   float
Fulfilled   List[string]
TollFreeNumbers    
Ordered   int
UnitCost   float
Fulfilled   List[string]
Keywords    
Ordered   int
UnitCost   float
Fulfilled   List[string]

EXAMPLE


using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string GetNumberOrder()
        {
            long orderId = 1428507003; // Your Order Id here

            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest(string.Format("number/order/{0}", orderId), Method.GET);

            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:Resource xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

    <NumberOrder id="1428507003">

       <Status>FINISHED</Status>

       <Created>2014-12-17T12:25:36Z</Created>

       <TotalCost>3.0</TotalCost>

       <TollFreeNumbers>

          <Ordered>1</Ordered>

          <UnitCost>3.0</UnitCost>

          <Fulfilled>18559875391</Fulfilled>

       </TollFreeNumbers>

    </NumberOrder>

</r:Resource>

Have more questions? Submit a request

Comments