API · v1
開発者
署名付き REST API と HMAC 検証 Webhook で 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 リクエスト / 分。Enterprise プランは上限引き上げ。