KiwiRail automatically sends EDI notifications when your bookings are created or modified, and when your freight is gated in or out of our network.
These notifications are primarily sent as an XML flat file to your chosen email address, either as an attachment or within the email body. We can also send notifications in HTML format for easier readability.
Types of Messages
Booking Confirmations
Booking confirmations can be sent whenever a booking is created or modified. They have all the details of your booking that you need to know.
GateIn/GateOut Notifications:
GateIn/GateOut notifications can be sent when your freight is checked into our network at origin and when it’s checked out at destination. These notifications give you exact times of when KiwiRail received and released custody of the freight, Additionally, they offer essential details about the truck or wagon that handled your freight during its time in our care.
Message Types
Transmission Methods
Examples
The GateIn and GateOut notifications are as an XML by email. Examples are below:
GateOut XML Example: Booking from New Plymouth to Tauranga
XML
<message xmlns:tns="http://www.kiwirail.co.nz/GateInOutSchema_v_2_0">
<header>
<messageID>GATEOUTXXXXXXXXX</messageID>
<timestamp>YYYY-MM-DDTHH:MM:SS</timestamp>
<senderID>KIWIRAIL</senderID>
<receiverID>YOURCOMPANY</receiverID>
</header>
<gateEvent gateType="GATEOUT">
<booker>
<name>YOUR COMPANY</name>
<address1>XXX</address1>
<address2>XXX</address2>
<phone/>
<email>YOUREMAIL.CO.NZ</email>
<suburb/>
<location>
<location>AUCKLAND</location>
<UNLocation>NZAKL</UNLocation>
</location>
</booker>
<freightPayer>
<name>YOUR COMPANY</name>
<address1>XXX</address1>
<address2>XXX</address2>
<phone>0800 351 351</phone>
<email>YOUREMAIL.CO.NZ</email>
<suburb/>
<location>
<location>AUCKLAND</location>
<UNLocation>NZAKL</UNLocation>
</location>
</freightPayer>
<receiver>
<name>YOUR COMPANY</name>
<address1>XXX</address1>
<address2>XXX</address2>
<phone/>
<email>YOUREMAIL.CO.NZ</email>
<suburb/>
<location>
<location>TAURANGA</location>
<UNLocation>NZTRG</UNLocation>
</location>
</receiver>
<sender>
<name>YOUR COMPANY</name>
<address1>XXX</address1>
<address2>XXX</address2>
<phone/>
<email>YOUREMAIL.CO.NZ</email>
<suburb/>
<location>
<location>NEW PLYMOUTH</location>
<UNLocation>NZNPL</UNLocation>
</location>
</sender>
<equipment equipmentType="CONTAINER">
<equipmentID>KIWI1234567</equipmentID>
<IMEX>
<shipper/>
<shipName/>
<voyageNumber/>
<overseasDestination/>
</shippingReference>
<cutOffTimestamp/>
</releaseNumber>
<customsClearanceNumber/>
<exportEntryNumber/>
</IMEX>
<tareWeight>1234</tareWeight>
<netWeight>1234</netWeight>
<sizeType>2210</sizeType>
<overGauge>false</overGauge>
<orderNumber/>
<loaded>true</loaded>
<gate transitType="TRUCK">
<truck>
<truckID/>
</truck>
</gate>
<service>
<serviceID>X123</serviceID>
<serviceDate>20XX-MM-DD</serviceDate>
<origin>
<location>PNTH</location>
<UNLocation>NZPMR</UNLocation>
</origin>
<destination>
<location>TGA</location>
<UNLocation>NZTRG</UNLocation>
</destination>
</service>
<associatedWagon/>
<associatedGenerator/>
</equipment>
<location>
<location>BPTCO</location>
<UNLocation>NZTRG</UNLocation>
</location>
<timestamp>20XX-XX-XXT01:00:00</timestamp>
<commodityCode>8615</commodityCode>
<comments/>
<bookingID>000ABC1234-0</bookingID>
<origin>
<location>NPLYM</location>
<UNLocation>NZNPL</UNLocation>
</origin>
<destination>
<location>TGA</location>
<UNLocation>NZTRG</UNLocation>
</destination>
<operation>CREATE</operation>
<customerReference>XXX</customerReference>
<commodityDescription>MTY CONTAINERS</commodityDescription>
</gateEvent>
</message>
Limitations
The current limitations of these EDI messages are listed below:
The notifications are set up per KiwiRail Customer code (e.g. a Freight Payer or Sender Code).
The GateIn/GateOut notifications are limited to the freight is entering or exiting our network. Messages will not currently be generated at any other stages throughout the journey.
If you’d like to get these notifications setup, please reach out to our Digital Solutions Team.