๐ CargoWise eAdaptor
Dockflow connects to CargoWise through eAdaptor, in both directions:
| Direction | What travels | Set up in |
|---|---|---|
| CargoWise โ Dockflow | Your forwarding shipments and consols, as Universal Shipment XML. Each one creates or updates a tradeflow, which Dockflow then tracks. | Console โบ Integrations โบ System Integrations โบ CargoWise eAdaptor |
| Dockflow โ CargoWise | Each actual departure and arrival, as one Universal Event XML posted against the CargoWise job. | Console โบ API Keys โบ Webhooks, format CargoWise eAdaptor |
You can use either direction on its own. Used together, the job number links them: the shipment you push becomes a tradeflow with the job number as its reference, and the events Dockflow sends back target that same job.
1 ยท Receive shipments from CargoWiseโ
Set up in Dockflowโ
- In the API Console, open Integrations and go to System Integrations.
- Open CargoWise eAdaptor and fill in:
| Field | What to enter |
|---|---|
| eAdaptor username | The username CargoWise sends with each push. Choose any value. |
| eAdaptor password | At least 24 characters. Click Generate password to create a random 40-character password, then Copy password. |
| Own company name (optional) | Your own organisation name as it appears in your CargoWise messages. Dockflow uses it to keep your company out of the partners on a tradeflow. |
- Copy the push URL shown in the same block. It has the form:
https://core.dockflow.com/api/integrations/cargowise/<entity id>/
<entity id> is the number of your Dockflow organisation. The console fills it in.
- Save. Generating a new password later replaces the old one at once: CargoWise cannot push until you enter the new password there too.
A new connection starts in test mode: Dockflow accepts and reads every push, but does not create or update tradeflows yet. When your first pushes have arrived, ask [email protected] to switch the connection live.
Set up in CargoWiseโ
Your CargoWise administrator configures an eAdaptor outbound (sending) connection:
- Destination URL: the push URL from the console.
- Authentication: HTTP Basic, with the eAdaptor username and password from the console.
- Message: Universal Shipment XML.
- Triggers: the sea forwarding shipments and consols you want Dockflow to track, and the changes to them that should be pushed (for example a new container, a new vessel or a changed ETA).
Each push replaces what Dockflow knows about that job, so it is fine to push the same job many times.
Requestโ
POST /api/integrations/cargowise/<entity id>/ HTTP/1.1
Host: core.dockflow.com
Authorization: Basic <base64 of username:password>
Content-Type: text/xml
<the eAdaptor message>
Dockflow accepts two body shapes, optionally gzipped as a whole:
| Body | Dockflow answers 200 with |
|---|---|
A SOAP envelope with a SendStream call. Each Message is base64-encoded and may be gzipped; one call can carry several messages. | A SOAP SendStreamResponse. |
A plain Universal XML document: UniversalInterchange or UniversalShipment. | JSON: {"status": "received", "entity_id": โฆ, "log_id": "โฆ"} |
- A request body may be at most 32 MiB, and the messages it carries at most 32 MiB once unzipped.
- XML with a document type declaration (
<!DOCTYPE โฆ>) is refused. - A
200means Dockflow has queued the push. The tradeflows are created or updated afterwards.
What Dockflow importsโ
Every Shipment in the message becomes one tradeflow, keyed on its job number. A consol with houses (SubShipmentCollection) becomes one tradeflow per house; each house takes the consol's master bill, vessel, ports, carrier and dates, because those are what the carrier tracks.
| Tradeflow field | Taken from |
|---|---|
| Tradeflow reference | DataContext โบ DataSource โบ Key, the job number (e.g. S00012345). |
| Containers | ContainerCollection โบ Container โบ ContainerNumber, cleaned of spaces and dashes. A value that is not an ISO 6346 number is skipped. A house without its own containers takes the consol's. |
| Bill of lading | The consol's WayBillNumber. For a shipment without consol: its WayBillNumber when WayBillType is MWB. |
| Booking | BookingConfirmationReference, else the first CarrierBookingReference on a transport leg. |
| Port of loading / discharge | PortOfLoading โบ Code and PortOfDischarge โบ Code, when a 5-character UN/LOCODE. |
| Vessel | VesselName. |
| Carrier | The ShippingLineAddress company name, else the carrier on a transport leg. |
| ETD / ETA | EstimatedDeparture of the first transport leg and EstimatedArrival of the last. |
| Partners | ConsignorDocumentaryAddress as Shipper and ConsigneeDocumentaryAddress as Consignee, with the address's Email as lead contact. An address whose name equals your own company name is left out. |
Custom reference CargoWiseJobType | DataSource โบ Type, e.g. ForwardingShipment. |
Custom reference CargoWiseHouseBill | The shipment's own WayBillNumber when it is not the master bill. |
Only sea shipments are imported: a shipment whose TransportMode is not SEA is skipped. A shipment without a job number is skipped.
Exampleโ
A forwarding shipment, trimmed to the fields Dockflow reads:
<?xml version="1.0" encoding="utf-8"?>
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Header>
<SenderID>FWDANRBE</SenderID>
<RecipientID>DOCKFLOW</RecipientID>
</Header>
<Body>
<UniversalShipment version="1.1">
<Shipment>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>ForwardingShipment</Type>
<Key>S00012345</Key>
</DataSource>
</DataSourceCollection>
</DataContext>
<BookingConfirmationReference>MAEU263445566</BookingConfirmationReference>
<PortOfLoading><Code>BEANR</Code></PortOfLoading>
<PortOfDischarge><Code>USNYC</Code></PortOfDischarge>
<TransportMode><Code>SEA</Code></TransportMode>
<VesselName>MAERSK KENTUCKY</VesselName>
<WayBillNumber>MAEU263445566</WayBillNumber>
<WayBillType><Code>MWB</Code></WayBillType>
<ContainerCollection>
<Container><ContainerNumber>MSKU 123456-5</ContainerNumber></Container>
<Container><ContainerNumber>TGHU7654321</ContainerNumber></Container>
</ContainerCollection>
<OrganizationAddressCollection>
<OrganizationAddress>
<AddressType>ConsignorDocumentaryAddress</AddressType>
<CompanyName>Example Exports NV</CompanyName>
<Email>[email protected]</Email>
</OrganizationAddress>
<OrganizationAddress>
<AddressType>ConsigneeDocumentaryAddress</AddressType>
<CompanyName>Example Imports Inc</CompanyName>
</OrganizationAddress>
<OrganizationAddress>
<AddressType>ShippingLineAddress</AddressType>
<CompanyName>Maersk A/S</CompanyName>
</OrganizationAddress>
</OrganizationAddressCollection>
<TransportLegCollection>
<TransportLeg>
<LegOrder>1</LegOrder>
<EstimatedDeparture>2026-12-08T14:00:00</EstimatedDeparture>
<EstimatedArrival>2026-12-20T08:00:00</EstimatedArrival>
</TransportLeg>
</TransportLegCollection>
</Shipment>
</UniversalShipment>
</Body>
</UniversalInterchange>
This creates tradeflow S00012345 with containers MSKU1234565 and TGHU7654321, bill of lading MAEU263445566, Antwerp to New York on the MAERSK KENTUCKY, with the shipper and consignee as partners.
A consol, trimmed to its houses:
<UniversalShipment xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Shipment>
<DataContext>
<DataSourceCollection>
<DataSource><Type>ForwardingConsol</Type><Key>C00004567</Key></DataSource>
</DataSourceCollection>
</DataContext>
<PortOfLoading><Code>BEANR</Code></PortOfLoading>
<PortOfDischarge><Code>CNSHA</Code></PortOfDischarge>
<TransportMode><Code>SEA</Code></TransportMode>
<VesselName>CMA CGM JACQUES SAADE</VesselName>
<WayBillNumber>CMDUANT0123456</WayBillNumber>
<WayBillType><Code>MWB</Code></WayBillType>
<ContainerCollection>
<Container><ContainerNumber>CMAU1234567</ContainerNumber></Container>
</ContainerCollection>
<SubShipmentCollection>
<SubShipment>
<DataContext>
<DataSourceCollection>
<DataSource><Type>ForwardingShipment</Type><Key>S00020001</Key></DataSource>
</DataSourceCollection>
</DataContext>
<WayBillNumber>ANR2001</WayBillNumber>
<WayBillType><Code>HWB</Code></WayBillType>
</SubShipment>
<SubShipment>
<DataContext>
<DataSourceCollection>
<DataSource><Type>ForwardingShipment</Type><Key>S00020002</Key></DataSource>
</DataSourceCollection>
</DataContext>
<WayBillNumber>ANR2002</WayBillNumber>
<WayBillType><Code>HWB</Code></WayBillType>
</SubShipment>
</SubShipmentCollection>
</Shipment>
</UniversalShipment>
This creates two tradeflows, S00020001 and S00020002, each on master bill CMDUANT0123456 with container CMAU1234567, and with its own house bill (ANR2001, ANR2002) as the CargoWiseHouseBill custom reference.
Responsesโ
| Status | Meaning | What to do in CargoWise |
|---|---|---|
200 | Received and queued. | Nothing. |
400 | The body is empty, or Content-Length is not a number. | Check the message the connection sends. |
401 | The username or password is wrong, or the connection is not set up in Dockflow. | Enter the username and password from the console again. After a new password was generated, enter that one. |
413 | The body is larger than 32 MiB. | Send fewer messages per call. |
429 | Too many failed sign-ins from your address, more than 120 pushes in a minute, or more than 128 MiB in a minute. | Wait and let CargoWise retry. After repeated 401s, fix the password first. |
503 | Dockflow could not queue the push. | Let CargoWise retry: nothing from this call was kept. |
2 ยท Send milestones to CargoWiseโ
Dockflow posts each actual milestone of a tradeflow to CargoWise as a Universal Event, against the CargoWise job whose number is the tradeflow reference. Tradeflows created by the connection in section 1 already carry the job number. For tradeflows you create another way, use the CargoWise job number as the tradeflow reference.
Set up a destinationโ
- In the API Console, open API Keys โบ Webhooks and add a destination.
- URL: the eAdaptor receiving address of your CargoWise system that accepts Universal XML over HTTPS. It must use
httpsand must not contain a username or password. - What to send: Shipment updates.
- Event format: CargoWise eAdaptor.
- CargoWise recipient ID: the enterprise code of the CargoWise system that receives the events. It goes into
RecipientIDof each message. - Event codes (optional): which Dockflow milestones to send and the CargoWise event type for each, as
CODE=TYPEpairs separated by commas. Leave empty forVD=DEP, VA=ARV: vessel departure and vessel arrival. The Dockflow codes are in the status code table. A CargoWise event type is at most 3 characters. - Headers: the credentials your CargoWise receiving address expects, e.g.
Authorization: Basic โฆ. - Choose the delivery mode: Dry run, Live or Off, as for any webhook destination.
Requestโ
POST <your eAdaptor receiving address> HTTP/1.1
Content-Type: application/xml
Authorization: <the header value you configured>
<one Universal Event>
Each request carries one event. For the shipment above, the vessel departure from Antwerp:
<?xml version='1.0' encoding='utf-8'?>
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Header>
<SenderID>DOCKFLOW</SenderID>
<RecipientID>FWDANRBE</RecipientID>
</Header>
<Body>
<UniversalEvent version="1.1">
<Event>
<DataContext>
<DataTargetCollection>
<DataTarget>
<Type>ForwardingShipment</Type>
<Key>S00012345</Key>
</DataTarget>
</DataTargetCollection>
</DataContext>
<EventTime>2026-12-08T16:42:00+01:00</EventTime>
<EventType>DEP</EventType>
<EventReference>98765432</EventReference>
<IsEstimate>false</IsEstimate>
<ContextCollection>
<Context>
<Type>ContainerNumber</Type>
<Value>MSKU1234565</Value>
</Context>
<Context>
<Type>LocationCode</Type>
<Value>BEANR</Value>
</Context>
<Context>
<Type>Description</Type>
<Value>Vessel departure</Value>
</Context>
</ContextCollection>
</Event>
</UniversalEvent>
</Body>
</UniversalInterchange>
| Element | Value |
|---|---|
SenderID | Always DOCKFLOW. If your CargoWise accepts messages only from known senders, allow it. |
RecipientID | The recipient ID of the destination. |
DataTarget | Type ForwardingShipment, key the tradeflow reference. |
EventTime | The actual time, in local time at the location, with its UTC offset. |
EventType | The CargoWise event type mapped from the Dockflow milestone code. |
EventReference | Dockflow's ID of the milestone. |
ContainerNumber, LocationCode, Description | The container, the UN/LOCODE and the milestone text, each when known. |
Delivery rulesโ
- Only actual milestones are sent, never estimates, and only milestones whose code is in the event codes.
- Each event is sent once. When Dockflow later corrects the actual time of a milestone, the event is sent again with the same
EventReferenceand the newEventTime. - When one tradeflow update brings several new events, they are sent oldest first.
- A
2xxanswer counts as delivered. A4xxanswer counts as a refusal and that event is not sent again. A5xx, a timeout or a connection error is retried, and the event stays due until it is delivered. - In Dry run, events are built and recorded in the delivery history but not counted as sent. They go out with the next update of that tradeflow after you switch the destination to Live.
- Without a recipient ID, nothing is sent and the delivery history shows the error.
- Send test posts the latest actual departure or arrival of one of your own tradeflows, named by its reference.
Every call appears in the destination's delivery history with the exact XML that was sent.
Need help?โ
Email [email protected]. Engineers typically respond within one business day.