Replay Dispatch
Replay shipment dispatch events to recover from processing failures or data synchronization issues.
HTTP Method POST
Path /inbound/replay/dispatch/{shipmentNumber}
Path Parameters
Section titled “Path Parameters”shipmentNumber(string, required) - The shipment number to replay dispatch for
Response Codes
Section titled “Response Codes”200: Dispatch replay completed successfully
400: Invalid shipment number
401: Authentication required
404: Shipment not found
409: Shipment not eligible for replay
500: Replay processing failed
Success Response (200)
Section titled “Success Response (200)”{ "success": true, "message": "Dispatch replay completed successfully", "shipmentNumber": "SHP-OUT-2024-001234", "replayId": "REPLAY-2024-567890", "replayedAt": "2024-01-20T18:30:00Z", "originalDispatchDate": "2024-01-15T16:45:00Z", "eventsReplayed": [ { "eventType": "SHIPMENT_PICKED", "originalTimestamp": "2024-01-15T15:30:00Z", "replayTimestamp": "2024-01-20T18:30:15Z", "status": "SUCCESS" }, { "eventType": "SHIPMENT_PACKED", "originalTimestamp": "2024-01-15T16:15:00Z", "replayTimestamp": "2024-01-20T18:30:30Z", "status": "SUCCESS" }, { "eventType": "SHIPMENT_DISPATCHED", "originalTimestamp": "2024-01-15T16:45:00Z", "replayTimestamp": "2024-01-20T18:30:45Z", "status": "SUCCESS" } ], "downstreamNotifications": { "erp": "SENT", "courier": "SENT", "customer": "SENT" }}Error Response (404)
Section titled “Error Response (404)”{ "success": false, "error": "SHIPMENT_NOT_FOUND", "message": "No shipment found with number: SHP-OUT-2024-001234"}Error Response (409)
Section titled “Error Response (409)”{ "success": false, "error": "REPLAY_NOT_ALLOWED", "message": "Shipment is not eligible for dispatch replay", "shipmentNumber": "SHP-OUT-2024-001234", "currentStatus": "PENDING", "eligibleStatuses": [ "DISPATCHED", "DELIVERED", "CANCELLED" ], "reason": "Shipment has not been dispatched yet"}Error Response (500)
Section titled “Error Response (500)”{ "success": false, "error": "REPLAY_FAILED", "message": "Dispatch replay processing failed", "shipmentNumber": "SHP-OUT-2024-001234", "replayId": "REPLAY-2024-567890", "failedAt": "2024-01-20T18:30:30Z", "failures": [ { "eventType": "SHIPMENT_DISPATCHED", "error": "Downstream system unavailable", "retryable": true } ]}Example Usage
Section titled “Example Usage”curl -X POST \ https://api.wms.example.com/inbound/replay/dispatch/SHP-OUT-2024-001234 \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"Replay Eligibility
Section titled “Replay Eligibility”Shipments are eligible for dispatch replay when:
- Current status is DISPATCHED, DELIVERED, or CANCELLED
- Original dispatch was more than 1 hour ago
- No active replay is currently in progress
- All required dispatch data is available
Replayed Events
Section titled “Replayed Events”The following events are replayed in sequence:
- SHIPMENT_PICKED - Item picking completion
- SHIPMENT_PACKED - Packaging completion
- SHIPMENT_DISPATCHED - Dispatch confirmation
- TRACKING_UPDATED - Carrier tracking information
- NOTIFICATIONS_SENT - Customer and system notifications
Use Cases
Section titled “Use Cases”- Data Synchronization - Resync dispatch data with external systems
- Failed Integrations - Retry failed downstream notifications
- Audit Recovery - Rebuild dispatch audit trail
- System Recovery - Restore state after system failures