TrackingMore API

C# Class Example 

  • La classe API
    //www.trackingmore.com/api-class_csharp.html

    Installazione:
    1. Scarica questa classe in posizione desiderata
    2. riempimento in Trackingmore-Api-chiave di questa classe in linea "protetto $apiKey = 'Il TUO CHIAVE API';"
    3. richiedere questa classe nel progetto. Proprio come:
    require('/path/trackingmore/Class.php').


    Mostra tutti i vettori
    string urlStr = null;
    string requestData=null;
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"carriers");
    
    Detect a carrier by tracking code
    string urlStr = null;
    string requestData="{\"tracking_number\":\"EA152563251CN\"}";
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"carriers/detect");
    
    Mostra tutte le tracciature.
    string urlStr = "?page=1&limit=100&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&numbers=1212121,UG586285221CN&orders=123&lang=cn";
    string requestData = null;
    string result = new Tracker().getOrderTracesByJson(requestData, urlStr, "get");
    
    Crea un elemento di tracciatura.
    string urlstr = null;
    string requestdata = "{\"tracking_number\": \"EA152563254CN\",\"carrier_code\":\"china-ems\",\"title\":\"chase chen\",\"customer_name\":\"chase\",\"customer_email\":\"[email protected]\",\"order_id\":\"#123\",\"order_create_time\":\"2018-05-20 12:00\",\"destination_code\":\"IL\",\"tracking_ship_date\":\"1521314361\",\"tracking_postal_code\":\"13ES20\",\"lang\":\"en\",\"logistics_channel\":\"4PX page\"}";
    string result = new Tracker().getOrderTracesByJson(requestdata, urlstr, "post");
    
    Crea elementi di tracciatura multipli.
    string urlstr = null;
    string requestdata = "[{\"tracking_number\": \"RM131516216CN\",\"carrier_code\":\"china-ems\",\"title\":\"chase chen\",\"customer_name\":\"chase\",\"customer_email\":\"[email protected]\",\"order_id\":\"#123444\",\"order_create_time\":\"2018-05-20 12:00\",\"destination_code\":\"IL\",\"tracking_ship_date\":\"1525314361\",\"tracking_postal_code\":\"13ES20\",\"lang\":\"en\",\"logistics_channel\":\"4PX page\"},{\"tracking_number\": \"RM111516216CN\",\"carrier_code\":\"china-ems\",\"title\":\"chase chen\",\"customer_name\":\"chase\",\"customer_email\":\"[email protected]\",\"order_id\":\"#123444\",\"order_create_time\":\"2018-05-20 12:00\",\"destination_code\":\"IL\",\"tracking_ship_date\":\"1521314361\",\"tracking_postal_code\":\"13ES20\",\"lang\":\"en\",\"logistics_channel\":\"4PX page1\"}]";
    string result = new Tracker().getOrderTracesByJson(requestdata, urlstr, "batch");
    
    Raccoglie il risultato di un singolo numero di tracciatura.
    string urlStr = "/wishpost/82196269752";
    string requestData = null;
    string result = new Tracker().getOrderTracesByJson(requestData, urlStr, "codeNumberGet");
    
    Aggiorna il codice di tracciatura.
    string urlStr = "/wishpost/82196269752";
    string requestData = "{\"title\": \"testtitle\",\"customer_name\":\"c#test\",\"customer_email\":\"94[email protected]\",\"order_id\":\"#1234567\",\"logistics_channel\":\"chase chen c#\",\"customer_phone\":\"+86 13873399982\",\"destination_code\":\"US\",\"status\":\"7\"}";
    string result = new Tracker().getOrderTracesByJson(requestData, urlStr, "codeNumberPut");
    
    Elimina un codice di tracciatura.
    string urlStr = "/4px/RF421899730CN";
    string requestData = null;
    string result = new Tracker().getOrderTracesByJson(requestData, urlStr, "codeNumberDel");
    
    Raccoglie i risultati in tempo reale di una singola tracciatura.
    string urlstr = null;
    string requestdata = "{\"tracking_number\": \"61290983300030854514\",\"carrier_code\":\"fedex\",\"destination_code\":\"US\",\"tracking_ship_date\": \"20180226\",\"tracking_postal_code\":\"13ES20\",\"specialNumberDestination\":\"US\",\"order\":\"#123123\",\"order_create_time\":\"2018/3/27 16:51\",\"lang\":\"en\"}";
    string result = new Tracker().getOrderTracesByJson(requestdata, urlstr, "realtime");
    
    Eliminare più elemento di rilevamento
    string	urlStr =null;
    string requestData= "[{\"tracking_number\":\"EA152563242CN\",\"carrier_code\":\"china-ems\"},{\"tracking_number\":\"EA152563254CN\",\"carrier_code\":\"china-ems\"}]";
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"delete");
    
    Modificare il codice del corriere
    string	urlStr =null;
    string requestData="{\"tracking_number\": \"EA152563242CN\",\"carrier_code\":\"dhl\",\"update_carrier_code\":\"china-ems\"}";
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"update");
    
    ottenere informazioni utente
    string	urlStr =null;
    string requestData=null;
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"getuserinfo");
    
    Ottenere il numero di stato
    string	urlStr =null;
    string requestData=null;
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"getstatusnumber");
    
    Batch di non aggiornare l'elemento di rilevamento
    string	urlStr =null;
    string requestData= "[{\"tracking_number\":\"LK032051658CN\",\"carrier_code\":\"china-ems\"},{\"tracking_number\":\"EA166023092CN\",\"carrier_code\":\"china-ems\"}]";
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"notupdate");
    
    Controllare se una spedizione è inviata per zona remota.
    string	urlStr =null;
    string requestData= "[{\"country\":\"CN\",\"postcode\":\"400422\"},{\"country\":\"CN\",\"postcode\":\"412000\"}]";
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"remote");
    
    Ottenere corriere invecchiamento risultati
    string	urlStr =null;
    string requestData= "[{\"carrier_code\":\"dhl\",\"destination\":\"US\",\"original\":\"CN\"},{\"carrier_code\":\"dhl\",\"destination\":\"RU\",\"original\":\"CN\"}]";
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"costtime");
    
    Aggiornare più elemento di rilevamento
    string	urlStr =null;
    string requestData="[{\"tracking_number\":\"RM131516216CN\",\"carrier_code\":\"china-post\",\"title\": \"testtitle\",\"customer_name\":\"javatest\",\"customer_email\":\"[email protected]\",\"order_id\":\"#123\",\"logistics_channel\":\"chase chen\",\"destination_code\":\"US\",\"status\":\"7\"},{\"tracking_number\":\"RM111516216CN\",\"carrier_code\":\"china-post\",\"title\": \"testtitle\",\"customer_name\":\"javatest\",\"customer_email\":\"[email protected]\",\"order_id\":\"#123\",\"logistics_channel\":\"chase chen\",\"destination_code\":\"US\",\"status\":\"7\"}]";
    string result = new Tracker().getOrderTracesByJson(requestData,urlStr,"updatemore");
    

Porta la tua esperienza di tracciamento degli ordini post-acquisto alla classe successiva