TrackingMore API

Nodejs Example 

  • Klasa api
    //www.trackingmore.com/api-class_nodejs.html

        Installation:
            1. Download this funtion to desired location
            2. Fill in Trackingmore-Api-Key in this function in line 'Trackingmore-Api-Key' = 'YOUR API KEY';
            3. Require this function in your project.


    Lista wszystkich przewoźników
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/carriers/';
    sentRes(url,postData,"GET",function(data){
        console.log(data);
    });
    
    Detect a carrier by tracking code
    var postData = {"tracking_number":"RA018458445JP"};
    var url      = 'http://api.trackingmore.com/v2/carriers/detect';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    Lista wszystkich trackings
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/get?page=1&limit=25&created_at_min=1521314361&created_at_max=1541314361&update_time_min=1521314361&update_time_max=1541314361&order_created_time_min=1521314361&order_created_time_max=1541314361&lang=cn';
    sentRes(url,postData,"GET",function(data){
        console.log(data);
    });
    
    Tworzenie elementu śledzenia
    var postData = {"tracking_number": "BYS006086079","carrier_code":"yanwen","title":"chase chen","customer_name":"chase","customer_email":"[email protected]","order_id":"#123","order_create_time":"2018-05-11 12:00","destination_code":"IL","tracking_ship_date":"1521314361","tracking_postal_code":"13ES20","lang":"en","logistics_channel":"4PX挂号小包"};
    var url      = 'http://api.trackingmore.com/v2/trackings/post';
    sentRes(url,postData,"post",function(data){
        console.log(data);
    });
    
    Tworzenie wielu trackings.
    var postData = [
        {"tracking_number": "BYS006086088","carrier_code":"yanwen","title":"chase chen","customer_name":"chase","customer_email":"[email protected]","order_id":"#123","order_create_time":"2018-05-11 12:00","destination_code":"IL","tracking_ship_date":"1521314361","tracking_postal_code":"13ES20","lang":"en","logistics_channel":"4545454"},
        {"tracking_number": "BYS006086077","carrier_code":"yanwen","title":"chase chen","customer_name":"chase","customer_email":"[email protected]","order_id":"#123","order_create_time":"2018-05-10 12:00","destination_code":"IL","tracking_ship_date":"1521314361","tracking_postal_code":"13ES20","lang":"en","logistics_channel":"4PX挂号小包"}
        ];
    var url      ='http://api.trackingmore.com/v2/trackings/batch';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    Dostać, śledzenie wyników jeden śledzenia.
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/yanwen/BYS006086075/cn';
    sentRes(url,postData,"GET",function(data){
        console.log(data);
    });
    
    Aktualizacja śledzenie zapasu
    var postData = {"title": "nodejstest","customer_name":"test","customer_email":"[email protected]","order_id":"#123456","logistics_channel":"4PX挂号小包"};
    var url       = 'http://api.trackingmore.com/v2/trackings/yanwen/BYS006086075';
    sentRes(url,postData,"PUT",function(data){
        console.log(data);
    });
    
    Usuwanie elementu śledzenia
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/yanwen/BYS006086061';
    sentRes(url,postData,"DELETE",function(data){
      console.log(data);
    });
    
    Wyniki śledzenia w czasie rzeczywistym śledzenia jednego
    var postData = {"tracking_number": "RO454978816CN","carrier_code":"china-post","destination_code": "United States","tracking_ship_date":"deutsch-post","tracking_postal_code":"postnl-3s","specialNumberDestination":"postnl-3s","order":"#123123","order_create_time":"1521314361","lang":"en"};
    var url      = 'http://api.trackingmore.com/v2/trackings/realtime';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    Usuwanie wielu śledzenie zapasu
    var postData = [
        {"tracking_number":"DD18051202433","carrier_code":"aramex"},
        {"tracking_number":"BYS006086093","carrier_code":"yanwen"}
        ];
    var url      = 'http://api.trackingmore.com/v2/trackings/delete';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    Zmodyfikować kod, kurier
    var postData = {"tracking_number":"BYS006086093","carrier_code":"dhl","update_carrier_code":"yanwen"};
    var url      = 'http://api.trackingmore.com/v2/trackings/update';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    uzyskać informacje
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/getuserinfo';
    sentRes(url,postData,"GET",function(data){
        console.log(data);
    });
    
    Uzyskaj numer stanu
    var postData = null;
    var url      = 'http://api.trackingmore.com/v2/trackings/getstatusnumber?created_at_min=1521314361&created_at_max=1541314361&order_created_time_min=1521314361&order_created_time_max=1541314361';
    sentRes(url,postData,"GET",function(data){
        console.log(data);
    });
    
    Partia nie po to, aby zaktualizować elementu śledzenia
    var postData = [
        {"tracking_number":"UD990910510CN","carrier_code":"wishpost"},
        {"tracking_number":"UX311201372CH","carrier_code":"yanwen"}
        ];
    var url      = 'http://api.trackingmore.com/v2/trackings/notupdate';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    Sprawdź, jeśli przesyłka jest wysyłana do zdalnego obszaru.
    var postData = [
        {"country":"CN","postcode":"400422","company":"dhl"},
        {"country":"CN","postcode":"412000","company":"dhl"}
        ];
    var url      = 'http://api.trackingmore.com/v2/trackings/remote';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    Kurier starzenia rezultaty
    var postData = [
        {"carrier_code":"dhl","destination":"US","original":"CN"},
        {"carrier_code":"dhl","destination":"RU","original":"CN"}
        ];
    var url      = 'http://api.trackingmore.com/v2/trackings/costtime';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    
    Aktualizacja więcej śledzenie zapasu
    var postData = [
        {"tracking_number":"BYS006086092","carrier_code":"yanwen","title":"chase chen","customer_name":"chase","customer_email":"[email protected]","order_id":"#1234","destination_code":"IL","status":"4","logistics_channel":"4PX挂号小包"},
        {"tracking_number":"BYS006086093","carrier_code":"yanwen","title":"chase chen","customer_name":"chase","customer_email":"[email protected]","order_id":"#1234","destination_code":"IL","status":"4","logistics_channel":"4PX挂号小包"}
        ];
    var url      = 'http://api.trackingmore.com/v2/trackings/updatemore';
    sentRes(url,postData,"POST",function(data){
        console.log(data);
    });
    

Przekształć swój
Śledzenie przesyłki dzisiaj

Chcesz zautomatyzować aktualizacje przesyłek lub poprawić wydajność dostaw? Dzięki potężnemu interfejsowi API TrackingMore będziesz mieć wszystkie narzędzia na wyciągnięcie ręki, aby przekształcić podróż klienta po zakupie.