注文と作成時の配送業者詳細を取得する
curl --request GET \
--url https://api.flexforwardship.com/orders/{orderId} \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.flexforwardship.com/orders/{orderId}"
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/orders/{orderId}', 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/orders/{orderId}",
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/orders/{orderId}"
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/orders/{orderId}")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexforwardship.com/orders/{orderId}")
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{
"order": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "created",
"exceptionState": null,
"exceptionStateAt": "2023-11-07T05:31:56Z",
"exceptionReason": "<string>",
"courier": "yunexpress-tw",
"customerOrderNumber": "N2026-05-13-TEST-01",
"courierOrderNumber": "<string>",
"courierTrackingNumber": "<string>",
"serviceProductCode": "<string>",
"shipToCountryCode": "<string>",
"shipToPostalCode": "<string>",
"shipFromCountryCode": "<string>",
"parcelMeasurements": {
"weightUnit": "<string>",
"dimensionUnit": "<string>",
"parcels": [
{
"parcelId": "<string>",
"weight": 123,
"dimension": {
"length": 123,
"width": 123,
"height": 123
}
}
]
},
"maskedRecipientName": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z"
},
"carrierDetails": {
"integration": "yunexpress",
"orderNumbers": {
"platformOrderNumber": "<string>",
"trackingNumber": "<string>",
"referenceNumbers": [
"<string>"
]
},
"customs": {
"taxNumber": "<string>",
"ioss": "<string>",
"vat": "<string>",
"eori": "<string>"
},
"iossApplied": "<string>",
"serviceOptions": [
{
"code": "<string>",
"value": "<string>",
"cost": 123
}
],
"courierOptions": {
"sourceCode": "<string>",
"platformAccountCode": "<string>",
"sensitiveType": "<string>",
"signatureService": "<string>",
"houseNumber": "<string>",
"packageCount": 123,
"senderUsci": "<string>",
"platformName": "<string>",
"platformState": "<string>",
"platformAddress": "<string>",
"platformPostalCode": "<string>",
"platformPhone": "<string>",
"platformEmail": "<string>",
"platformSalesUrl": "<string>",
"cargoType": "<string>",
"paymentPlatform": "<string>",
"paymentPlatformAccount": "<string>",
"paymentTransactionNumber": "<string>",
"labelUrl": "<string>"
}
}
}{
"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": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}注文
注文と作成時の配送業者詳細を取得する
認証済みアカウントに属する注文 1 件を、ラベル作成時に指定された配送業者依存の詳細情報とあわせて返します。ラベル文書のみを返す GET /labels/:id を補完するエンドポイントです。
GET
/
orders
/
{orderId}
注文と作成時の配送業者詳細を取得する
curl --request GET \
--url https://api.flexforwardship.com/orders/{orderId} \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>'import requests
url = "https://api.flexforwardship.com/orders/{orderId}"
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/orders/{orderId}', 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/orders/{orderId}",
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/orders/{orderId}"
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/orders/{orderId}")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexforwardship.com/orders/{orderId}")
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{
"order": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"status": "created",
"exceptionState": null,
"exceptionStateAt": "2023-11-07T05:31:56Z",
"exceptionReason": "<string>",
"courier": "yunexpress-tw",
"customerOrderNumber": "N2026-05-13-TEST-01",
"courierOrderNumber": "<string>",
"courierTrackingNumber": "<string>",
"serviceProductCode": "<string>",
"shipToCountryCode": "<string>",
"shipToPostalCode": "<string>",
"shipFromCountryCode": "<string>",
"parcelMeasurements": {
"weightUnit": "<string>",
"dimensionUnit": "<string>",
"parcels": [
{
"parcelId": "<string>",
"weight": 123,
"dimension": {
"length": 123,
"width": 123,
"height": 123
}
}
]
},
"maskedRecipientName": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z"
},
"carrierDetails": {
"integration": "yunexpress",
"orderNumbers": {
"platformOrderNumber": "<string>",
"trackingNumber": "<string>",
"referenceNumbers": [
"<string>"
]
},
"customs": {
"taxNumber": "<string>",
"ioss": "<string>",
"vat": "<string>",
"eori": "<string>"
},
"iossApplied": "<string>",
"serviceOptions": [
{
"code": "<string>",
"value": "<string>",
"cost": 123
}
],
"courierOptions": {
"sourceCode": "<string>",
"platformAccountCode": "<string>",
"sensitiveType": "<string>",
"signatureService": "<string>",
"houseNumber": "<string>",
"packageCount": 123,
"senderUsci": "<string>",
"platformName": "<string>",
"platformState": "<string>",
"platformAddress": "<string>",
"platformPostalCode": "<string>",
"platformPhone": "<string>",
"platformEmail": "<string>",
"platformSalesUrl": "<string>",
"cargoType": "<string>",
"paymentPlatform": "<string>",
"paymentPlatformAccount": "<string>",
"paymentTransactionNumber": "<string>",
"labelUrl": "<string>"
}
}
}{
"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": "Shipping account not found",
"code": "COURIER_ERROR"
}{
"error": "Shipping account not found",
"code": "COURIER_ERROR"
}