The Freight Bookings API provides a 24/7 connection between our customers system and KiwiRail's system allowing customers to send automatic electronic messages to create, update and cancel scheduled and unscheduled bookings with KiwiRail. This provides an opportunity for B2B integration without the need for manual intervention, delivering improved processing time, fewer errors, integration of business data, and process optimisation.
Provided below is a swagger file for our customers to use to be able to create bookings through our Freight Bookings API. The swagger file is provided in a JSON format. If you would like to know what each parameter refers to, you can simply download the Swagger Definition document or download the swagger file and use an online tool such as (Swagger Editor) to view these details.
Freight Booking Swagger File: Swagger File V1.0.12 (you can save this as a .json file)
Swagger Definition Document: Booking Swagger Definition Document | Bookings Specifications
Samples: Sample Request | Sample Response
Reference Data: EquipmentGroup | EquipmentClass
Customers can validate successful unscheduled booking requests with the sample files provided against the test end points before making live booking requests into production. This will provide assurance that a return booking confirmation has been successfully received from KiwiRail.
TEST Request
Description: Create unscheduled booking
URL: https://api-uat.kiwirail.co.nz:444/V1/bookings
Method: POST
Description: Update unscheduled booking
URL: https://api-uat.kiwirail.co.nz:444/V1/bookings/<bookingid>
Method: PUT
Description: Cancel unscheduled booking
URL: https://api-uat.kiwirail.co.nz:444/V1/bookings/<bookingid>
Method: DELETE
PROD Request
Description: Create unscheduled booking
URL: https://api.kiwirail.co.nz/V1/bookings
Method: POST
Description: Update unscheduled booking
URL: https://api.kiwirail.co.nz/V1/bookings/<bookingid>
Method: PUT
Description: Cancel unscheduled booking
URL: https://api.kiwirail.co.nz/V1/bookings/<bookingid>
Method: DELETE