Add Backorder to your Shopping Cart

This allows you to have a single shopping cart, where you add all of your phone numbers to a single order, and then close out the cart.

Post/ Get Information

URL:

https://apiv1.teleapi.net/backorder/cart?token=XXXXX

Argument Required Type Example
state yes string CO
ratecenter yes string DENVER
quantity yes int 2

Note: You will need to close the backorder out immediately if you are just backordering for one ratecenter/state. You can do that by.

Add a backorder for a state/ratecenter.

Shell/CURL

curl -v -X GET "https://apiv1.teleapi.net/backorder/cart?token=XXXX&ratecenter=DENVER&STATE=CO&quantity=2"

Using PHP+CURL

<?php

$data = array("state" => "CO",
"ratecenter" => "DENVER",
"quantity" => "3"
);

$data = http_build_query($data);

$baseurl = "https://apiv1.teleapi.net/backorder/cart?token=XXXX&".$data;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$retval = curl_exec($ch);
curl_close($ch);

$object = json_decode($retval);
print_r($object);

PHP - file_get_contents

<?php
$data = array("did_number" => "3035551212"
);

$data = array("state" => "CO",
"ratecenter" => "DENVER",
"quantity" => "3"
);

$url = "https://apiv1.teleapi.net/backorder/cart?token=XXXX&".$data;
$x = file_get_contents($url);
$object = json_decode($x);
print_r($object);

Successful Addition to Cart

{
    "code":200,
    "status":"success",
    "data":"successfully added item to cart"
}

Failed Adding (Number not Available)

{
    "code": 400,
    "status": "error",
    "data": "invalid did id"
}

results matching ""

    No results matching ""