API Reference

The Zenkraft shipping API is designed to make it easy to rate, book, track and schedule pickups with a growing list of shipping carriers. The APIs are RESTful in nature and we have a swagger (now OpenAPI specification available).

The key concepts are outlined on the left. To get started you will need an API account. Please contact us to have this enabled.

Image

API Endpoint

API endpoint used for both test and production accounts.

https://api.zenkraft.com
Requests

Each JSON request has a single object at the top level. Here's an example of a request:


    {
      "shipment": {
        "carrier": "dpd",
        "dim_units": "CM",
        "weight_units": "KG",
        "currency": "USD",
        "shipping_account": acc_id,
        "sender": {
            "postal_code": "38017",
            "country": "US"
        },
        "recipient": {
            "postal_code": "27215",
            "country": "US"
        },
        "packages": [
            {
                "weight": "0.1"
            }
        ]
      }
    }

                           

Note that the weight value is a string rather than a number type. In this API, all decimal values are sent as strings rather than numbers so that there's no loss of precision.

Testing

To use the carrier's test servers you can pass the test parameter into your request. For example:


    {
      "shipment": {
        "test" : true
        "carrier": "dpd",
        "dim_units": "CM",
        "weight_units": "KG",
        "currency": "USD",
        "shipping_account": acc_id,
        "sender": {
            "postal_code": "38017",
            "country": "US"
        },
        "recipient": {
            "postal_code": "27215",
            "country": "US"
        },
        "packages": [
            {
                "weight": 33
            }
        ]
      }
    }
                           
POST

/account

Creates a new Zenkraft API account. This will return an API key for future requests. The Master API key is required to create accounts. You can obtain this from James or Adrian.

REQUEST
{
  "account": {
    "company": "Zenkraft",
    "email": "my-api@zenkraft.com",
    "org": "XXXXXXXXXXX",
    "source": "My_APP"
  }
}
RESPONSE
{
  "account": {
  	"id": 2380923984938,
  	"api_key": "api_key_here",
    "company": "Zenkraft",
    "email": "my-api@zenkraft.com",
    "org": "XXXXXXXXXXX",
    "source": "My_APP"
  }
}
CURL
curl --request POST \ 
--url https://api.zenkraft.com/account\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/account'

r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/account";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/account') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/account"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/account', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/shippingaccount

Obtain the security credential for the carrier for shipping. The /pref method will sometimes callout to the carrier e.g. FedEx to return a key/password but sometimes won't e.g. DHL where it's not required.

REQUEST
{
  "shipping_account": {
    "name": "My FedEx test account",
    "carrier": "fedex",
    "country": "US",
    "auth": {
	    "account_number": "XXXXXXXX",
	    "meter_number": "XXXXXXXX",
	    "key": "XXXXXXXXXXXXXXXXXXXXXXXX",
	    "password": "XXXXXXXXXXXXXXXXXXXXXXXX"
    }
  }
}
RESPONSE
{
  "shipping_account": {
    "name": "My FedEx test account",
    "id": 0000000000000000,
    "carrier": "fedex",
    "dim_units": "IN",
    "weight_units": "LB",
    "currency": "USD",
    "auth": {
	    "account_number": "XXXXXXXX",
	    "meter_number": "XXXXXXXX",
	    "key": "XXXXXXXXXXXXXXXXXXXXXXXX",
	    "password": "XXXXXXXXXXXXXXXXXXXXXXXX"
    }
  }
}
CURL
curl --request POST \ 
--url https://api.zenkraft.com/shippingaccount\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/shippingaccount'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/shippingaccount";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/shippingaccount') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/shippingaccount"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/shippingaccount', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/validate

Validates an recipient address before shipping

REQUEST
{
	"validate": {
		"street1": "1 Market St",
		"shipping_account": 0000000000000,
		"test": true,
		"address": {
			"street1": "1 Market St",
			"street2": "Suite 240",
			"city": "San Francisco",
			"state": "CA",
			"postal_code": "94105",
			"country": "US",
			"residential": false
		}
	}
}
RESPONSE
CURL
curl --request POST \ 
--url https://api.zenkraft.com/validate\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/validate'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/validate";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/validate') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/validate"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/validate', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/rate

Obtains available shipping rates based on shipping accounts provided. If you have negotiated rates they will be displayed. Currently we only supported obtaining rates based on a "shipping_account" : 2349309340909 value.

If the optional service is given in the request, then all rates in the response that don't match the value of service will be filtered out.

REQUEST
{
  "shipment": {
    "carrier": "fedex",
    "type": "outbound",
    "dim_units": "CM",
    "weight_units": "KG",
    "currency": "USD",
    "shipping_account": 394893489238983,
    "sender": {
      "street1": "10 FED EX PKWY",
      "city": "COLLIERVILLE",
      "state": "TN",
      "postal_code": "38017",
      "country": "US"
    },
    "recipient": {
      "street1": "525 S. Lexington Ave",
      "city": "Burlington",
      "state": "NC",
      "postal_code": "27215",
      "country": "US"
    },
    "packages": [{
        "weight": 33,
        "value": 4,
        "length": 4,
        "width": 4,
        "height": 4
      },
      {
        "weight": 33,
        "value": 4,
        "length": 4,
        "width": 4,
        "height": 4
      }
    ]
  }
}
RESPONSE
{
    "rates": [
        {
            "carrier": "fedex",
            "delivery_day": "fri",
            "service_type": "first_overnight",
            "service_name": "FedEx First Overnight",
            "total_cost": "123.66",
            "currency": "usd"
        },
        {
            "carrier": "fedex",
            "delivery_day": "fri",
            "service_type": "priority_overnight",
            "service_name": "FedEx Priorty Overnight",
            "total_cost": "91.86",
            "currency": "usd"
        },
        { 
            "carrier": "fedex",
            "delivery_day": "fri",
            "service_type": "standard_overnight",
            "service_name": "FedEx Standard Overnight",
            "total_cost": "82.82",
            "currency": "usd"
        },
        {
            "carrier": "fedex",
            "delivery_day": "mon",
            "service_type": "fedex_2_day_am",
            "service_name": "FedEx 2 Day AM",
            "total_cost": "47.25",
            "currency": "usd"
        },
        {
            "carrier": "fedex",
            "delivery_day": "mon",
            "service_type": "fedex_2_day",
            "service_name": "FedEx 2 Day",
            "total_cost": "40.89",
            "currency": "usd"
        },
        {
            "carrier": "fedex",
            "delivery_day": "tue",
            "service_type": "fedex_express_saver",
            "service_name": "FedEx Express Saver",
            "total_cost": "31.51",
            "currency": "usd"
        },
        {
            "carrier": "fedex",
            "service_type": "fedex_ground",
            "service_name": "FedEx Ground",
            "total_cost": "12.05",
            "currency": "usd"
        }
    ]
}
CURL
curl --request POST \ 
--url https://api.zenkraft.com/rate\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/rate'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/rate";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/rate') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/rate"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/rate', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/ship

Books a shipment with a carrier and returns a shipping label.

Field Required Data Type Example Values
weight_units True string KG KG LB
label_type True string PDF ZPL EPL CLP GIF PDF PNG
service True string fedex_ground
shipping_account True integer 1234567890
currency True string USD AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BRL BSD BTN BWP BYN BZD CAD CDF CHF CLP CNY COP CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GGP GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS IMP INR IQD IRR ISK JEP JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLL SOS SPL SRD STN SVC SYP SZL THB TJS TMT TND TOP TRY TTD TVD TWD TZS UAH UGX USD UYU UZS VEF VND VUV WST XAF XCD XDR XOF XPF YER ZAR ZMW ZWD
delivery_instructions string please leave package at back door
special_services array
recipient True recipient
include_base64_label boolean True
customs customs
ship_date string 2018-03-23
test boolean True
carrier True string fedex
references array
packages True array
debug boolean True True
dim_units True string CM CM IN
type True string outbound outbound return
documents array
notifications array
sender True sender
REQUEST
{
   "shipment":{
      "service":"fedex_ground",
      "shipping_account": 10000000000000,
      "ship_date": "2018-04-05",
      "x_custom_field_right_here": false,
      "carrier":"fedex",
      "packaging":"your_packaging",
      "weight_units":"LB",
      "currency":"USD",
      "type":"return",
      "label_type":"PDF",
      "sender":{
         "email":"api@zenkraft.com",
         "street1":"8 Market St",
         "country":"US",
         "company":"ZK Sender",
         "city":"San Francisco",
         "postal_code":"94112",
         "phone":"1234567890",
         "state":"CA",
         "name":"Zack King"
      },
      "dim_units":"IN",
      "debug":true,
      "test":true,
      "recipient":{
         "email":"api@zenkraft.com",
         "street1":"207 Continental Drive",
         "country":"US",
         "company":"Tesla Inc",
         "city":"Newark",
         "postal_code":"19720",
         "phone":"293843995",
         "state":"DE",
         "name":"Bob Jones"
      },
      "packages":[
         {
            "value":"25",
            "length":"2",
            "width":"3",
            "height":"2",
            "weight":"2",
            "description": "Electronics",
            "carrier_specific": [
               {
                  "product_id": "123456"
               }
            ]
         }
      ],
      "references": [
         {
            "type": "invoice_number",
            "value": "INV-12345"
         }
      ]
   }
}
RESPONSE
{
    "shipment": {
        "carrier": "fedex",
        "costs": {
            "base_charge": "10.98",
            "discounts": "0.0",
            "net_charge": "10.98",
            "surcharges": "0.5",
            "taxes": "0.0"
        },
        "currency": "USD",
        "debug": true,
        "dim_units": "IN",
        "id": 0000000000000000,
        "label_type": "ZPLII",
        "packages": [
            {
                "height": "2",
                "label": "BASE64_ENCODED_STRING",
                "label_type": "ZPLII",
                "length": "2",
                "tracking_number": "795499284324",
                "value": "25",
                "weight": "2",
                "width": "3"
            }
        ],
        "recipient": {
            "city": "Newark",
            "company": "Tesla Inc",
            "country": "US",
            "email": "api@zenkraft.com",
            "name": "Bob Jones",
            "phone": "293843995",
            "postal_code": "19720",
            "state": "DE",
            "street1": "207 Continental Drive"
        },
        "sender": {
            "city": "San Francisco",
            "company": "ZK Sender",
            "country": "US",
            "email": "api@zenkraft.com",
            "name": "Zack King",
            "phone": "1234567890",
            "postal_code": "94112",
            "state": "CA",
            "street1": "8 Market St"
        },
        "service": "fedex_ground",
        "ship_date": "2018-04-07",
        "shipping_account": 5486563022602240,
        "special_services": [],
        "tracking_number": "795499284324",
        "type": "return",
        "weight_units": "LB"
    }
}
CURL
curl --request POST \ 
--url https://api.zenkraft.com/ship\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/ship'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/ship";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/ship') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/ship"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/ship', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/pickup

Schedules a shipment for pickup

REQUEST
{
	"pickup" : {
		"carrier": "ups",
		"shipping_account": 00000000000000,
		"time":  {
			"date": "20180717",
			"ready_time": "1500",
			"close_time": "1800"
		},
		"location" : {
       "email":"api@zenkraft.com",
       "street1":"207 Continental Drive",
       "country":"US",
       "company":"Tesla Inc",
       "city":"Newark",
       "postal_code":"19720",
       "phone":"293843995",
       "state":"DE",
       "name":"Bob Jones",
       "residential": false
    },
    "person": {
			"name": "",
			"email": "",
			"phone": ""   	
    }
	},
	"shipments": [0909090909090,090909090909],
	"payment_method": "shipper_account",
	"overweight": false
}
RESPONSE
CURL
curl --request POST \ 
--url https://api.zenkraft.com/pickup\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/pickup'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/pickup";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/pickup') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/pickup"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/pickup', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
GET

/pickup/{pickup_id}

Find the status of a pickup

REQUEST
None
RESPONSE
CURL
curl --request POST \ 
--url https://api.zenkraft.com/pickup\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/pickup'

r = requests.get(endpoint)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/pickup";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/pickup') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/pickup"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/pickup', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
DELETE

/pickup/{pickup_id}

Cancels a pickup

REQUEST
None
RESPONSE
CURL
curl --request POST \ 
--url https://api.zenkraft.com/pickup\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/pickup'

r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/pickup";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/pickup') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/pickup"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/pickup', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/audit

Retreive a shipment's invoice information after it has been delivered e.g. accessorial, discounts and failed deliveries. Normally this requires complex EDI integration. We've turned it into a simple API.

REQUEST
{
	"pickup" : {
		"carrier": "ups",
		"shipping_account": 00000000000000,
		"time":  {
			"date": "20180717",
			"ready_time": "1500",
			"close_time": "1800"
		},
		"location" : {
       "email":"api@zenkraft.com",
       "street1":"207 Continental Drive",
       "country":"US",
       "company":"Tesla Inc",
       "city":"Newark",
       "postal_code":"19720",
       "phone":"293843995",
       "state":"DE",
       "name":"Bob Jones",
       "residential": false
    },
    "person": {
			"name": "",
			"email": "",
			"phone": ""   	
    }
	},
	"shipments": [0909090909090,090909090909],
	"payment_method": "shipper_account",
	"overweight": false
}
RESPONSE
CURL
curl --request POST \ 
--url https://api.zenkraft.com/pickup\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/pickup'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/pickup";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/pickup') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/pickup"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/pickup', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/track

Tracks a shipment with a carrier and returns the checkpoints.

The optional fields ship_date_range_start and ship_date_range_finish can be used to narrow down the search if the tracking number isn't enough to uniquely identify a package. The timestamp for the checkpoints is in RFC3339 format.

REQUEST
{
  "track": {
    "shipping_account": 00000000000000000,
    "carrier": "usps",
    "tracking_number": "9405510200829660957365"
  }
}
   
RESPONSE
{
    "carrier": "USPS",
    "status": "Arrived at Post Office",
    "checkpoints": [
        {
            "description": "Arrived at USPS Facility",
            "location": {
                "city": "TAMPA",
                "country": null,
                "postal_code": "33630",
                "state": "FL"
            },
            "time": "February 15, 2018"
        },
        {
            "description": "Departed USPS Regional Facility",
            "location": {
                "city": "TAMPA FL DISTRIBUTION CENTER",
                "country": null,
                "postal_code": null,
                "state": null
            },
            "time": "2018-02-15T00:00:00Z"
        },
        {
            "description": "Arrived at USPS Regional Facility",
            "location": {
                "city": "TAMPA FL DISTRIBUTION CENTER",
                "country": null,
                "postal_code": null,
                "state": null
            },
            "time": "2018-02-15T00:00:00Z"
        },
        {
            "description": "Return to Sender Processed",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-15T00:00:00Z"
        },
        {
            "description": "Arrived at Post Office",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-15T00:00:00Z"
        },
        {
            "description": "Out for Delivery",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-15T00:00:00Z"
        },
        {
            "description": "Sorting Complete",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-15T00:00:00Z"
        },
        {
            "description": "Unable to deliver item, problem with address",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-14T00:00:00Z"
        },
        {
            "description": "Out for Delivery",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-14T00:00:00Z"
        },
        {
            "description": "Sorting Complete",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-14T00:00:00Z"
        },
        {
            "description": "Arrived at Post Office",
            "location": {
                "city": "BARTOW",
                "country": null,
                "postal_code": "33830",
                "state": "FL"
            },
            "time": "2018-02-14T00:00:00Z"
        },
        {
            "description": "Departed USPS Regional Facility",
            "location": {
                "city": "YBOR CITY FL DISTRIBUTION CENTER",
                "country": null,
                "postal_code": null,
                "state": null
            },
            "time": "2018-02-13T00:00:00Z"
        },
        {
            "description": "Arrived at USPS Regional Facility",
            "location": {
                "city": "YBOR CITY FL DISTRIBUTION CENTER",
                "country": null,
                "postal_code": null,
                "state": null
            },
            "time": "2018-02-13T00:00:00Z"
        },
        {
            "description": "Accepted at USPS Origin Facility",
            "location": {
                "city": "TAMPA",
                "country": null,
                "postal_code": "33634",
                "state": "FL"
            },
            "time": "2018-02-13T00:00:00Z"
        },
        {
            "description": "Shipment Received, Package Acceptance Pending",
            "location": {
                "city": "TAMPA",
                "country": null,
                "postal_code": "33630",
                "state": "FL"
            },
            "time": "2018-02-13T00:00:00Z"
        },
        {
            "description": "Shipping Label Created, USPS Awaiting Item",
            "location": {
                "city": "TAMPA",
                "country": null,
                "postal_code": "33634",
                "state": "FL"
            },
            "time": "2018-02-13T00:00:00Z"
        },
        {
            "description": "Pre-Shipment Info Sent to USPS, USPS Awaiting Item",
            "location": {
                "city": null,
                "country": null,
                "postal_code": null,
                "state": null
            },
            "time": "2018-02-13T00:00:00Z"
        }
    ]
}
CURL
curl --request POST \ 
--url https://api.zenkraft.com/track\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/track'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/track";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/track') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/track"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/track', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/cancel

Cancels a shipment with a given shipment ID or tracking number

REQUEST
{
  "cancel": {
    "shipping_account": 5707702298738688,
    "carrier": "fedex",
    "tracking_number": "794689603503"
  }
}
RESPONSE
{
    "success": {
        "message": "Shipment Delete was requested for a tracking number already in a deleted state."
    }
}
CURL
curl --request POST \ 
--url https://api.zenkraft.com/cancel\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/cancel'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/cancel";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/cancel') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/cancel"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/cancel', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
POST

/inbound

Get visibility of inbound services using UPS Quantum View and FedEx Insight

REQUEST
RESPONSE
CURL
curl --request POST \ 
--url https://api.zenkraft.com/inbound\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/inbound'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/inbound";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/inbound') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/inbound"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/inbound', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 
GET

/meta

Retrieve meta data about the available carriers, service types

URL format Response
/meta/carriers Returns a list of supported carriers
/meta/carrier/<carrier_slug> Returns all meta data for a given carrier e.g. /meta/carrier/fedex
REQUEST
RESPONSE
CURL
curl --request POST \ 
--url https://api.zenkraft.com/meta\ 
--header 'content-type: application/json' \ 
--header 'zkkey: XXXXXXXXXXXXXXXXXXXXXXX' \ 
--data '{"account": {"name", "Your name", "company": "Your company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
PYTHON
import requests
import json

endpoint = 'https://api.zenkraft.com/meta'

# JSON payload in request code tab
payload = {} 
r = requests.post(endpoint, data=payload)
resp = json.loads(r.text)
PHP
$url = "https://api.zenkraft.com/meta";
$method = "POST";
$headers = array(
    "content-type: application/json",
    "zkkey: XXXXXXXXXXXXXXXXXXXXXXX"
);
$body = '{"account": {"name", "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}';


$curl = curl_init();


curl_setopt_array($curl, array( 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_URL => $url,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body
));


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


curl_close($curl);


if ($err) {
	echo "Error:" . $err;
} else {
	echo $response;
}
RUBY
require 'uri' 
require 'net/http' 


url = URI('https://api.zenkraft.com/meta') 


http = Net::HTTP.new(url.host, url.port) 
http.use_ssl = true 


request = Net::HTTP::Post.new(url) 
request['zkkey'] = 'XXXXXXXXXXXXXXXXXXXXXXX' 
request['content-type'] = 'application/json' 
request.body = '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 


response = http.request(request) 
puts response.read_body 
JAVA
HttpClient httpClient = new DefaultHttpClient(); 


try { 
    HttpPost request = new HttpPost("https://api.zenkraft.com/meta"); 
    StringEntity params =new StringEntity("body={"account": {"name": "Your name","company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}"); 


    request.addHeader("content-type", "application/json"); 
    request.addHeader("zkkey", "XXXXXXXXXXXXXXXXXXXXXXX"); 
    request.setEntity(params); 
    HttpResponse response = httpClient.execute(request); 
    // handle response here... 
}catch (Exception ex) { 
    // handle exception here 
} finally { 
    httpClient.getConnectionManager().shutdown(); 
} 
NODE
var request = require("request"); 
var options = { 
	method: 'POST', 
    url: 'https://api.zenkraft.com/meta', 
    headers: { 
		'content-type': 'application/json', 
        'zkkey': 'XXXXXXXXXXXXXXXXXXXXXXX' 
	}, 
    body: '{"account": {"name": "Your name", "company": "You company","email": "example@example.com","org": "Organization","source": "My Website"}}' 
}; 


request(options, function (error, response, body) { 
    if (error) throw new Error(error); 
    console.log(body); 
}); 

Objects

Below are the objects defined.

rate_request

Field Type Required Min Length Max Length
rate True - -

track

Field Type Required Min Length Max Length
test boolean - -
tracking_number string True - -
carrier string True - -
shipping_account integer True - -

ship_request

Field Type Required Min Length Max Length
ship True - -

customs

For international shipments you can pass all the customs information through to the supported carriers using this object.

Field Type Required Min Length Max Length
items array - -
type_of_export string True - -
general_notes string - -
reason_for_export string True - -
terms_of_trade string True - -
signor - -

notifications

For carriers that allow you to set email/sms for notifications to your shippers.

Field Type Required Min Length Max Length
type string True - -
value string True - -

rate

Field Type Required Min Length Max Length
weight_units string True - -
packages array True - -
sender True - -
shipping_account integer True - -
recipient True - -
currency string True - -
carrier string True - -
dim_units string True - -
type string True - -

references

For carriers that allow you to add reference information to your shipment.

Field Type Required Min Length Max Length
type string True - -
value string True - -

ship

Definition of the shipment payload

Field Type Required Min Length Max Length
weight_units string True - -
label_type string True - -
service string True - -
shipping_account integer True - -
currency string True - -
delivery_instructions string - -
special_services array - -
recipient True - -
include_base64_label boolean - -
customs - -
ship_date string - -
test boolean - -
carrier string True - -
references array - -
packages array True - -
debug boolean - -
dim_units string True - -
type string True - -
documents array - -
notifications array - -
sender True - -

packages

We need to know the size and dimensions of your packages.

Field Type Required Min Length Max Length
width number - -
length number - -
value number - -
weight number True - -
height number - -

recipient

Definition of the recipient object

Field Type Required Min Length Max Length
city string True - 35
name string True - 35
street1 string True - 35
street2 string - 35
street3 string - 35
email string - -
phone string 10 15
state string - 35
postal_code string - 20
country string True 2 2
company string - 35

signor

For carriers that allow it we can automatically add your name, company logo and signature to any commercial documents

Field Type Required Min Length Max Length
signature string - -
name string True - -
title string - -

documents

For carriers that allow you to upload shipping forms and documents.

Field Type Required Min Length Max Length
company_logo string - -
signature_image string - -
type string True - -
generate boolean True - -

sender

Definition of the sender object

Field Type Required Min Length Max Length
city string True - 35
name string True - 35
street1 string True - 35
street2 string - 35
street3 string - 35
email string - -
phone string 10 15
state string - 35
postal_code string - 20
country string True 2 2
company string - 35

items

Field Type Required Min Length Max Length
description string True - -
weight number True - -
value number True - -
country_of_manufacture string True - -
hs_tariff_code string True - -
quantity integer True - -

error

Field Type Required Min Length Max Length
message string True - -
code integer True - -

special_services

For carriers that allow you to set special services such as insurance, dry ice, Collect on Delivery as well as many more.

Field Type Required Min Length Max Length
type string True - -
value string True - -

track_request

Field Type Required Min Length Max Length
track True - -

Service Types

Use within the "service_type" : "fedex_ground" parameter for ship requests.

Carrier Service Types
fedex_freight fedex_first_freight  fedex_freight_economy  fedex_freight_priority  international_freight_economy  international_freight_priority 
colis_prive
post_nl
ups_freight ups_freight_ltl  ups_freight_ltl_guaranteed  ups_freight_ltl_guaranteed_am  ups_standard_ltl 
dhl domestic_express_1200  b2c2  b2c3  jetline  sprintline  express_easy_7  express_easy_8  europack_9  breakbulk_express  medical_express_c  express_worldwide_d  express_900_e  freight_worldwide  domestic_economy_select  economy_select_h  domestic_express_900_i  jumbo_box  express_900  express_1030_l  express_1030_m  domestic_express  domestic_express_1030  express_worldwide_p  medical_express_q  globalmail_business  same_day  express_1200_t  express_worldwide_u  europack_v  economy_select_w  express_envelope  express_1200_y 
poste_haste
fedex fedex_1_day_freight  fedex_2_day  fedex_2_day_am  fedex_2_day_freight  fedex_3_day_freight  fedex_express_saver  fedex_first_freight  fedex_freight_economy  fedex_freight_priority  fedex_ground  fedex_first_overnight  fedex_ground_home_delivery  fedex_priority_overnight  fedex_smart_post  fedex_standard_overnight  fedex_europe_first_international_priority  fedex_international_economy  fedex_international_economy_freight  fedex_international_first  fedex_international_priority  fedex_international_priority_freight  fedex_next_day_early_morning  fedex_next_day_mid_morning  fedex_next_day_afternoon  fedex_next_day_end_of_day  fedex_distance_deferred  fedex_next_day_freight 
interlink_express
parcelforce
uk_mail
new_zealand_post
star_track
australia_post express_post  parcel_post_w_signature  express_post_w_signature 
royal_mail dom_24  dom_48  dom_special_delivery_guaranteed  dom_tracked_24  dom_tracked_48  dom_standard_tariff_letters_1_class  dom_standard_tariff_letters_2_class 
aramex
colissimo
purolator purolator_express  purolator_express_1030am  purolator_express_9am  purolator_express_box  purolator_express_box_1030am  purolator_express_box_9am  purolator_express_box_evening  purolator_express_box_international  purolator_express_box_international_1030am  purolator_express_box_international_12pm  purolator_express_box_international_9am  purolator_express_box_us  purolator_express_box_us_1030am  purolator_express_box_us_12pm  purolator_express_box_us_9am  purolator_express_envelope  purolator_express_envelope_1030am  purolator_express_envelope_9am  purolator_express_envelope_evening  purolator_express_envelope_international  purolator_express_envelope_international_1030am  purolator_express_envelope_international_12pm  purolator_express_envelope_international_9am  purolator_express_envelope_us  purolator_express_envelope_us_1030am  purolator_express_envelope_us_12pm  purolator_express_envelope_us_9am  purolator_express_evening  purolator_express_international  purolator_express_international_1030am  purolator_express_international_12pm  purolator_express_international_9am  purolator_express_pack  purolator_express_pack_1030am  purolator_express_pack_9am  purolator_express_pack_evening  purolator_express_pack_international  purolator_express_pack_international_1030am  purolator_express_pack_international_12pm  purolator_express_pack_international_9am  purolator_express_pack_us  purolator_express_pack_us_1030am  purolator_express_pack_us_12pm  purolator_express_pack_us_9am  purolator_express_us  purolator_express_us_1030am  purolator_express_us_12pm  purolator_express_us_9am  purolator_ground  purolator_ground_1030am  purolator_ground_9am  purolator_ground_evening 
asendia
la_poste
usps_endicia priority_express  first  library_mail  media_mail  priority  parcel_select 
usps priority_mail_express  library_mail  media_mail  priority_mail  priority_mail_international 
menzies
apc_overnight
dpd parcel_sunday  swapit_sunday  swapit_sun_1200  swapit_sun_1030  freight_sunday  parcel_sun_1030  pallet_sunday  expresspak_sunday  dpd_express_parcel_ie2  parcel_two_day  parcel_next_day  parcel_dpd_1200  parcel_dpd_1030  parcel_timed  parcel_saturday  parcel_sat_1200  parcel_sat_1030  dpd_classic_parcel_d  home_delivery_evening  expresspak_sun_1030  freight_sun_1030  home_delivery_afternoon  pallet_sun_1030  parcel_sun_1200  dpd_express_document_ie2  freight_sun_1200  expresspak_next_day  expresspak_dpd_1200  expresspak_dpd_1030  expresspak_timed  expresspak_saturday  expresspak_sat_1200  expresspak_sat_1030  dpd_expresspak_d  swapit_two_day  swapit_next_day  swapit_dpd_1200  swapit_dpd_1030  swapit_timed  swapit_saturday  swapit_sat_1200  swapit_sat_1030  swapit_afternoon  dpd_air_express_ie2  expresspak_sun_1200  swapit_evening  reverse_it_next_day  reverse_it_two_day  dpd_direct_dpd_direct  homecall_homecall  dpd_air_classic_ie2_value  desk_to_desk_next_day  desk_to_desk_dpd_1200  desk_to_desk_dpd_1030  desk_to_desk_saturday  pallet_sun_1200  dpd_express_eu_ie2  pallet_two_day  pallet_next_day  pallet_dpd_1200  pallet_dpd_1030  pallet_timed  pallet_saturday  pallet_sat_1200  pallet_sat_1030  freight_two_day  freight_next_day  freight_dpd_1200  freight_dpd_1030  freight_timed  freight_saturday  freight_sat_1200  freight_sat_1030  parcel_ship2shop  dpd_expresspak_d_b2c_psd  parcel_d_b2c_psd 
tnt_uk express 
gls
ups next_day_air  2nd_day_air  ground  express  expedited  ups_standard  3_day_select  next_day_air_saver  ups_next_day_air_early  express_plus  2nd_day_air_a.m.  ups_saver  ups_access_pointtm_economy  first_class_mail  priority_mail  expedited_maii_innovations  priority_mail_innovations  economy_mail_innovations  ups_today_standard  ups_today_dedicated_courier  ups_today_intercity  ups_today_express  ups_today_express_saver  ups_worldwide_express_freight 
yodel yodel_24  yodel_48  yodel_world_economy 

Packaging Types

Use within the "packaging_type" : "fedex_box" parameter for ship requests.

Carrier Packaging Types
fedex_freight bag  barrel  basket  box  bucket  bundle  carton  case  container  crate  cylinder  drum  envelope  hamper  other  pail  pallet  piece  reel  roll  skid  tank  tube 
colis_prive Packaging Type Not Required
post_nl Packaging Type Not Required
ups_freight bag  bale  barrel  bundle  bin  box  basket  bunch  cabinet  can  carrier  case  carboy  container  crate  cask  carton  cylinder  drum  loose  other  pail  pieces  package  pipe_line  pallet  rack  reel  roll  skid  spool  tube  tank  unit  van_pack  wrapped 
dhl jumbo_document  customer-provided_dc_document  dhl_flyer  domestic  express_document  dhl_express_envelope_fr_freight  jumbo_box  jumbo_junior_document_jj_junior_jumbo_box  jumbo_junior_parcel  other_dhl_packaging_pa_parcel  your_packaging  jumbo_parcel 
poste_haste Packaging Type Not Required
fedex fedex_10kg_box  fedex_25kg_box  fedex_box  fedex_envelope  fedex_pak  fedex_tube  your_packaging 
interlink_express Packaging Type Not Required
parcelforce Packaging Type Not Required
uk_mail Packaging Type Not Required
new_zealand_post Packaging Type Not Required
star_track Packaging Type Not Required
australia_post your_packaging 
royal_mail dom_large_letter  dom_letter  dom_letterbox  dom_packet  dom_parcel 
aramex Packaging Type Not Required
colissimo Packaging Type Not Required
purolator express_envelope  express_pack  customer_packaging  express_box 
asendia Packaging Type Not Required
la_poste Packaging Type Not Required
usps_endicia card  letter  flat  parcel  large_parcel  irregular_parcel  flat_rate_envelope  flat_rate_legal_envelope  flat_rate_padded_envelope  flat_rate_gift_card_envelope  flat_rate_window_envelope  flat_rate_cardboard_envelope  small_flat_rate_envelope  small_flat_rate_box  medium_flat_rate_box  large_flat_rate_box  dvd_flat_rate_box  large_video_flat_rate_box  large_flat_rate_board_game_box  regional_rate_box_a  regional_rate_box_b 
usps card  letter  flat  parcel  large_parcel  irregular_parcel  flat_rate_envelope  flat_rate_legal_envelope  flat_rate_padded_envelope  flat_rate_gift_card_envelope  flat_rate_window_envelope  flat_rate_cardboard_envelope  small_flat_rate_envelope  small_flat_rate_box  medium_flat_rate_box  large_flat_rate_box  dvd_flat_rate_box  large_video_flat_rate_box  large_flat_rate_board_game_box  regional_rate_box_a  regional_rate_box_b 
menzies Packaging Type Not Required
apc_overnight Packaging Type Not Required
dpd your_packaging 
tnt_uk your_packaging 
gls Packaging Type Not Required
ups ups_letter  your_packaging  tube  pak  ups_express_box  ups_25kg_box  ups_10kg_box  pallet  small_express_box  medium_express_box  large_express_box  flats  parcels  bpm  first_class  priority  machinables  irregulars  parcel_post  bpm_parcel  media_mail  bpm_flat  standard_flat 
yodel your_packaging 

Special Services

Carrier Packaging Types
fedex_freight hold_at_fedex_location  blind_shipment  broker_select_option  call_before_delivery  cod  cod_remittance  custom_delivery_window  cut_flowers  dangerous_goods  delivery_on_invoice_acceptance  detention  do_not_break_down_pallets  do_not_stack_pallets  dry_ice  east_coast_special  electronic_trade_documents  event_notification  exclude_from_consolidation  exclusive_use  exhibition_delivery  exhibition_pickup  expedited_alternate_delivery_route  expedited_one_day_earlier  expedited_service_monitoring_and_delivery  expedited_standard_day_early_delivery  extra_labor  extreme_length  fedex_one_rate  flatbed_trailer  food  freight_guarantee  freight_to_collect  future_day_shipment  hold_at_location  holiday_delivery  holiday_guarantee  home_delivery_premium  inside_delivery  inside_pickup  international_controlled_export_service  international_mail_service  international_traffic_in_arms_regulations  liftgate_delivery  liftgate_pickup  limited_access_delivery  limited_access_pickup  marking_or_tagging  non_business_time  pallet_shrinkwrap  pallet_weight_allowance  pallets_provided  pending_complete  pending_shipment  permit  pharmacy_delivery  poison  port_delivery  port_pickup  pre_delivery_notification  pre_eig_processing  pre_multiplier_processing  protection_from_freezing  regional_mall_delivery  regional_mall_pickup  return_shipment  returns_clearance  returns_clearance_special_routing_required  saturday_delivery  saturday_pickup  shipment_assembly  sort_and_segregate  special_delivery  special_equipment  storage  sunday_delivery  third_party_consignee  top_load  usps_delivery  usps_pickup  weighing 
colis_prive
post_nl
ups_freight
dhl saturday_delivery  duties_and_taxes_paid  lithium_ion_pi965_section_ii  dry_ice_un1845  lithium_ion_pi965_966_section_ii  dangerous_goods  perishable_cargo  excepted_quantity  consumer_commodities  lithium_metal_pi969_section_ii  lithium_ion_pi967_section_ii  lithium_metal_pi970_section_ii  biological_un3373  residential_delivery  no_signature_required  data_staging_03  neutral_delivery  insurance  paperless_trade 
poste_haste
fedex
interlink_express
parcelforce
uk_mail
new_zealand_post
star_track
australia_post
royal_mail
aramex
colissimo
purolator
asendia
la_poste
usps_endicia delivery_confirmation  signature_confirmation  certified_mail  registered_mail  insured_mail  cod  hold_for_pickup  open_and_distribute  restricted_delivery  return_receipt  electronic_return_receipt  adult_signature  adult_signature_restricted_delivery  am_delivery  special_contents  live_animal_surcharge 
usps
menzies
apc_overnight
dpd
tnt_uk
gls
ups
yodel

Label Types

Use within the "label_type" : "pdf" parameter for ship requests.

Carrier Label Types
fedex_freight PDF  PNG  EPL2  ZPLII 
colis_prive
post_nl
ups_freight PDF 
dhl EPL2  ZPL2  PDF 
poste_haste
fedex PDF  PNG  EPL2  ZPLII 
interlink_express
parcelforce
uk_mail
new_zealand_post
star_track
australia_post PDF 
royal_mail PDF  PNG 
aramex
colissimo
purolator PDF  ZPL  DPL  EPL 
asendia
la_poste
usps_endicia EPL2  ZPLII  GIF  JPEG  PNG  PDF 
usps EPL2  ZPLII  GIF  JPEG  PNG  PDF 
menzies
apc_overnight
dpd CLP  EPL  HTML  PDF 
tnt_uk HTML  PDF 
gls
ups EPL  ZPL  GIF 
yodel

Reference Types

Carrier Reference Types
fedex_freight customer_reference 
colis_prive
post_nl
ups_freight
dhl
poste_haste
fedex customer_reference  department_number  invoice_number  p_o_number  rma_number 
interlink_express
parcelforce
uk_mail
new_zealand_post
star_track
australia_post customer_reference_1  customer_reference_2 
royal_mail invoice_number 
aramex
colissimo
purolator
asendia
la_poste
usps_endicia
usps
menzies
apc_overnight
dpd reference_number_1  reference_number_2  reference_number_3 
tnt_uk
gls
ups accounts_receivable_customer_account  appropriation_number  bill_of_lading_number  collect_on_delivery_cod_number  dealer_order_number  department_number  employer’s_id_number  federal_taxpayer_id_no  food_and_drug_administration_fda_product_code  invoice_number  manifest_key_number  model_number  part_number  production_code  purchase_order_number  purchase_request_number  return_authorization_number  salesperson_number  serial_number  social_security_number  store_number  transaction_reference_number 
yodel

Authentication

Autentication is via a simple HTTP header: zkkey : {your_api_key}

You can obtain an API key by emailing support@zenkraft.com or using live chat

Errors

Errors are provided in the format:

{ "error": { "message": "The sender email address is not valid." } }
RESPONSE
{
    "error": {
        "message": "The sender email address is not valid."
    }
}