Freight Bookings API

The Freight Bookings API provides 24/7 connection between our customers system and KiwiRail's system allowing customers to send automatic electronic messages to create, update and cancel unschedualed bookings with KiwiRail. This provides and oppertunity for B2B integration without the need  for any manual processes delivering; improved processing time, reduction in errors, integration of business data, and process optimisation.

Provide 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 request 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