TrackingMore API

Nodejs Example 

  • The class of api
    //www.trackingmore.com/api-class_nodejs.html

        Installation:
            1. Download this Class to desired location
            2. Fill in Trackingmore-Api-Key in this Class in line "protected $apiKey = 'YOUR API KEY';"
            3. Require this class in your project.


    List all trackings
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/get?page=1&limit=25&created_at_min=1441314361&created_at_max=1477460736';
    sentRes(url,postData,"GET",function(data){
    console.log(data);
    });
    
    Create a tracking item
    var postData = {"tracking_number": "BYS006086075","carrier_code":"yanwen"};
    var url      = 'http://api.trackingmore.com/v2/trackings/post';
    sentRes(url,postData,"POST",function(data){
      console.log(data);
    }); 
    
    Create multiple trackings.
    var postData = [{"tracking_number": "BYS006086092","carrier_code":"yanwen"},{"tracking_number": "BYS006086089","carrier_code":"yanwen"}];
    var url      ='http://api.trackingmore.com/v2/trackings/batch';
    sentRes(url,postData,"POST",function(data){
      console.log(data);
    });
    
    Get tracking results of a single tracking.
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/yanwen/BYS006086075';
    sentRes(url,postData,"GET",function(data){
      console.log(data);
    });
    
    Update Tracking item
    var postData = {"title": "nodejstest","customer_name":"test","customer_email":"[email protected]","order_id":"#123456"};
    var url       = 'http://api.trackingmore.com/v2/trackings/yanwen/BYS006086075';
    sentRes(url,postData,"PUT",function(data){
      console.log(data);
    });
    
    Delete a tracking item
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/yanwen/BYS006086061';
    sentRes(url,postData,"DELETE",function(data){
      console.log(data);
    });
    
    Get realtime tracking results of a single tracking
    var postData = {"tracking_number": "LW505109082CN","carrier_code":"china-ems","destination_code": "United States","tracking_ship_date":"deutsch-post","tracking_postal_code":"postnl-3s","specialNumberDestination":"postnl-3s","order":"#123123"};
    var url      = 'http://api.trackingmore.com/v2/trackings/realtime';
    sentRes(url,postData,"POST",function(data){
      console.log(data);
    });
    
  • Facebook Twitter Android App Store
  • ©2014-2017 TrackingMore.All Rights Reserved.