ラベル ID または顧客注文番号でラベル URL を取得する
curl --request GET \
--url https://api.flexforwardship.com/labels/{id} \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.flexforwardship.com/labels/{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/labels/{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/labels/{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/labels/{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/labels/{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/labels/{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",
"customerOrderNumber": "N2026-05-13-TEST-01",
"url": "https://label-cdn.yunexpress.cn/labels/YT2503010001.pdf",
"labelFormat": "pdf"
}{
"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"
}ラベル
ラベル ID または顧客注文番号でラベル URL を取得する
以前に作成したラベルのラベルドキュメント URL を取得します。ラベル UUID、customerOrderNumber、またはカンマ区切りの識別子をパスパラメータとして指定できます。一括リクエストでは、見つからない、または失敗したラベルは省略されます。
GET
/
labels
/
{id}
ラベル ID または顧客注文番号でラベル URL を取得する
curl --request GET \
--url https://api.flexforwardship.com/labels/{id} \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.flexforwardship.com/labels/{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/labels/{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/labels/{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/labels/{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/labels/{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/labels/{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",
"customerOrderNumber": "N2026-05-13-TEST-01",
"url": "https://label-cdn.yunexpress.cn/labels/YT2503010001.pdf",
"labelFormat": "pdf"
}{
"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レスポンス
Default Response
- Option 1
- Option 2
ラベルドキュメント取得結果。
ラベル識別子。
例:
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
このラベルに関連付けられた顧客注文番号。
Minimum string length:
1例:
"N2026-05-13-TEST-01"
ラベルドキュメントのダウンロード URL。
例:
"https://label-cdn.yunexpress.cn/labels/YT2503010001.pdf"
ドキュメント形式(pdf または png)。
Minimum string length:
1例:
"pdf"