Skip to main content
Skip table of contents

Cancel a Created Booking

Cancel Booking Endpoint

Production URI

Method

Description

https://api.kiwirail.co.nz/V1/bookings/<bookingid>

DELETE

Cancel unscheduled booking

Test URI

Method

Description

https://api-uat.kiwirail.co.nz:444/V1/bookings/<bookingid>

DELETE

Cancel unscheduled booking

Cancel Booking Body Request

CODE
{
  "bookingReference": "string",
  "cancellationReason": "string"
}

Cancel Booking Request Data Definition

Table of Definitions

Field

Required?

Data Type

Description

bookingReference

mandatory

string

A customer supplied reference that uniquely identifies the booking to cancel. This field along with bookingID is used to identify the booking.

cancellationReason

optional

string

The reason that the booking is cancelled.

Cancel Booking Request Headers

Table of Values

Header

Value

Comment

bookingID *required

String

The booking ID of the booking to update

version *required

1

API version

transactionID

FONTERRA_20171107131313_3dc7ffca-fd28-49ba-9636-1ff66bfe5341

Identifies a group of messages

currentSystem

Fonterra Bookings

Name of originating system

userInitiatingRequest

email

Name of any logged in user

creationTimestamp *required

2017-11-07 13:13:13:123 NZDT

When the message was created

auditCategory

string

Holds a string that can be used to collect log information over all services.

payloadEncrypted

Boolean

If true the payload is encrypted, when false it is not. This is set for the content encryption(like GPG), not the connection (like SSL)

payloadEncoding

string

When the payload is text, it should contain the text encoding (Like 'UTF-8'), if binary, the encoding is binary When the payload is encrypted, the encoding should be the encoding of the unencrypted payload. If the payload type is not known, or not disclosed, the value is pass through

debug

0

If 0 then do not log in debug mode, if 1 then log.

retryNumber

0

How many retries have been made

Cache-Control

no-cache

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

previousID

string

If this is a next message in a communication sequence, the message that triggered this one. For instance message 'aa' created this message 'bb' the PreviousID equals 'aa'. If this is the first message, the value is null

payloadSignature

string

Optional payload signature for cases where nonrepudiation is required.

Cancel Booking Sample Response Body

Code Snippet
CODE
{
CODE
  "bookingID": "string",
CODE
  "bookingReference": "string",
CODE
  "cancellationReason": "string"
CODE
}

Cancel Booking Response Data Definition

Table of Definitions

Field

Required?

Data Type

Description

bookingID

mandatory

string

The KiwiRail unique ID that identified the CTMS to cancel. This field along with bookingReference was used to identify the booking.

bookingReference

mandatory

string

A customer supplied reference that uniquely identified the booking to cancel. This field along with bookingID was used to identify the booking.

cancellationReason

mandatory

string

The reason that the booking is cancelled.

Cancel Booking Response Headers (HTTP 200)

Table of Values

Header

Value

Comment

version

1

API version

transactionID

FONTERRA_20171107131313_3dc7ffca-fd28-49ba-9636-1ff66bfe5341

Identifies a group of messages

messageID

string

Message ID should only exist for the message between two systems, so a stream over three components will use two messageIDs one for component A to B and one from B to C. This value cannot be set by the caller.

currentSystem

Fonterra Bookings

Name of originating system

userInitiatingRequest

email

Name of any logged in user

creationTimestamp

2017-11-07 13:13:13:123 NZDT

When the message was created

auditCategory

string

Holds a string that can be used to collect log information over all services.

payloadEncrypted

Boolean

If true the payload is encrypted, when false it is not. This is set for the content encryption(like GPG), not the connection (like SSL)

payloadEncoding

string

When the payload is text, it should contain the text encoding (Like 'UTF-8'), if binary, the encoding is binary When the payload is encrypted, the encoding should be the encoding of the unencrypted payload. If the payload type is not known, or not disclosed, the value is pass-through

debug

0

If 0 then do not log in debug mode, if 1 then log.

retryNumber

0

How many retries have been made

Cache-Control

no-cache

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.