C# Class Example 

  • The class of api
    //www.trackingmore.com/api-class_csharp.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
    string urlStr = "?page=1&limit=25&created_at_min=1441314361&created_at_max=1477308420";
    string requestData = null;
    String result = new Tracker().getOrderTracesByJson(requestData, urlStr, "get");
    
    Create a tracking item
    string urlstr = null;
    string requestdata = "{\"tracking_number\": \"1047435553720\",\"carrier_code\":\"china-ems\"}";
    string result = new Tracker().getOrderTracesByJson(requestdata, urlstr, "post");
    
    Create multiple trackings.
    string urlstr = null;
    string requestdata = "[{\"tracking_number\": \"1047435554520\",\"carrier_code\":\"china-ems\"},{\"tracking_number\": \"1047435555420\",\"carrier_code\":\"china-ems\"}]";
    string result = new Tracker().getOrderTracesByJson(requestdata, urlstr, "batch");
    
    Get tracking results of a single tracking.
    string urlStr = "/wishpost/82196269752";
    string requestData = null;
    String result = new Tracker().getOrderTracesByJson(requestData, urlStr, "codeNumberGet");
    
    Update Tracking item
    string urlStr = "/wishpost/82196269752";
    string requestData = "{\"title\": \"test\",\"customer_name\":\"abner\",\"customer_email\":\"[email protected]\",\"order_id\":\"#123123\"}";
    String result = new Tracker().getOrderTracesByJson(requestData, urlStr, "codeNumberPut");
    
    Delete a tracking item
    string urlStr = "/4px/RF421899730CN";
    string requestData = null;
    String result = new Tracker().getOrderTracesByJson(requestData, urlStr, "codeNumberDel");
    
    Get realtime tracking results of a single tracking
    string urlstr = null;
    string requestdata = "{\"tracking_number\": \"RF421899728SG\",\"carrier_code\":\"4px\"}";
    String result = new Tracker().getOrderTracesByJson(requestdata, urlstr, "realtime");