The ShipTriage REST API lets you create shipments, check status, manage notifications, and handle exceptions programmatically.
https://www.shiptriage.eu/api/v1All API requests require an API key passed as a Bearer token in the Authorization Dashboard.
curl -H "Authorization: Bearer st_your_api_key_here" \
https://www.shiptriage.eu/api/v1/shipmentsAPI requests are rate-limited per API key. Current limits:
| Plan | Requests/min | Shipments | Checks/month |
|---|---|---|---|
| Free | 60 | 10 | 100 |
| Starter | 120 | 100 | 1,000 |
| Pro | 300 | 1,000 | 10,000 |
Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining) are included in every response.
/api/v1/shipmentsCreate one or more shipments for monitoring
/api/v1/shipmentsList shipments with pagination and status filter
/api/v1/shipments/:id/resolveMark a shipment as resolved
/api/v1/notifications/channelsList notification channels
/api/v1/notifications/channelsCreate a notification channel
/api/v1/notifications/channels/:idUpdate a notification channel
/api/v1/notifications/channels/:idDelete a notification channel
/api/v1/notifications/channels/:id/testSend a test notification
/api/v1/webhooksList webhook delivery attempts
/api/v1/statsGet shipment and usage statistics
/api/v1/activityGet activity log
/api/healthHealth check (no auth required)
curl -X POST https://www.shiptriage.eu/api/v1/shipments \
-H "Authorization: Bearer st_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"shipments": [
{ "trackingNumber": "00340434161094042684", "customerRef": "ORDER-001" },
{ "trackingNumber": "00340434161094042691", "customerRef": "ORDER-002" }
]
}'import requests
API_KEY = "st_your_api_key"
BASE_URL = "https://www.shiptriage.eu/api/v1"
response = requests.post(
f"{BASE_URL}/shipments",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"shipments": [
{"trackingNumber": "00340434161094042684", "customerRef": "ORDER-001"},
{"trackingNumber": "00340434161094042691", "customerRef": "ORDER-002"},
]
},
)
print(response.json())
# {"success": true, "results": {"created": 2, "skipped": 0, "errors": []}}const API_KEY = "st_your_api_key";
const response = await fetch("https://www.shiptriage.eu/api/v1/shipments", {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
shipments: [
{ trackingNumber: "00340434161094042684", customerRef: "ORDER-001" },
{ trackingNumber: "00340434161094042691", customerRef: "ORDER-002" },
],
}),
});
const data = await response.json();
console.log(data);<?php
$apiKey = "st_your_api_key";
$ch = curl_init("https://www.shiptriage.eu/api/v1/shipments");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $apiKey",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"shipments" => [
["trackingNumber" => "00340434161094042684", "customerRef" => "ORDER-001"],
["trackingNumber" => "00340434161094042691", "customerRef" => "ORDER-002"],
],
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;curl "https://www.shiptriage.eu/api/v1/shipments?status=CRITICAL&limit=50" \
-H "Authorization: Bearer st_your_api_key"When you configure a webhook URL, ShipTriage signs every request with an HMAC-SHA256 signature using your webhook secret. The signature is sent in the X-ShipTriage-Signature header.
const crypto = require("crypto");
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(payload)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature, "hex"),
Buffer.from(expected, "hex")
);
}
// In your Express handler:
app.post("/webhooks/shiptriage", (req, res) => {
const signature = req.headers["x-shiptriage-signature"];
const isValid = verifyWebhook(JSON.stringify(req.body), signature, WEBHOOK_SECRET);
if (!isValid) {
return res.status(401).send("Invalid signature");
}
// Process the webhook event
console.log("Event:", req.body.event);
console.log("Tracking:", req.body.trackingNumber);
res.status(200).send("OK");
});import hmac
import hashlib
def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(),
payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)
# In your Flask handler:
@app.route("/webhooks/shiptriage", methods=["POST"])
def handle_webhook():
signature = request.headers.get("X-ShipTriage-Signature")
if not verify_webhook(request.data, signature, WEBHOOK_SECRET):
return "Invalid signature", 401
data = request.json
print(f"Event: {data['event']}, Tracking: {data['trackingNumber']}")
return "OK", 200