배송추적 조회
주문에 딸린 발주(배송) 단위로 운송장·택배사·배송추적 상태와 추적 이력을 조회합니다.
발송처리로 운송장을 넣으면 그 뒤 택배사가 알려주는 단계는 Bootpay가 자동으로 모읍니다. 서비스 서버는 택배사를 직접 조회할 필요 없이 이 API만 읽으면 됩니다.
Basic 인증과 user:order_detail scope가 필요합니다. 구매자 화면에서는 Bootpay-User-JWT 또는 secretKey 인증의 user_id를 지정하면 그 회원의 주문만 조회합니다. 필드와 오류 전체는 주문 API 원문을 확인합니다.
API 엔드포인트
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| order_number | String | Y | 주문번호 (URL 경로) |
코드 예제
curl -X GET "https://api.bootapi.com/v1/orders/25071182085082524116/purchases" \
-H "Authorization: Basic {base64(client_key:secret_key)}"import { BootpayCommerce } from '@bootpay/backend-js'
const commerce = new BootpayCommerce({
client_key: 'your-commerce-client-key',
secret_key: 'your-commerce-secret-key',
mode: 'production'
})
const response = await commerce.order.purchases('25071182085082524116')
console.log(response)from bootpay_backend import BootpayCommerce
commerce = BootpayCommerce(
client_key='your-commerce-client-key',
secret_key='your-commerce-secret-key',
mode='production'
)
response = commerce.order.purchases('25071182085082524116')
print(response)use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
$response = $commerce->order->purchases('25071182085082524116');
print_r($response);import kr.co.bootpay.store.BootpayStore;
import kr.co.bootpay.store.model.request.TokenPayload;
import kr.co.bootpay.store.model.response.BootpayStoreResponse;
TokenPayload tp = new TokenPayload("your-commerce-client-key", "your-commerce-secret-key");
BootpayStore commerce = new BootpayStore(tp);
BootpayStoreResponse response = commerce.order.purchases("25071182085082524116");
System.out.println(response);require 'bootpay'
commerce = BootpayStore::RestClient.new(client_key: 'your-commerce-client-key', secret_key: 'your-commerce-secret-key')
response = commerce.order_purchases(order_number: '25071182085082524116')
puts response.dataimport "github.com/bootpay/backend-go/v2"
commerce := bootpay.NewCommerceAPI("your-commerce-client-key", "your-commerce-secret-key", nil, "production")
response, err := commerce.Order.Purchases("25071182085082524116")
fmt.Println(response, err)using Bootpay.Commerce;
var commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
var response = await commerce.OrderPurchases("25071182085082524116");
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
JSON
[
{
"order_purchase_id": "6870824fb0eacea5cd974f12",
"order_purchase_number": "P25071182085082524116",
"status": 4,
"delivery_company_code": "CJGLS",
"tracking_number": "620148310301",
"d_ts": 3,
"sent_at": "2025-07-12T09:10:00Z",
"tracking_histories": [
{
"trakler_status": "in_transit",
"delivery_tracking_status": 3,
"location": "옥천HUB",
"description": "간선상차 · CJ대한통운",
"occurred_at": "2025-07-12T21:40:00Z",
"source": "webhook"
}
]
}
]필드 설명은 주문 상세와 같습니다.
추적 단계 읽는 법
d_ts는 택배사가 알려준 단계입니다. 값은 커머스 Enum에서 확인합니다.
| 상황 | 보이는 값 |
|---|---|
| 운송장 등록 전 | d_ts: 0, tracking_histories: [] |
| 등록 직후 | d_ts: 1, 이력은 아직 비어 있습니다 |
| 집화·이동 중 | d_ts: 3, 이력이 최신 순으로 쌓입니다 |
| 배송 완료 | d_ts: 4, 발주 status도 5로 함께 넘어갑니다 |
에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
ORDER_NOT_FOUND | 주문내역을 찾지 못했습니다. | order_number를 넣었는지 확인합니다 (order_id 아님) |
ORDER_DENIED | 주문 정보를 조회할 권한이 없습니다. | 다른 프로젝트의 주문번호는 아닌지 확인합니다 |