diff --git a/API.html b/API.html index e07a1f5c3..248bebf48 100644 --- a/API.html +++ b/API.html @@ -12,358 +12,382 @@ margin: 0; } -
Download OpenAPI specification:Download
API for cargo tracking, booking, routing and handling in the DDD Sample application
Download OpenAPI specification:
REST endpoints for tracking cargo status programmatically
Base URL for all endpoints
Get tracking information for a cargo via REST API
The tracking ID of the cargo to track
Cargo tracking information retrieved successfully
Cargo not found
Internal server error
{"trackingId": "ABC123","statusText": "In transit","destination": "USNYC","eta": "2024-01-15T14:00:00Z","nextExpectedActivity": "Unload in Rotterdam","misdirected": false,"events": [{"expected": false,"description": "Cargo loaded onto voyage V001","type": "LOAD","location": "USNYC","voyageNumber": "V001","completionTime": "2024-01-01T10:00:00Z"}]}
REST endpoints for submitting cargo handling events
Submit a report for cargo handling events
When the handling was completed
The tracking IDs of the cargos
Type of handling event
UN/LOCODE of a location
Unique identifier of a voyage
Handling report submitted successfully
Invalid request
{"completionTime": "2024-01-01T10:00:00Z","trackingIds": ["ABC123","XYZ789"],"type": "LOAD","unLocode": "USNYC","voyageNumber": "V001"}
REST endpoints for managing cargo bookings and routing
Returns the list of all available shipping locations
List of locations retrieved successfully
[{"unLocode": "USNYC","name": "New York"}]
Returns a list of all registered cargos
List of cargos retrieved successfully
[{"trackingId": "ABC123","origin": "USNYC","finalDestination": "USNYC","arrivalDeadline": "2024-12-24T12:00:00Z","misrouted": false,"routed": true,"legs": [{"voyageNumber": "V001","from": "USNYC","to": "NLRTM","loadTime": "2024-01-01T10:00:00Z","unloadTime": "2024-01-15T14:00:00Z"}]}]
Books a new cargo with specified origin, destination and arrival deadline
Deadline for cargo arrival
Cargo registered successfully
{"originUnlocode": "USNYC","destinationUnlocode": "USNYC","arrivalDeadline": "2024-12-24T12:00:00Z"}
{"trackingId": "ABC123","origin": "USNYC","finalDestination": "USNYC","arrivalDeadline": "2024-12-24T12:00:00Z","misrouted": false,"routed": true,"legs": [{"voyageNumber": "V001","from": "USNYC","to": "NLRTM","loadTime": "2024-01-01T10:00:00Z","unloadTime": "2024-01-15T14:00:00Z"}]}
Returns detailed information about a specific cargo
Unique identifier for tracking the cargo
Cargo details retrieved successfully
Returns possible routing options for a specific cargo
Route candidates retrieved successfully
[{"legs": [{"voyageNumber": "V001","from": "USNYC","to": "GBLON","loadTime": "2024-01-01T10:00:00Z","unloadTime": "2024-01-10T15:00:00Z"},{"voyageNumber": "V002","from": "GBLON","to": "NLRTM","loadTime": "2024-01-11T08:00:00Z","unloadTime": "2024-01-12T16:00:00Z"}]}]
Assigns a selected route to a cargo
When the cargo is scheduled to be loaded onto the carrier
When the cargo is scheduled to be unloaded from the carrier
Route assigned successfully
Invalid route
[{"voyageNumber": "V001","from": "USNYC","to": "USNYC","loadTime": "2024-01-01T10:00:00Z","unloadTime": "2024-01-15T14:00:00Z"}]
Updates the destination of a cargo
Destination changed successfully
Invalid destination
{"unLocode": "USNYC"}
Web endpoints for managing cargo bookings and routing
Returns the list of shipping locations for cargo registration
List of shipping locations retrieved successfully
{"unlocodes": ["USNYC","NLRTM","CNHKG"],"locations": [{"unLocode": "USNYC","name": "New York"},{"unLocode": "NLRTM","name": "Rotterdam"},{"unLocode": "CNHKG","name": "Hong Kong"}]}
UN/LOCODE of the origin location
UN/LOCODE of the destination location
Deadline for cargo arrival (format dd/MM/yyyy)
Cargo registered successfully, redirects to cargo details
Tracking ID of the cargo
Itinerary assigned successfully, redirects to cargo details
Returns possible new destinations for changing a cargo's route
Available destinations retrieved successfully
{"cargo": {"trackingId": "ABC123","origin": "USNYC","finalDestination": "USNYC","arrivalDeadline": "2024-12-24T12:00:00Z","misrouted": false,"routed": true,"legs": [{"voyageNumber": "V001","from": "USNYC","to": "NLRTM","loadTime": "2024-01-01T10:00:00Z","unloadTime": "2024-01-15T14:00:00Z"}]},"locations": [{"unLocode": "USNYC","name": "New York"}]}
Destination changed successfully, redirects to cargo details
Web endpoints for tracking cargo status through the UI
Returns the form for tracking cargo
Tracking form retrieved successfully
Track a cargo by its tracking ID