FAQs

How do I generate tokens?

During the KiwiRail EDI onboarding process you will need to contact the Customer Service Centre support line (on 0800 351 351 extn 2, 2) or email contact@kiwirail.co.nz in order for us to generate access and refresh tokens.

 

How do I extract my tokens received?

Use 7zip to extract tokens received. Please do not use winzip as it does not support the level of encryption. 

 

How long are my tokens valid for?

The tokens provided by KiwiRail are valid for 30 days. If the tokens have not been refreshed within the 30 days, the tokens will expire and can no longer be used to create, update or cancel a booking.

 

I haven't received the tokens via email. What should I do?

Please contact your email administrator to unblock any email from Kiwirail containing encrypted zip attachment.

 

How do I refresh my tokens?

You need to refresh the tokens yourself before the token expires. Use the refresh token to generate a new pair of access and refresh tokens by calling the refresh endpoint.

 

What happens if I refresh my tokens?

A refresh token can only be used once and will generate a new pair of access and refresh tokens. Please note: once you have refreshed your tokens, you can no longer use any previously generated tokens to create, update or cancel a booking.

 

What happens if I've forgotten to refresh my token, and it is now expired?

If the tokens are expired, you will no longer be able to create, update or cancel a booking using the expired tokens. You will need to contact the Customer Service Centre support line to generate a new set of access and refresh tokens. Please contact by phone on 0800 351 351 (extn 2, 2) or email contact@kiwirail.co.nz.

 

What happens if refreshing my token hasn't worked?

You can try again but remember your refresh token can only be used once so if it has been consumed you will need to contact the Customer Service Centre support line to request new tokens to be generated.

 

How do I create, update or cancel an EDI booking?

Use the access token to send a create, update or cancel booking request by calling the booking endpoint.

 

Cancelling an EDI booking?

Cancel booking will cancel the Booking for the Booking ID supplied in the request where it is eligible to be cancelled. Yo can only cancel bookings created by you through EDI. A booking cannot be cancelled if equipment has been received by KiwiRail.

Where the booking cannot be cancelled through EDI, please contact the Customer Contact Centre.

 

How does update booking work?

Update booking will cancel the existing booking (BookingID supplied in the request) where eligible and create a new unscheduled booking with the updated details supplied in the update message. If the cancel and create is successful a new Booking ID will be returned.

 

What happens if I'm getting an error when trying to create, update or cancel a booking?

Refer to our troubleshooting guide for how to help on how to resolve these errors. If you aren't able to find the help you need here, please contact the Customer Service Centre support line on 0800 351 351 (extn 2, 2) or email contact@kiwirail.co.nz.