Refresh token

The Token API is a new service developed to refresh security tokens for our customers. It uses JWT as a secure authentication and authorization mechanism for sending automatic electronic messages to KiwiRail. Customers can generate their own security tokens using the refresh endpoint before the KiwiRail generated tokens expire.

Provided below is a swagger file for our customers to be able to refresh tokens through our Token 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 Refresh Swagger Document Definition or download the swagger file and use an online tool such as (Swagger Editor) to view these details. 

Refresh Token Swagger File: Token Refresh Swagger File 2.1.5 (you can save this as a .json file)

Refresh Definition Document: Refresh Swagger Document Definition

Refresh Samples: Refresh Request | Refresh Response

 

TEST Request

URL: https://api-uat.kiwirail.co.nz/V1/tokens/refresh

Method: POST

Description: Refresh access and refresh JWTs

 

PROD Request

URL: https://api.kiwirail.co.nz/V1/tokens/refresh

Method: POST

Description: Refresh access and refresh JWTs