配送会社API - WhereParcel
グローバル配送会社の情報、メタデータ、対応国を取得。国別・地域別・配送会社タイプ別にフィルタリング可能。無料APIエンドポイント。
GET
/v2/carriers 対応配送業者一覧の取得
概要
世界500社以上の配送業者の一覧とメタデータを取得します。無料APIで使用量は消費されません。
リクエスト例
curl -X GET https://api.whereparcel.com/v2/carriers \
-H "Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production" \
-H "Content-Type: application/json"const response = await fetch('https://api.whereparcel.com/v2/carriers', {
method: 'GET',
headers: {
"Authorization": "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = [
'Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);import requests
import json
url = 'https://api.whereparcel.com/v2/carriers'
headers = {
'Authorization': 'Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} 💡 注記: テスト用APIキーをダッシュボードで発行した実際のAPIキーに置き換えてください。
レスポンス
成功レスポンス (200)
200 OK
配送業者一覧の取得に成功しました
Response Body
{
"success": true,
"data": [
"kr.cj",
"kr.hanjin",
"kr.lotte",
"us.usps",
"us.fedex"
]
} エラーレスポンス (401)
401 Unauthorized
認証失敗
Response Body
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} GET
/v2/countries 対応国一覧の取得
概要
配送追跡に対応している国の一覧を取得します。無料APIで使用量は消費されません。
リクエスト例
curl -X GET https://api.whereparcel.com/v2/countries \
-H "Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production" \
-H "Content-Type: application/json"const response = await fetch('https://api.whereparcel.com/v2/countries', {
method: 'GET',
headers: {
"Authorization": "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/countries');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = [
'Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);import requests
import json
url = 'https://api.whereparcel.com/v2/countries'
headers = {
'Authorization': 'Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/countries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} 💡 注記: テスト用APIキーをダッシュボードで発行した実際のAPIキーに置き換えてください。
レスポンス
成功レスポンス (200)
200 OK
国一覧の取得に成功しました
Response Body
{
"success": true,
"data": [
"kr",
"us",
"jp",
"cn",
"de"
]
} エラーレスポンス (401)
401 Unauthorized
認証失敗
Response Body
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} GET
/v2/carriers/{countryCode} 特定国の配送業者一覧を取得
概要
特定国で利用可能な配送業者をフィルタリングして取得します。無料APIで使用量は消費されません。
リクエスト例
curl -X GET https://api.whereparcel.com/v2/carriers/{countryCode} \
-H "Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production" \
-H "Content-Type: application/json"const response = await fetch('https://api.whereparcel.com/v2/carriers/{countryCode}', {
method: 'GET',
headers: {
"Authorization": "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers/{countryCode}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = [
'Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);import requests
import json
url = 'https://api.whereparcel.com/v2/carriers/{countryCode}'
headers = {
'Authorization': 'Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers/{countryCode}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} 💡 注記: テスト用APIキーをダッシュボードで発行した実際のAPIキーに置き換えてください。
パスパラメータ
| Name | Type | Required | Description |
|---|---|---|---|
countryCode | string | Required | <p>国コード (ISO 3166-1 alpha-2)</p>
Example: kr |
レスポンス
成功レスポンス (200)
200 OK
国別配送業者一覧の取得に成功しました
Response Body
{
"success": true,
"data": [
"kr.cj",
"kr.hanjin",
"kr.lotte",
"kr.post"
]
} エラーレスポンス (401)
401 Unauthorized
認証失敗
Response Body
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} エラーレスポンス (404)
404 Not Found
国コードが見つかりません
Response Body
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Country code not found"
}
} GET
/v2/carriers/{countryCode}/{region} 特定国/地域の配送業者一覧を取得
概要
特定国の特定地域で利用可能な配送業者をフィルタリングして取得します。 米国や中国など国土が広く、特定地域でのみ運営される配送業者がある場合に使用します。 韓国のように全国配送のみの国ではこのエンドポイントは不要です。 無料APIで使用量は消費されません。
リクエスト例
curl -X GET https://api.whereparcel.com/v2/carriers/{countryCode}/{region} \
-H "Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production" \
-H "Content-Type: application/json"const response = await fetch('https://api.whereparcel.com/v2/carriers/{countryCode}/{region}', {
method: 'GET',
headers: {
"Authorization": "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers/{countryCode}/{region}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = [
'Authorization: Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);import requests
import json
url = 'https://api.whereparcel.com/v2/carriers/{countryCode}/{region}'
headers = {
'Authorization': 'Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers/{countryCode}/{region}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer wp_test_public_demo_key_do_not_use_in_production:sk_test_public_demo_secret_do_not_use_in_production")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} 💡 注記: テスト用APIキーをダッシュボードで発行した実際のAPIキーに置き換えてください。
パスパラメータ
| Name | Type | Required | Description |
|---|---|---|---|
countryCode | string | Required | <p>国コード (ISO 3166-1 alpha-2)</p>
Example: us |
region | string | Required | <p>地域コード (州、県など)</p>
Example: ca |
レスポンス
成功レスポンス (200)
200 OK
地域別配送業者一覧の取得に成功しました
Response Body
{
"success": true,
"data": [
"us.usps",
"us.fedex",
"us.ups"
]
} エラーレスポンス (401)
401 Unauthorized
認証失敗
Response Body
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} エラーレスポンス (404)
404 Not Found
国または地域コードが見つかりません
Response Body
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Country or region code not found"
}
}