택배사 API - WhereParcel
글로벌 택배사 정보, 메타데이터, 지원 국가 조회. 국가별, 지역별, 택배사 유형별 필터링 가능. 무료 API 엔드포인트.
지원 택배사 목록 조회
개요
전 세계 39개 이상의 택배사 목록과 메타데이터를 조회합니다. 무료 API로 사용량이 차감되지 않습니다.
요청 예제
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const carriers = await wp.getCarriers();
console.log(carriers); curl -X GET https://api.whereparcel.com/v2/carriers \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"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 YOUR_API_KEY:YOUR_SECRET_KEY', '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
url = 'https://api.whereparcel.com/v2/carriers'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
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)
200OK — 택배사 목록 조회 성공
{
"success": true,
"data": [
"us.usps",
"us.fedex",
"us.ups",
"us.ontrac",
"ca.post",
"gb.fedex"
]
} 오류 응답 (401)
401Unauthorized — 인증 실패
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} 지원 국가 목록 조회
개요
택배 추적을 지원하는 국가 목록을 조회합니다. 무료 API로 사용량이 차감되지 않습니다.
요청 예제
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const countries = await wp.getCountries();
console.log(countries); curl -X GET https://api.whereparcel.com/v2/countries \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/countries', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"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 YOUR_API_KEY:YOUR_SECRET_KEY', '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
url = 'https://api.whereparcel.com/v2/countries'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/countries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
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)
200OK — 국가 목록 조회 성공
{
"success": true,
"data": [
{
"code": "US",
"name": "United States"
},
{
"code": "CA",
"name": "Canada"
},
{
"code": "GB",
"name": "United Kingdom"
}
]
} 오류 응답 (401)
401Unauthorized — 인증 실패
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} 특정 국가의 택배사 목록 조회
개요
특정 국가에서 사용 가능한 택배사 목록을 필터링하여 조회합니다. 무료 API로 사용량이 차감되지 않습니다.
요청 예제
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const carriers = await wp.getCarriersByCountry('kr');
console.log(carriers); curl -X GET https://api.whereparcel.com/v2/carriers/kr \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers/kr', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"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/kr'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $headers = [ 'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY', '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
url = 'https://api.whereparcel.com/v2/carriers/kr'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers/kr"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
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 키로 교체하세요.
경로 매개변수
countryCode string · required | <p>국가 코드 (ISO 3166-1 alpha-2)</p>
kr |
응답
성공 응답 (200)
200OK — 국가별 택배사 목록 조회 성공
{
"success": true,
"data": [
{
"code": "us.usps",
"name": "USPS (United States Postal Service)",
"serviceScope": "international"
},
{
"code": "us.fedex",
"name": "FedEx",
"serviceScope": "international"
},
{
"code": "us.ups",
"name": "UPS (United Parcel Service)",
"serviceScope": "international"
},
{
"code": "us.ontrac",
"name": "OnTrac",
"serviceScope": "national",
"region": "WEST"
},
{
"code": "us.ca.ontrac",
"name": "OnTrac (California)",
"serviceScope": "national",
"region": "CA"
}
]
} 오류 응답 (401)
401Unauthorized — 인증 실패
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} 오류 응답 (404)
404Not Found — 국가 코드를 찾을 수 없음
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "No carriers found for country: ZZ"
}
} 특정 국가/지역의 택배사 목록 조회
개요
특정 국가의 특정 지역에서 사용 가능한 택배사 목록을 필터링하여 조회합니다. 미국, 중국 등 국토가 넓어 특정 지역만 운영하는 택배사가 있는 경우에 사용합니다. 한국처럼 전국 택배만 있는 국가에서는 이 엔드포인트가 필요하지 않습니다. 무료 API로 사용량이 차감되지 않습니다.
요청 예제
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const carriers = await wp.getCarriersByRegion('us', 'ca');
console.log(carriers); curl -X GET https://api.whereparcel.com/v2/carriers/us/ca \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers/us/ca', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"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/us/ca'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $headers = [ 'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY', '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
url = 'https://api.whereparcel.com/v2/carriers/us/ca'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers/us/ca"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
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 키로 교체하세요.
경로 매개변수
countryCode string · required | <p>국가 코드 (ISO 3166-1 alpha-2)</p>
us |
region string · required | <p>지역 코드 (주, 도, 성 등)</p>
ca |
응답
성공 응답 (200)
200OK — 국가/지역별 택배사 목록 조회 성공
{
"success": true,
"data": [
{
"code": "us.usps",
"name": "USPS (United States Postal Service)",
"serviceScope": "international"
},
{
"code": "us.fedex",
"name": "FedEx",
"serviceScope": "international"
},
{
"code": "us.ups",
"name": "UPS (United Parcel Service)",
"serviceScope": "international"
},
{
"code": "us.ca.ontrac",
"name": "OnTrac (California)",
"serviceScope": "national",
"region": "CA"
}
]
} 오류 응답 (401)
401Unauthorized — 인증 실패
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} 오류 응답 (404)
404Not Found — 국가 또는 지역 코드를 찾을 수 없음
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "No carriers found for ZZ/CA"
}
}