{"openapi":"3.1.0","info":{"title":"Senda Tracking API","version":"1.0.0","description":"Provider-independent global parcel tracking.","license":{"name":"Proprietary","identifier":"LicenseRef-Proprietary"}},"security":[],"servers":[{"url":"https://senda.zulelabs.com"}],"paths":{"/api/v1/track":{"post":{"operationId":"trackPackage","summary":"Start or reuse tracking","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tracking_number"],"properties":{"tracking_number":{"type":"string"},"carrier_code":{"type":"string"}}}}}},"responses":{"200":{"description":"Normalized shipment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentEnvelope"}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"404":{"$ref":"#/components/responses/ErrorResponse"},"422":{"$ref":"#/components/responses/ErrorResponse"},"429":{"$ref":"#/components/responses/ErrorResponse"},"502":{"$ref":"#/components/responses/ErrorResponse"},"503":{"$ref":"#/components/responses/ErrorResponse"}}}},"/api/v1/track/{trackingNumber}":{"get":{"operationId":"getTrackingStatus","summary":"Get a tracked shipment","parameters":[{"in":"path","name":"trackingNumber","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Normalized shipment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentEnvelope"}}}},"400":{"$ref":"#/components/responses/ErrorResponse"},"404":{"$ref":"#/components/responses/ErrorResponse"},"429":{"$ref":"#/components/responses/ErrorResponse"},"503":{"$ref":"#/components/responses/ErrorResponse"}}}}},"components":{"responses":{"ErrorResponse":{"description":"Machine-readable error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"schemas":{"ShipmentStatus":{"type":"string","enum":["unknown","information_received","in_transit","customs","out_for_delivery","ready_for_pickup","delivered","delivery_attempted","exception","expired"]},"Error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/Error"}}},"Carrier":{"type":"object","required":["code","name"],"properties":{"code":{"type":["string","null"]},"name":{"type":["string","null"]}}},"Checkpoint":{"type":"object","required":["id","status","message","occurrence_datetime","location","country_code"],"properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"message":{"type":"string"},"occurrence_datetime":{"type":"string","format":"date-time"},"location":{"type":["string","null"]},"country_code":{"type":["string","null"]}}},"Shipment":{"type":"object","required":["tracking_number","carrier","status","estimated_delivery","last_updated","origin","destination","latest_location","checkpoints"],"properties":{"tracking_number":{"type":"string"},"carrier":{"$ref":"#/components/schemas/Carrier"},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"estimated_delivery":{"type":["string","null"],"format":"date-time"},"last_updated":{"type":"string","format":"date-time"},"origin":{"type":["object","null"]},"destination":{"type":["object","null"]},"latest_location":{"type":["string","null"]},"checkpoints":{"type":"array","items":{"$ref":"#/components/schemas/Checkpoint"}}}},"ShipmentEnvelope":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Shipment"}}}}}}