API · v1
개발자
서명된 REST API와 HMAC 검증 웹훅으로 ChinaLogisticHub를 ERP, TMS, BI 도구에 통합하세요.
base
https://api.chinalogistichub.com/api/v1/api/v1REST
OpenAPI-described JSON endpoints.
Webhooks
HMAC-SHA256 signed event delivery.
Rate-aware
60 rpm default, enterprise raises it.
01
인증
회사 대시보드에서 API 키를 발급하고, 다음 헤더 중 하나로 전송하세요:
전체 시크릿은 생성 시 한 번만 표시됩니다. 유출되면 즉시 폐기하세요.
request.http·
Authorization: Bearer clh_live_<prefix>_<secret> # or X-API-Key: clh_live_<prefix>_<secret>
02
빠른 시작
curl200 OK
curl -H "Authorization: Bearer $CLH_KEY" \
https://api.chinalogistichub.com/api/v1/api/v1/public/ping03
OpenAPI 명세
코드 생성(openapi-generator, orval 등)에 적합한 머신 가독 계약.
POST
/api/v1/requestsCreate a freight requestGET
/api/v1/requests/{id}/quotesList quotes for a requestPOST
/api/v1/quotes/{id}/awardAward a winning carrier quoteGET
/api/v1/shipments/{id}Get shipment + tracking eventsGET
/api/v1/shipments/{id}/documentsList shipment documentsPOST
/api/v1/developers/webhooksSubscribe to event webhooks04
Webhooks
다음을 통해 이벤트 구독: POST /api/v1/developers/webhooks . 각 전달은 HMAC-SHA256 서명을 다음 헤더에 포함합니다: X-CLH-Signature.
재시도 정책
30초부터 시작하는 지수 백오프로 6회 시도. 다음 상태를 반환하지 않는 요청은 GET /developers/webhooks/:id/deliveries
서명 헤더node
X-CLH-Signature: t=1713398400,v1=<hex>
const base = `${t}.${rawBody}`;
const expected = crypto.createHmac('sha256', secret)
.update(base).digest('hex');
// Compare with timingSafeEqual, reject if |now - t| > 300s지원 이벤트
- request.created
- request.status_changed
- shipment.created
- shipment.status_changed
- shipment.delivered
- quote.received
- quote.awarded
- quote.selected_confirmed
- invoice.paid
- document.uploaded
- document.expiring
05
레이트 리미트
기본: API 키당 분당 60건. 엔터프라이즈 플랜은 제한이 상향됩니다.