Skip to content

Replay Dispatch

Replay shipment dispatch events to recover from processing failures or data synchronization issues.

HTTP Method POST

Path /inbound/replay/dispatch/{shipmentNumber}

  • shipmentNumber (string, required) - The shipment number to replay dispatch for

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": 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"
}
}
{
"success": false,
"error": "SHIPMENT_NOT_FOUND",
"message": "No shipment found with number: SHP-OUT-2024-001234"
}
{
"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"
}
{
"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
}
]
}
Terminal window
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"

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

The following events are replayed in sequence:

  1. SHIPMENT_PICKED - Item picking completion
  2. SHIPMENT_PACKED - Packaging completion
  3. SHIPMENT_DISPATCHED - Dispatch confirmation
  4. TRACKING_UPDATED - Carrier tracking information
  5. NOTIFICATIONS_SENT - Customer and system notifications
  • 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