Skip to content

Instantly share code, notes, and snippets.

{
"meta": {
"code": 401,
"error_message": "Invalid API Key.",
"error_type": "InvalidCredentials"
},
"data": {}
}
{
"meta": {
"code": 409,
"error_message": "slug: dhl tracking_number: 2185849691 is already exist.",
"error_type": "InvalidArgument"
},
"data": {
"tracking": {
"slug": "dhl",
"tracking_number": "2185849691"
{
"meta": {
"code": 500,
"error_message": "The server is down for maintenance.",
"error_type": "ServerMaintenance"
},
"data": {}
}
{
"tracking_number": "906587618687:DA15BU",
"title": "906587618687",
"origin_country_iso3": null,
"destination_country_iso3": null,
"shipment_package_count": 0,
"created_at": "2014-06-25T09:26:26+00:00",
"active": false,
"order_id": null,
{
"meta": {
"code": 200
},
"data": {
"tracking": {
"tracking_number": "RA123456543HK",
"slug": "hong-kong-post"
}
}
var exec = require('child_process').exec;
var fs = require('fs');
var util = require('util');
var http = require('http');
var url = require('url');
var PDFDocument = require('pdfkit'); // http://pdfkit.org/
http.createServer(function (req, res) {
@teddychan
teddychan / gist:cb8ee7ed6635c1de2c9d
Last active August 29, 2015 14:02
v4-res-get-couriers.json
{
"meta": {
"code": 200
},
"data": {
"total": 2,
"couriers": [
{
"slug": "dhl",
"name": "DHL",
@teddychan
teddychan / gist:86fd186266f75059feb9
Created June 20, 2014 03:31
v4-res-get-couriers-all.json
{
"meta": {
"code": 200
},
"data": {
"total": 190,
"couriers": [
{
"slug": "india-post-int",
"name": "India Post International",
{
"meta": {
"code": 200
},
"data": {
"total": 2,
"couriers": [
{
"slug": "fedex",
"name": "FedEx",
{
"tracking":
{
"tracking_number": "906587618687",
"tracking_postal_code": "DA15BU",
"tracking_ship_date": "20131231",
"tracking_account_number": "1234567890",
"slug": ["dhl","ups","fedex"]
}