Skip to main content

What you can do

RTO is the cargo-handling process linked to a Shipment. You choose an RTO configuration, create a Shipment with RTO enabled, and read the movements Eaze Customs creates. This is not a direct connection to a cargo-system API. You cannot create, retry, or correct a movement through the Public API.

Before you start

The credential needs the rto module. Shipment routes also need X-Eaze-Client-Ref. Call List RTO Configurations. Each item has id and providerName. Use id as rtoConfigurationId. The list is limited to configurations your client is allowed to use.

Steps

1

Create the Shipment

Follow Shipments. Set enabledServices to ["rto"], or add rto next to clearance.Required with RTO: rtoConfigurationId, rtoProcessType, packageCount, and totalWeight.
2

Read movements

Call List Movements with the Shipment ID. Call Get Movement for one movement.A movement is one provider message, such as an outbound report. Its status describes that message. It does not by itself mean the whole RTO process is finished.
3

Watch completion

Read the Shipment. businessStatus.rto is the overall process. Get Shipment also returns businessData.rto with the process, public configuration id, and account totals. rto.completed is sent when that overall status first reaches COMPLETED.One movement reported or confirmed is earlier than overall completion. Use Get Shipment after the webhook. The webhook is a notification, not the full movement record. See Webhook Events and Deliveries & Retries.
Clearance and RTO proceed independently. A completed Declaration does not complete RTO, and a completed RTO process does not complete clearance.

Working example

A movement:
status.code is the stored state. displayCode is the label to show. REPORTED is displayed as SENT_TO_PROVIDER. CONFIRMED is displayed as ACCEPTED_BY_PROVIDER. Get Shipment includes the RTO balances for the same Shipment:
configuration.id is the public id from List RTO Configurations. durationDays stays null while the process is still active. Weights are decimal strings. The full Shipment object also includes cargo and schedule. See Shipments.

Statuses and errors

Overall Shipment RTO status: Next: Documents.