Open API - Update Tracking

API Endpoint:

Protocol: HTTPS
Method: POST
Authentication: API Key and Secret via header
Content Type: application/json

All API calls must include this header to authorize the request.
Replace YOUR-KEY-HERE with your API key and YOUR-SECRET-HERE with your secret.

Header Key Header Value
Content-Type application/json


The body must be sent in JSON format. The keys include company_name, first, last, email, phone, and transactions.
    "route_quote_id": "5",
    "tracking_number": "a1234567890",
    "shipped_date": "08-15-2099",
    "shipping_total": "7.49",
    "handling_total": "0"
Body Key Body Value Required Description
route_quote_id string MAYBE Valid quote id from the Request Quote API. Required, unless route_order_id is provided.
route_order_id string MAYBE Valid insure order id from the Insure Order API. Required, unless route_quote_id is provided.
tracking_number string YES Valid carrier generated tracking number.
shipped_date string YES Date order was shipped. Prefer ISO 8601 format.
shipping_total integer, double or float greater than or equal to zero YES Total shipping cost charged to customer for this order.
handling_total integer, double or float greater than or equal to zero YES Total handling cost charged to customer for this order.
shipping_carrier_code supported shipping carrier code as a string no Carrier order was shipped through. Supported shipping carrier codes can be pulled from our Shipping Carrier Codes API.
shipping_method string no Method used for shipping.
custom_c1 string no Custom field that accepts any text string. Max 255 characters.
custom_c2 string no Custom field that accepts any text string. Max 255 characters.
custom_c3 string no Custom field that accepts any text string. Max 255 characters.
custom_c4 string no Custom field that accepts any text string. Max 255 characters.

Code Examples:

The following are examples for reference and may require library dependencies not described here. An understanding of REST services, JSON, and web security is required to develop service clients.

Javascript - Jquery AJAX
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "",
  "method": "POST",
  "headers": {
    "api_key": "YOUR-KEY-HERE",
    "secret": "YOUR-SECRET-HERE",
    "content-type": "application/json",
    "cache-control": "no-cache"
  "processData": false,
  "data": "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}"

$.ajax(settings).done(function (response) {
Javascript - XHR
var data = JSON.stringify({
  "route_quote_id": "5",
  "tracking_number": "a1234567890",
  "shipped_date": "08-15-2099",
  "shipping_total": "7.49",
  "handling_total": "0"

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
});"POST", "");
xhr.setRequestHeader("api_key", "YOUR-KEY-HERE");
xhr.setRequestHeader("secret", "YOUR-SECRET-HERE");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("cache-control", "no-cache");

Node JS - Native
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "/open_api/v1/post/json/update_tracking",
  "headers": {
    "api_key": "YOUR-KEY-HERE",
    "secret": "YOUR-SECRET-HERE",
    "content-type": "application/json",
    "cache-control": "no-cache"

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {

  res.on("end", function () {
    var body = Buffer.concat(chunks);

req.write(JSON.stringify({ route_quote_id: '5',
  tracking_number: 'a1234567890',
  shipped_date: '08-15-2099',
  shipping_total: '7.49',
  handling_total: '0' }));
Node JS - Request
var request = require("request");

var options = { method: 'POST',
  url: '',
   { 'cache-control': 'no-cache',
     'content-type': 'application/json',
     secret: 'YOUR-SECRET-HERE',
     api_key: 'YOUR-KEY-HERE' },
   { route_quote_id: '5',
     tracking_number: 'a1234567890',
     shipped_date: '08-15-2099',
     shipping_total: '7.49',
     handling_total: '0' },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

Node JS - Unirest
var unirest = require("unirest");

var req = unirest("POST", "");

  "cache-control": "no-cache",
  "content-type": "application/json",
  "secret": "YOUR-SECRET-HERE",
  "api_key": "YOUR-KEY-HERE"

  "route_quote_id": "5",
  "tracking_number": "a1234567890",
  "shipped_date": "08-15-2099",
  "shipping_total": "7.49",
  "handling_total": "0"

req.end(function (res) {
  if (res.error) throw new Error(res.error);

Java - OK HTTP
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}");
Request request = new Request.Builder()
  .addHeader("api_key", "YOUR-KEY-HERE")
  .addHeader("secret", "YOUR-SECRET-HERE")
  .addHeader("content-type", "application/json")
  .addHeader("cache-control", "no-cache")

Response response = client.newCall(request).execute();
Java - Unirest
HttpResponse<String> response ="")
  .header("api_key", "YOUR-KEY-HERE")
  .header("secret", "YOUR-SECRET-HERE")
  .header("content-type", "application/json")
  .header("cache-control", "no-cache")
  .body("{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}")
C# (ReSharp)
var client = new RestClient("");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/json");
request.AddHeader("secret", "YOUR-SECRET-HERE");
request.AddHeader("api_key", "YOUR-KEY-HERE");
request.AddParameter("application/json", "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
package main

import (

func main() {

	url := ""

	payload := strings.NewReader("{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("api_key", "YOUR-KEY-HERE")
	req.Header.Add("secret", "YOUR-SECRET-HERE")
	req.Header.Add("content-type", "application/json")
	req.Header.Add("cache-control", "no-cache")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)


Python - http.client (Python 3)
import http.client

conn = http.client.HTTPSConnection("")

payload = "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}"

headers = {
    'api_key': "YOUR-KEY-HERE",
    'secret': "YOUR-SECRET-HERE",
    'content-type': "application/json",
    'cache-control': "no-cache"

conn.request("POST", "/open_api/v1/post/json/update_tracking", payload, headers)

res = conn.getresponse()
data =

Python - Requests
import requests

url = ""

payload = "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}"
headers = {
    'api_key': "YOUR-KEY-HERE",
    'secret': "YOUR-SECRET-HERE",
    'content-type': "application/json",
    'cache-control': "no-cache"

response = requests.request("POST", url, data=payload, headers=headers)

Ruby (NET::Http)
require 'uri'
require 'net/http'

url = URI("")

http =, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request =
request["api_key"] = 'YOUR-KEY-HERE'
request["secret"] = 'YOUR-SECRET-HERE'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'
request.body = "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}"

response = http.request(request)
puts response.read_body
PHP - HttpRequest

$request = new HttpRequest();

  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'secret' => 'YOUR-SECRET-HERE',
  'api_key' => 'YOUR-KEY-HERE'

	"route_quote_id": "5",
	"tracking_number": "a1234567890",
	"shipped_date": "08-15-2099",
	"shipping_total": "7.49",
	"handling_total": "0"

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
PHP - peci_http

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
	"route_quote_id": "5",
	"tracking_number": "a1234567890",
	"shipped_date": "08-15-2099",
	"shipping_total": "7.49",
	"handling_total": "0"


  'cache-control' => 'no-cache',
  'content-type' => 'application/json',
  'secret' => 'YOUR-SECRET-HERE',
  'api_key' => 'YOUR-KEY-HERE'

$response = $client->getResponse();

echo $response->getBody();

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "",
  CURLOPT_POSTFIELDS => "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}",
    "api_key: YOUR-KEY-HERE",
    "cache-control: no-cache",
    "content-type: application/json",
    "secret: YOUR-SECRET-HERE"

$response = curl_exec($curl);
$err = curl_error($curl);


if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
POST /open_api/v1/post/json/update_tracking HTTP/1.1
api_key: YOUR-KEY-HERE
Content-Type: application/json
Cache-Control: no-cache

	"route_quote_id": "5",
	"tracking_number": "a1234567890",
	"shipped_date": "08-15-2099",
	"shipping_total": "7.49",
	"handling_total": "0"
Shell - wget
wget --quiet \
  --method POST \
  --header 'api_key: YOUR-KEY-HERE' \
  --header 'secret: YOUR-SECRET-HERE' \
  --header 'content-type: application/json' \
  --header 'cache-control: no-cache' \
  --body-data '{\n	"route_quote_id": "5",\n	"tracking_number": "a1234567890",\n	"shipped_date": "08-15-2099",\n	"shipping_total": "7.49",\n	"handling_total": "0"\n}' \
  --output-document \
Shell - Httpie
echo '{
	"route_quote_id": "5",
	"tracking_number": "a1234567890",
	"shipped_date": "08-15-2099",
	"shipping_total": "7.49",
	"handling_total": "0"
}' |  \
  http POST \
  api_key:YOUR-KEY-HERE \
  cache-control:no-cache \
  content-type:application/json \
Shell - cURL
curl --request POST \
  --url \
  --header 'api_key: YOUR-KEY-HERE' \
  --header 'cache-control: no-cache' \
  --header 'content-type: application/json' \
  --header 'secret: YOUR-SECRET-HERE' \
  --data '{\n	"route_quote_id": "5",\n	"tracking_number": "a1234567890",\n	"shipped_date": "08-15-2099",\n	"shipping_total": "7.49",\n	"handling_total": "0"\n}'
curl -X POST -H "api_key: YOUR-KEY-HERE" -H "secret: YOUR-SECRET-HERE" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H '{
	"route_quote_id": "5",
	"tracking_number": "a1234567890",
	"shipped_date": "08-15-2099",
	"shipping_total": "7.49",
	"handling_total": "0"
}' ""
C (LibCurl)
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "content-type: application/json");
headers = curl_slist_append(headers, "secret: YOUR-SECRET-HERE");
headers = curl_slist_append(headers, "api_key: YOUR-KEY-HERE");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}");

CURLcode ret = curl_easy_perform(hnd);
Objective-C (NSURL)
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"api_key": @"YOUR-KEY-HERE",
                           @"secret": @"YOUR-SECRET-HERE",
                           @"content-type": @"application/json",
                           @"cache-control": @"no-cache" };
NSDictionary *parameters = @{ @"route_quote_id": @"5",
                              @"tracking_number": @"a1234567890",
                              @"shipped_date": @"08-15-2099",
                              @"shipping_total": @"7.49",
                              @"handling_total": @"0" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@""]
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
[dataTask resume];
Swift (NSURL)
import Foundation

let headers = [
  "api_key": "YOUR-KEY-HERE",
  "secret": "YOUR-SECRET-HERE",
  "content-type": "application/json",
  "cache-control": "no-cache"
let parameters = [
  "route_quote_id": "5",
  "tracking_number": "a1234567890",
  "shipped_date": "08-15-2099",
  "shipping_total": "7.49",
  "handling_total": "0"
] as [String : Any]

let postData = parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
  } else {
    let httpResponse = response as? HTTPURLResponse

OCaml (Cohttp)
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "" in
let headers = Header.init ()
  |> fun h -> Header.add h "api_key" "YOUR-KEY-HERE"
  |> fun h -> Header.add h "secret" "YOUR-SECRET-HERE"
  |> fun h -> Header.add h "content-type" "application/json"
  |> fun h -> Header.add h "cache-control" "no-cache"
let body = Cohttp_lwt_body.of_string "{\n\t\"route_quote_id\": \"5\",\n\t\"tracking_number\": \"a1234567890\",\n\t\"shipped_date\": \"08-15-2099\",\n\t\"shipping_total\": \"7.49\",\n\t\"handling_total\": \"0\"\n}" in ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)


The response returns JSON and consists of the result, error_messages, and data.
    "result": "SUCCESS",
    "error_messages": null,
    "data": {
        "route_order_id": 2,
        "route_quote_id": 5,
        "shipping_total": 7.49,
        "handling_total": 0,
        "shipping_carrier_code": null,
        "shipping_method": null,
        "shipped_date": "08-15-2099",
        "tracking_number": "a1234567890",
        "custom_c1": null,
        "custom_c2": null,
        "custom_c3": null,
        "custom_c4": null,
        "ip_address": "",
        "created": 1481859730033
Response Body Key Response Body Value Description
result SUCCESS or ERROR Only returns SUCCESS or ERROR.
error_messages null or error messages Returns null if result is SUCCESS or an array of error strings if result is ERROR.
data data envelope or null Returns data envelope if result is SUCCESS or null if result is ERROR.
route_quote_id integer The Route Quote ID associated with this order.
route_order_id integer The Route Insure Order ID associated with this order.
shipping_total float Reiterates the value sent in to confirm acceptance.
handling_total float Reiterates the value sent in to confirm acceptance.
shipping_carrier_code string Reiterates the value sent in to confirm acceptance.
shipping_method string Reiterates the value sent in to confirm acceptance.
shipped_date string Reiterates the value sent in to confirm acceptance.
tracking_number string Reiterates the value sent in to confirm acceptance.
custom_c1 string Reiterates the value sent in to confirm acceptance.
custom_c2 string Reiterates the value sent in to confirm acceptance.
custom_c3 string Reiterates the value sent in to confirm acceptance.
custom_c4 string Reiterates the value sent in to confirm acceptance.
ip_address string IP address of the server making the request.
created timestamp Timestamp of the request.


This API can return the following errors as strings:
This API requires request method POST.
This API call must include a valid partner_key in the header to authenticate.
Invalid api_key or secret.
No billing setup for these keys. Live API requests require valid billing. If this is a test, use the Test API keys.
Request must include a valid route_order_id or route_quote_id to update tracking.
Unable to find route_order_id ##### or route_quote_id ##### associated to api_key #####.
Missing ALL required parameters.
Missing required parameter tracking_number.
Missing required parameter shipped_date.
Parameter shipping_total must be zero or greater.
Parameter handling_total must be zero or greater.
Value for shipping_carrier_code: "+tracking.getShipping_carrier_code()+" is invalid.
Invalid value for shipping_carrier_code.