get https://api.easyship.com/track/v1/checkpoints
##Request
curl --include \
--header "Authorization: Bearer 4e2b327e2ef5471885cd0bc50a0c9fe52481793bd309b2c4f2a6bdac3f10ae1f" \
'https://api.easyship.com/track/v1/checkpoints?easyship_shipment_id=&platform_order_number=&per_page=&page='
var request = require('request');
request({
method: 'GET',
url: 'https://api.easyship.com/track/v1/checkpoints?easyship_shipment_id=&platform_order_number=&per_page=&page=',
headers: {
'Authorization': 'Bearer 4e2b327e2ef5471885cd0bc50a0c9fe52481793bd309b2c4f2a6bdac3f10ae1f'
}}, function (error, response, body) {
console.log('Status:', response.statusCode);
console.log('Headers:', JSON.stringify(response.headers));
console.log('Response:', body);
});
require 'rubygems' if RUBY_VERSION < '1.9'
require 'rest_client'
headers = {
:authorization => 'Bearer 4e2b327e2ef5471885cd0bc50a0c9fe52481793bd309b2c4f2a6bdac3f10ae1f'
}
response = RestClient.get 'https://api.easyship.com/track/v1/checkpoints?easyship_shipment_id=&platform_order_number=&per_page=&page=', headers
puts response
from urllib2 import Request, urlopen
headers = {
'Authorization': 'Bearer 4e2b327e2ef5471885cd0bc50a0c9fe52481793bd309b2c4f2a6bdac3f10ae1f'
}
request = Request('https://api.easyship.com/track/v1/checkpoints?easyship_shipment_id=&platform_order_number=&per_page=&page=', headers=headers)
response_body = urlopen(request).read()
print response_body
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.easyship.com/track/v1/checkpoints?easyship_shipment_id=&platform_order_number=&per_page=&page=");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: Bearer 4e2b327e2ef5471885cd0bc50a0c9fe52481793bd309b2c4f2a6bdac3f10ae1f"
));
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
var request = new XMLHttpRequest();
request.open('GET', 'https://api.easyship.com/track/v1/checkpoints?easyship_shipment_id=&platform_order_number=&per_page=&page=');
request.setRequestHeader('Authorization', 'Bearer 4e2b327e2ef5471885cd0bc50a0c9fe52481793bd309b2c4f2a6bdac3f10ae1f');
request.onreadystatechange = function () {
if (this.readyState === 4) {
console.log('Status:', this.status);
console.log('Headers:', this.getAllResponseHeaders());
console.log('Body:', this.responseText);
}
};
request.send();
##Response
{
"total_page": 1,
"current_page": 1,
"shipments":
[
{
"easyship_shipment_id": "ESHK0001785",
"platform_order_number": "#1234",
"origin":"Hong Kong",
"destination":"United States",
"status":"Out For Delivery",
"tracking_number": "1234567890",
"tracking_page_url": "https://www.trackmyshipment.co/track-shipment/ESHK0001785",
"checkpoints":[
{
"order_number":115,
"handler":"Ups",
"message":"You package has been handed over to the courier",
"location":"Hollywood, FL, US",
"city":"Hollywood",
"country_name":null,
"country_iso3":"USA",
"coordinates":"[]",
"state":"FL",
"postal_code": null,
"checkpoint_time":"2016-08-05T09:20:00.000Z",
"primary_status": "Handed Over to Courier"
}
]
}
]
}