ラベルの追跡イベントを取得する
curl --request GET \
--url https://api.flexforwardship.com/tracking/{id} \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.flexforwardship.com/tracking/{id}"
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-rr-apikey': '<api-key>', 'x-rr-apitoken': '<api-key>'}
};
fetch('https://api.flexforwardship.com/tracking/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexforwardship.com/tracking/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexforwardship.com/tracking/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexforwardship.com/tracking/{id}")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexforwardship.com/tracking/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"trackingNumber": "YT2503010001CN",
"tag": "InTransit",
"subtag": "InTransit_001",
"subtagMessage": "In transit",
"slug": "yunexpress",
"checkpoints": [
{
"checkpointTime": "2025-03-02T10:30:00.000Z",
"city": "Shenzhen",
"state": "Guangdong",
"countryRegion": "CN",
"location": "<string>",
"message": "Shipment departed from sorting center",
"tag": "InTransit",
"subtag": "InTransit_001",
"subtagMessage": "In transit",
"slug": "yunexpress"
}
]
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Label creation failed",
"errorCode": "COURIER_ERROR",
"errorMessage": "Address validation failed"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}追跡
ラベルの追跡イベントを取得する
ラベルの現在の追跡状況とチェックポイント履歴を返します。ラベルの UUID または customerOrderNumber をパスパラメータとして指定できます。
GET
/
tracking
/
{id}
ラベルの追跡イベントを取得する
curl --request GET \
--url https://api.flexforwardship.com/tracking/{id} \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.flexforwardship.com/tracking/{id}"
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-rr-apikey': '<api-key>', 'x-rr-apitoken': '<api-key>'}
};
fetch('https://api.flexforwardship.com/tracking/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexforwardship.com/tracking/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexforwardship.com/tracking/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexforwardship.com/tracking/{id}")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexforwardship.com/tracking/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"trackingNumber": "YT2503010001CN",
"tag": "InTransit",
"subtag": "InTransit_001",
"subtagMessage": "In transit",
"slug": "yunexpress",
"checkpoints": [
{
"checkpointTime": "2025-03-02T10:30:00.000Z",
"city": "Shenzhen",
"state": "Guangdong",
"countryRegion": "CN",
"location": "<string>",
"message": "Shipment departed from sorting center",
"tag": "InTransit",
"subtag": "InTransit_001",
"subtagMessage": "In transit",
"slug": "yunexpress"
}
]
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Label creation failed",
"errorCode": "COURIER_ERROR",
"errorMessage": "Address validation failed"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}パスパラメータ
ラベルの UUID または顧客注文番号。
Minimum string length:
1レスポンス
荷物の追跡情報。
荷物の追跡情報。
ラベル識別子。
例:
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
配送業者が付与した追跡番号。未取得の場合は null。
例:
"YT2503010001CN"
上位レベルの追跡ステータス。取りうる値:Pending、InfoReceived、InTransit、Delivered、Exception、Cancelled、Unknown。
例:
"InTransit"
詳細ステータスサブタグ。
例:
"InTransit_001"
サブタグの人間が読める説明。
例:
"In transit"
配送業者スラッグ。
例:
"yunexpress"
時系列の追跡イベント一覧。
Show child attributes
Show child attributes