Skip to main content

๐Ÿ”„ CargoWise eAdaptor

Dockflow connects to CargoWise through eAdaptor, in both directions:

DirectionWhat travelsSet up in
CargoWise โ†’ DockflowYour 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 โ†’ CargoWiseEach 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โ€‹

  1. In the API Console, open Integrations and go to System Integrations.
  2. Open CargoWise eAdaptor and fill in:
FieldWhat to enter
eAdaptor usernameThe username CargoWise sends with each push. Choose any value.
eAdaptor passwordAt 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.
  1. 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.

  1. Save. Generating a new password later replaces the old one at once: CargoWise cannot push until you enter the new password there too.
Test mode first

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:

  1. Destination URL: the push URL from the console.
  2. Authentication: HTTP Basic, with the eAdaptor username and password from the console.
  3. Message: Universal Shipment XML.
  4. 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:

BodyDockflow 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 200 means 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 fieldTaken from
Tradeflow referenceDataContext โ€บ DataSource โ€บ Key, the job number (e.g. S00012345).
ContainersContainerCollection โ€บ 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 ladingThe consol's WayBillNumber. For a shipment without consol: its WayBillNumber when WayBillType is MWB.
BookingBookingConfirmationReference, else the first CarrierBookingReference on a transport leg.
Port of loading / dischargePortOfLoading โ€บ Code and PortOfDischarge โ€บ Code, when a 5-character UN/LOCODE.
VesselVesselName.
CarrierThe ShippingLineAddress company name, else the carrier on a transport leg.
ETD / ETAEstimatedDeparture of the first transport leg and EstimatedArrival of the last.
PartnersConsignorDocumentaryAddress 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 CargoWiseJobTypeDataSource โ€บ Type, e.g. ForwardingShipment.
Custom reference CargoWiseHouseBillThe 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โ€‹

StatusMeaningWhat to do in CargoWise
200Received and queued.Nothing.
400The body is empty, or Content-Length is not a number.Check the message the connection sends.
401The 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.
413The body is larger than 32 MiB.Send fewer messages per call.
429Too 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.
503Dockflow 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โ€‹

  1. In the API Console, open API Keys โ€บ Webhooks and add a destination.
  2. URL: the eAdaptor receiving address of your CargoWise system that accepts Universal XML over HTTPS. It must use https and must not contain a username or password.
  3. What to send: Shipment updates.
  4. Event format: CargoWise eAdaptor.
  5. CargoWise recipient ID: the enterprise code of the CargoWise system that receives the events. It goes into RecipientID of each message.
  6. Event codes (optional): which Dockflow milestones to send and the CargoWise event type for each, as CODE=TYPE pairs separated by commas. Leave empty for VD=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.
  7. Headers: the credentials your CargoWise receiving address expects, e.g. Authorization: Basic โ€ฆ.
  8. 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>
ElementValue
SenderIDAlways DOCKFLOW. If your CargoWise accepts messages only from known senders, allow it.
RecipientIDThe recipient ID of the destination.
DataTargetType ForwardingShipment, key the tradeflow reference.
EventTimeThe actual time, in local time at the location, with its UTC offset.
EventTypeThe CargoWise event type mapped from the Dockflow milestone code.
EventReferenceDockflow's ID of the milestone.
ContainerNumber, LocationCode, DescriptionThe 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 EventReference and the new EventTime.
  • When one tradeflow update brings several new events, they are sent oldest first.
  • A 2xx answer counts as delivered. A 4xx answer counts as a refusal and that event is not sent again. A 5xx, 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.

Was this page helpful?