{"openapi":"3.0.3","info":{"title":"BaltriX Public API","version":"1.0","description":"REST API for loads, tracking requests, positions, documents and webhooks. Authenticate with `Authorization: Bearer bx_live_...`. Errors: 401 invalid key, 403 missing scope, 429 rate limit exceeded."},"servers":[{"url":"https://baltrix.io/api"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"bx_live_..."}}},"paths":{"/v1/tracking-requests":{"post":{"summary":"Create a load and start tracking","security":[{"ApiKeyAuth":[]}],"description":"Creates a shipment. With carrier_mc of an ELD-connected carrier, sends the carrier an approval request; otherwise emails the driver a guest tracking link. Scope: loads:write.","requestBody":{"content":{"application/json":{"example":{"ref":"BX-1001","stops":[{"kind":"pickup","zip":"60601","at":"2026-07-01T08:00"},{"kind":"dropoff","zip":"46204","at":"2026-07-01T14:00"}],"carrier_mc":"MC123456","driver_email":"driver@example.com","customer_contacts":[{"name":"Jane","email":"jane@shipper.com","role":"receiver"}]}}}},"responses":{"200":{"description":"Created; tracking.mode is 'eld' or 'phone'"}}}},"/v1/tracking-requests/{id}":{"get":{"summary":"Tracking status","security":[{"ApiKeyAuth":[]}],"description":"Status, last position, live ETA, stop events and trust score. Scope: tracking:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tracking snapshot"}}}},"/v1/tracking-requests/{id}/positions":{"get":{"summary":"Position history","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Breadcrumbs (ELD loads are limited to pickup −2 h → delivery +1 h)"}}}},"/v1/loads":{"post":{"summary":"Create a load","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Created load"}}}},"/v1/loads/{id}/ratecon":{"post":{"summary":"Upload a rate confirmation (AI pipeline)","security":[{"ApiKeyAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"AI-extracted rate con fields"}}}},"/v1/loads/{id}/documents":{"get":{"summary":"List documents (POD, BOL, rate con, billing packet)","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Documents with download URLs"}}}},"/v1/documents/{id}":{"get":{"summary":"Download a document","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File bytes"},"401":{"description":"Invalid API key"},"403":{"description":"Missing scope"},"429":{"description":"Rate limit exceeded"}}}}},"webhooks":{"tracking.started":{"post":{"summary":"tracking.started","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"position.updated":{"post":{"summary":"position.updated","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"eta.changed":{"post":{"summary":"eta.changed","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"stop.arrived":{"post":{"summary":"stop.arrived","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"stop.departed":{"post":{"summary":"stop.departed","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"delay.detected":{"post":{"summary":"delay.detected","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"detention.started":{"post":{"summary":"detention.started","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"pod.uploaded":{"post":{"summary":"pod.uploaded","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"load.delivered":{"post":{"summary":"load.delivered","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}},"risk.high":{"post":{"summary":"risk.high","description":"Signed with HMAC-SHA256 in X-BaltriX-Signature (sha256=hex). Retried with backoff for 24 h."}}}}