correiosApi
1.0.0
如何使用
例子
HTTP 取得
NODEJS - HTTP 原生
NODEJS - 使用請求
NODEJS - 使用 UNIREST
C# 使用 RESTSHARP
JAVA - 使用 UNIREST
PHP 捲曲
PYTHON 請求
紅寶石
迅速
去
答案
200
404
BASEURL:https://api.linketrack.com/track/json
參數:
使用者: 使用者名稱
令牌:使用者令牌
代碼:訂單追蹤代碼
下面的範例使用測試使用者。若要請求新使用者和令牌,請發送電子郵件至 [email protected]
GET https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&codigo=LX002249507BR
https://github.com/Diaszano/linketrackjs -> 由@diaszano 創建的非官方客戶端
var https = require('follow-redirects').https;var fs = require('fs');var options = { '方法':'獲取', '主機名稱': 'api.linketrack.com', '路徑': '/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&codigo=LX002249507BR' '標題':{ }, 'maxRedirects': 20};var req = https.request(選項, 函數 (res) { var 塊 = []; res.on("data", function (chunk) {chunks.push(chunk); }); res.on("end", function (chunk) {var body = Buffer.concat(chunks);console.log(body.toString()); }); res.on("錯誤", 函數(錯誤) {console.error(錯誤); });});req.end();
var request = require('request');var options = { '方法':'獲取', 'url': 'https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&codigo=LX0007,507BRaa' '標題':{ }};請求(選項,函數(錯誤,回應){ 如果(錯誤)拋出新的錯誤(錯誤); console.log(response.body);});
var unirest = require('unirest');var req = unirest('GET', 'https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&codigo=LX0020de9a5aa619f29a83f&codigo=LX022) .end(function (res) { if (res.error) throw new Error(res.error); console.log(res.raw_body); });
var client = new RestClient("https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886a541a8a9671ad1434c599dbaa0a0de9a541a8a9671ad1434c599dbaa0a0de9a541a8a9671ad1434c599dbaa0a0de9a541a8a9671ad1d -1;var request = new RestRequest(Method.GET);IRestResponse response = client.Execute(request);Console.WriteLine(response.Content);
Unirest.setTimeouts(0, 0);HttpResponse<String> 回應 = Unirest.get("https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&cod .asString();
OkHttpClient 用戶端 = new OkHttpClient().newBuilder() .build();Request request = new Request.Builder() .url("https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&codigo=LX007) .method("GET", 空) .build();回應response = client.newCall(request).execute();
<?php$curl = curl_init();curl_setopt_array($curl, array( CURLOPT_URL => “https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&codigo=LX00a0de9a5aa619f29a83f&co d CURLOPT_ENCODING =>“”,CURLOPT_MAXREDIRS => 10,CURLOPT_TIMEOUT => 0,CURLOPT_FOLLOWLOCATION => true,CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,CURLOST_CUSTGESS4 ));$response = curl_exec($curl);curl_close($curl);echo $response;
導入 requestsurl = "https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886641a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&co599 {}response = requests.request("GET", url, headers=headers, data = Payload)print(response.text.encode('utf8'))
需要「uri」需要「net/http」url = URI("https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&httpsdigo=LX000007BR Net::HTTP.new(url.host, url.port);https.use_ssl = truerequest = Net::HTTP::Get.new(url)response = https.request(request)puts response.read_body
import Foundationvar semaphore = DispatchSemaphore (值: 0)var request = URLRequest(url: URL(字串: “https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c599dbaa0a0de9a5aa619f29a83f&codigo=超隔時間” Double.infinity)request.httpMethod = "GET"let task = URLSession.shared.dataTask(with: request) { 資料、回應、錯誤 Guard let data = data else {print(String(描述:錯誤))return } 列印(字串(數據:數據,編碼:.utf8)!) semaphore.signal()}task.resume()semaphore.wait()
套件 mainimport(“fmt” “網路/http” "io/ioutil")func main() { url := "https://api.linketrack.com/track/json?user=teste&token=1abcd00b2731640e886fb41a8a9671ad1434c5999dbdb0a0de955061450 方法:=“獲取” 客戶端 := &http.Client { } req, err := http.NewRequest(method, url, nil) if err != nil {fmt.Println(err) } res, err := client.Do(req) defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) fmt.Println(string(body)) }
️ subStatus
欄位的值會根據追蹤來源的不同而變化,不應被考慮:該欄位將來將不再使用!
{“代碼”:“LX002249507BR”,“服務”:“PAC-經濟秩序”,“主機”:“dw”,“數量”:12,“事件”:[ { "date": "10/24/2019", "time": "10:40", "location": "CURITIBA/PR", "status": "由 IRS 授權回傳", "subStatus": [ “由CENTRO INTERNACIONAL PR 註冊- CURITIBA/PR”] }, { "date": "11/09/2019", "time": "00:00", "location": "CURITIBA/PR", "status": "未按時付款", "subStatus": [ “目標分析下的對象”] }, { "date": "08/15/2019", "time": "13:37", "location": "CURITIBA/PR", "status": "轉送至海關檢查", "subStatus": ["由CENTRO INTERNACIONAL PR 註冊- CURITIBA/PR"] }, { "date": "13/08/2019", "time": "16:53", "location": "CURITIBA/PR", "status": "轉送至海關檢查", "subStatus": ["由CENTRO INTERNACIONAL PR 註冊- CURITIBA/PR"] }, { "date": "13/08/2019", "time": "16:13", "location": "CURITIBA/PR", "status": "轉送海關檢查", "subStatus": ["由CENTRO INTERNACIONAL PR 註冊- CURITIBA/PR"] }, { "date": "13/08/2019", "time": "14:34", "location": "CURITIBA/PR", "status": "轉送海關檢查", "subStatus": ["由CENTRO INTERNACIONAL PR 註冊- CURITIBA/PR"] }, { "date": "09/08/2019", "time": "18:11", "location": "CURITIBA/PR", "status": "等待付款", "subStatus": ["<span class="minhasImportacoes">訪問環境<a href="https://www.correios.com.br/encomendas-logistica/minhas-importacoes/minhas-importacoes" target="_blank">Minhas Importações</a></span>"] }, { "date": "09/08/2019", "time": "15:23", "location": "CURITIBA/PR", "status": "轉送至海關檢查", "subStatus": ["由CENTRO INTERNACIONAL PR 註冊- CURITIBA/PR"] }, { "date": "08/09/2019", "time": "12:22", "location": "CURITIBA/PR", "status": "轉送的物件", "subStatus": ["來自CENTER國際公關 - 庫里蒂巴/海關檢查公關 - /BR"] }, { "date": "09/08/2019", "time": "12:22", "location": "CURITIBA/PR", "status": "轉送海關檢查", "subStatus": ["由CENTRO INTERNACIONAL PR 註冊- CURITIBA/PR"] }, { "date": "07/31/2019", "time": "15:10", "location": "CURITIBA/PR", "status": "正在分析中的客戶提供的資訊", "subStatus " : [「由 CENTRO INTERNACIONAL PR - CURITIBA/PR 註冊」] }, { "date": "31/07/2019", "time": "14:15", "location": "CURITIBA/PR", "status": "資訊遺失。您需要採取行動", "subStatus " : ["<span class="minhasImportacoes">訪問環境<a href="https://www.correios.com.br/encomendas-logistica/minhas-importacoes/minhas-importacoes" target="_blank">Minhas Importações</a></span>"] } ], }
{“代碼”:“AA123123123BR”,“服務”:“SEDEX - Encomenda Expressa”,“主機”:“dw”,“quantidade”:0,“eventos”:[ ], }
奇皮圖克斯
麻省理工學院