Skip to content

SFTP Relay

SFTP relay delivers shipment status updates as JSON files to Duty Pro’s hosted SFTP server. You connect to the server and download files at your convenience. This is one of two status relay methods supported by Duty Pro (the other being webhooks).

Duty Pro operates a pull-model SFTP server — rather than pushing files to your server, Duty Pro writes status files to its own SFTP server and you connect to download them.

  1. Status events are generated as shipments progress (created, payment received, expired, etc.).
  2. Duty Pro batches events and writes JSON files to your directory on the SFTP server.
  3. You connect via SFTP and download the files on your own schedule.

Configure SFTP relay in the dashboard under Settings > Status Relay:

  1. Select SFTP as the relay method.
  2. The dashboard displays your SFTP connection details:
FieldDescription
HostSFTP server hostname
PortSFTP port (typically 22)
UsernameYour account-specific username
PasswordYour SFTP password (shown once on setup; can be reset)

You can reset your SFTP password at any time from the dashboard.

Files are organized by date in your directory:

/{account_id}/{mode}/{YYYY-MM-DD}/dutypro_updates_YYYYMMDDTHHMMSSZ.json
Path segmentDescription
{account_id}Your unique account ID
{mode}production for live shipments, test for test shipments
{YYYY-MM-DD}Date the file was generated
dutypro_updates_...Timestamped filename

Each file contains a JSON array of status update objects. Multiple events are batched into a single file per processing cycle.

[
{
"reference": "ORD-2026-00123",
"held": true,
"held_on_error": false,
"canceled": false
},
{
"reference": "ORD-2026-00124",
"held": false,
"held_on_error": false,
"canceled": false
}
]
FieldTypeDescription
referencestringYour shipment reference number
heldbooleantrue when the shipment is held and customs payment is required
held_on_errorbooleantrue if the shipment is held because of a calculation error
canceledbooleantrue if the payment has expired
EventheldcanceledTrigger
Payment requiredtruefalseShipment created with fees > 0
Payment receivedfalsefalseConsignee completed payment
No payment requiredfalsefalseShipment created with fees = 0
Payment expiredfalsetruePayment deadline passed

If your receiving system expects different field names, contact the Duty Pro team to configure custom key mappings for your account.

Duty Pro generates SFTP status files every 15 minutes. Pending status events are batched by account and mode (live/test) and written as a single file per batch.

In test mode, SFTP files are generated and stored internally but not pushed to the SFTP server. You can download them from the dashboard for inspection. This prevents test data from mixing with production files.

Test files use the test mode path (e.g., /{account_id}/test/{date}/...), keeping them separate from production files at /{account_id}/production/{date}/....

If file writing fails, Duty Pro retries with the same backoff schedule as webhooks:

AttemptDelay
1st retry5 minutes
2nd retry10 minutes
3rd retry15 minutes
4th retry20 minutes

After 4 failed attempts, the relay is marked as FAILED and visible in the dashboard.

Relay delivery status is visible in two places:

  • Shipment detail view — The “Status Relay Log” section shows the relay event, file name, file size, and delivery status.
  • Settings > Status Relay — Shows overall configuration and recent delivery history.