{ "swagger": "2.0", "info": { "version": "1.0.12", "title": "bookings", "description": "Web Service for incoming Create/Update/Cancel Booking requests from Customers. Bookings may be scheduled or unscheduled." }, "host": "api.kiwirail.co.nz", "basePath": "/V1/bookings/", "schemes": [ "https" ], "paths": { "/": { "post": { "description": "Create a new EDI booking.", "security": [ { "Bearer": [] } ], "produces": [ "application/json" ], "consumes": [ "application/json" ], "parameters": [ { "name": "version", "in": "header", "type": "integer", "format": "int32", "description": "The version of this message format.", "required": true }, { "name": "transactionID", "in": "header", "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, { "name": "currentSystem", "in": "header", "type": "string", "format": "string", "description": "System that generated the message" }, { "name": "userInitiatingRequest", "in": "header", "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, { "name": "creationTimestamp", "in": "header", "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT", "required": true }, { "name": "auditCategory", "in": "header", "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, { "name": "payloadEncrypted", "in": "header", "type": "boolean", "format": "boolean", "description": "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)" }, { "name": "payloadEncoding", "in": "header", "type": "string", "format": "string", "description": "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 passthrough" }, { "name": "debug", "in": "header", "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, { "name": "retryNumber", "in": "header", "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, { "name": "Cache-Control", "in": "header", "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" }, { "name": "previousID", "in": "header", "type": "string", "format": "string", "description": "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" }, { "name": "payloadSignature", "in": "header", "type": "string", "format": "string", "description": "Optional payload signature for cases where nonrepudiation is required." }, { "name": "body", "in": "body", "description": "Request body", "required": true, "schema": { "$ref": "#/definitions/bookingRequestBody" } } ], "responses": { "201": { "description": "Added booking successfully. Booking has passed CTMS validation. Response includes generated Booking Id.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } }, "schema": { "$ref": "#/definitions/bookingResponseBody" } }, "400": { "description": "Invalid request.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } }, "schema": { "$ref": "#/definitions/errorModel" } }, "401": { "description": "Invalid bearer token.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "403": { "description": "Not authorised for operation.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "429": { "description": "Too many requests. Try issuing fewer requests, or more slowly.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "500": { "description": "Failed operation. Possibly try again later.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "default": { "description": "Error response", "schema": { "$ref": "#/definitions/errorModel" } } } } }, "/{bookingID}": { "put": { "description": "Update an existing EDI booking.", "security": [ { "Bearer": [] } ], "produces": [ "application/json" ], "consumes": [ "application/json" ], "parameters": [ { "name": "bookingID", "in": "path", "type": "string", "format": "string", "description": "The booking ID of the booking to update.", "required": true }, { "name": "version", "in": "header", "type": "integer", "format": "int32", "description": "The version of this message format.", "required": true }, { "name": "transactionID", "in": "header", "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, { "name": "currentSystem", "in": "header", "type": "string", "format": "string", "description": "System that generated the message" }, { "name": "userInitiatingRequest", "in": "header", "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, { "name": "creationTimestamp", "in": "header", "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT", "required": true }, { "name": "auditCategory", "in": "header", "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, { "name": "payloadEncrypted", "in": "header", "type": "boolean", "format": "boolean", "description": "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)" }, { "name": "payloadEncoding", "in": "header", "type": "string", "format": "string", "description": "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 passthrough" }, { "name": "debug", "in": "header", "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, { "name": "retryNumber", "in": "header", "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, { "name": "Cache-Control", "in": "header", "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" }, { "name": "previousID", "in": "header", "type": "string", "format": "string", "description": "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" }, { "name": "payloadSignature", "in": "header", "type": "string", "format": "string", "description": "Optional payload signature for cases where nonrepudiation is required." }, { "name": "body", "in": "body", "description": "Request body", "required": true, "schema": { "$ref": "#/definitions/updateRequestBody" } } ], "responses": { "200": { "description": "Updated booking successfully. Booking has passed CTMS validation. Response includes generated Booking Id. This may not match the original input booking ID.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } }, "schema": { "$ref": "#/definitions/updateResponseBody" } }, "400": { "description": "Invalid request.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } }, "schema": { "$ref": "#/definitions/errorModel" } }, "401": { "description": "Invalid bearer token.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "403": { "description": "Not authorised for operation.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "429": { "description": "Too many requests. Try issuing fewer requests, or more slowly.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "500": { "description": "Failed operation. Possibly try again later.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "default": { "description": "Error response", "schema": { "$ref": "#/definitions/errorModel" } } } }, "delete": { "description": "Cancel a created EDI booking.", "security": [ { "Bearer": [] } ], "produces": [ "application/json" ], "consumes": [ "application/json" ], "parameters": [ { "name": "bookingID", "in": "path", "type": "string", "format": "string", "description": "The booking ID of the booking to cancel.", "required": true }, { "name": "version", "in": "header", "type": "integer", "format": "int32", "description": "The version of this message format.", "required": true }, { "name": "transactionID", "in": "header", "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, { "name": "currentSystem", "in": "header", "type": "string", "format": "string", "description": "System that generated the message" }, { "name": "userInitiatingRequest", "in": "header", "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, { "name": "creationTimestamp", "in": "header", "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT", "required": true }, { "name": "auditCategory", "in": "header", "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, { "name": "payloadEncrypted", "in": "header", "type": "boolean", "format": "boolean", "description": "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)" }, { "name": "payloadEncoding", "in": "header", "type": "string", "format": "string", "description": "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 passthrough" }, { "name": "debug", "in": "header", "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, { "name": "retryNumber", "in": "header", "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, { "name": "Cache-Control", "in": "header", "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" }, { "name": "previousID", "in": "header", "type": "string", "format": "string", "description": "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" }, { "name": "payloadSignature", "in": "header", "type": "string", "format": "string", "description": "Optional payload signature for cases where nonrepudiation is required." }, { "name": "body", "in": "body", "description": "Request body", "required": true, "schema": { "$ref": "#/definitions/cancelRequestBody" } } ], "responses": { "200": { "description": "Cancelled booking successfully. Cancel operation has passed CTMS validation. Response is a reflection of the input cancellation request.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } }, "schema": { "$ref": "#/definitions/cancelResponseBody" } }, "400": { "description": "Invalid request.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } }, "schema": { "$ref": "#/definitions/errorModel" } }, "401": { "description": "Invalid bearer token.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "403": { "description": "Not authorised for operation.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "429": { "description": "Too many requests. Try issuing fewer requests, or more slowly.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "500": { "description": "Failed operation. Possibly try again later.", "headers": { "version": { "type": "integer", "format": "int32", "description": "The version of this message format." }, "transactionID": { "type": "string", "format": "string", "description": "An unique identifier for a set of messages belonging to each other. Can be null if there is no transaction ID attached to this message. Identifier is defined as ___UUID for example" }, "messageID": { "type": "string", "format": "string", "description": "Unique identifier for this message. This is similar to the Mule ESB MessageID who would use this id internally. The 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": { "type": "string", "format": "string", "description": "System that generated the message" }, "userInitiatingRequest": { "type": "string", "format": "string", "description": "User requesting/submitting information Login ID (Firstname.lastname@kiwirail.co.nz)" }, "creationTimestamp": { "type": "string", "format": "date-time", "description": "Date of creation of the message in YYYY-MM-DD hh:mm:ss:ms in NZDT" }, "auditCategory": { "type": "string", "format": "string", "description": "Holds a string that can be used to collect log information over all services. For instance 'nz.co.kiwirail.r9k.financials' can collect all messages with that category and write that to one audit log file. If empty the log information would be written to the generic log solution." }, "payloadEncrypted": { "type": "boolean", "format": "boolean", "description": "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": { "type": "string", "format": "string", "description": "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 passthrough" }, "debug": { "type": "integer", "format": "int32", "description": "Logs all requests if set in debug mode 0 - Don't debug 1 - Debug mode" }, "retryNumber": { "type": "integer", "format": "int32", "description": "Attempts made by calling service to read content" }, "Cache-Control": { "type": "string", "format": "string", "description": "Recommended caching time for services to expire (When data should be refreshed. ) (When data should be refreshed. ) The directives can be used max-age, s-max-age, private/public, no-cache, no-store, must-revalidate, proxy-revalidate" } } }, "default": { "description": "Error response", "schema": { "$ref": "#/definitions/errorModel" } } } } } }, "securityDefinitions": { "Bearer": { "type": "apiKey", "name": "Authorization", "in": "header" } }, "definitions": { "errorModel": { "type": "object", "properties": { "errors": { "type": "array", "items": { "description": "An array of error items containing error codes and descriptions. Note that the error descriptions will be normalised.", "properties": { "code": { "type": "integer", "format": "int32", "description": "An error code - should be used in conjunction with the HTTP response code." }, "description": { "type": "string", "description": "A short description of the error." } } } }, "_links": { "type": "array", "items": { "properties": { "rel": { "type": "string", "description": "The relationship to the request e.g. self which contains the resource that was requested or {object name}, a link to a resource that is related to the requested resource" }, "href": { "type": "string", "description": "A link to the related resource. In an error scenario this is likely to be something such as a link to a support portal." } } } } } }, "bookingRequestBody": { "type": "object", "required": [ "bookingReference", "freightPayerCode", "freightAvailable", "freightRequiredAtDestination", "commodity", "equipmentAttributes", "customerReference" ], "properties": { "bookingSource": { "type": "string", "title": "The Bookingsource Schema", "description": "Identifies the channel by which the booking was received, for example, email, phone, EDI.", "default": "EDI" }, "bookingReference": { "type": "string", "title": "The BookingReference Schema", "description": "A customer supplied reference that uniquely identifies this booking request.", "default": "" }, "bookingType": { "type": "string", "title": "The Bookingtype Schema", "description": "The type of booking to be created, standard, repeat master (recurring booking), cash sale, service recovery. The default for EDI bookings will be 'Standard'", "default": "standard" }, "bookerCode": { "type": "string", "title": "The Bookercode Schema", "description": "The Customer Address Code for the party requesting the booking.", "default": "" }, "freightPayerCode": { "type": "string", "title": "The Freightpayercode Schema", "description": "The Customer Address Code for the Freight Payer, that is the customer address (and associated customer account) that will be invoiced for the booking.", "default": "" }, "senderCode": { "type": "string", "title": "The Sendercode Schema", "description": "The Customer Address Code for the address from which the freight is originating. If this is not supplied then Sender Address details must be supplied in order to identify the Sender Code.", "default": "" }, "railOrigin": { "type": "string", "title": "The Railorigin Schema", "description": "The Location Code for the 'on rail' location from where the freight will travel. If not provided this will be derived from the Sender Code using the following rules. If the Sender Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Sender Address is not associated to a Siding then this will be the CT Site linked to the Sender Address.", "default": "" }, "exCTorSiding": { "type": "string", "title": "The Exctorsiding Schema", "description": "Determines whether the freight will travel from a Siding or a CT Site. If not supplied then this will default using the same rules as for railOrigin. If provided the Customers Sender Address must be associated to a siding in order to place an ex siding booking. Any sender address can request an ex CT booking.", "default": "" }, "doorPickupRequired": { "type": "boolean", "title": "The Doorpickuprequired Schema", "description": "For ex CT bookings defines whether the customer requires their freight to be collected from their sender address and transported to the CT site. Where this is required, door pickup details must also be provided to create the required transport orders.", "default": false }, "senderAddress": { "$ref": "#/definitions/senderAddress" }, "receiverCode": { "type": "string", "title": "The Receivercode Schema", "description": "The Customer Address Code for the address to which the freight is destined. If this is not supplied then Receiver Address details must be supplied in order to identify the Receiver Code.", "default": "" }, "railDestination": { "type": "string", "title": "The Raildestination Schema", "description": "The Location Code for the 'on rail' location to where the freight will travel. If not provided this will be derived from the Receiver Code using the following rules. If the Receiver Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Receiver Address is not associated to a Siding then this will be the CT Site linked to the Receiver Address City.", "default": "" }, "toCTorSiding": { "type": "string", "title": "The Toctorsiding Schema", "description": "Determines whether the freight will travel to a Siding or a CT Site. If not supplied then this will default using the same rules as for railDestination. If provided the Customers Receiver Address must be associated to a siding in order to place a to siding booking. Any receiver address can request a to CT booking.", "default": "" }, "doorDropoffRequired": { "type": "boolean", "title": "The Doordropoffrequired Schema", "description": "For to CT bookings defines whether the customer requires their freight to be collected from the CT Site and delivered to their receiver address. Where this is required, door dropoff details must also be provided to create the required transport orders.", "default": false }, "receiverAddress": { "$ref": "#/definitions/receiverAddress" }, "freightAvailable": { "type": "string", "title": "The Freightavailable Schema", "description": "The date and time when the freight will be available to travel. For an exCT booking this is the date and time that the freight will be at the CT site. For siding freight this is the time the freight will be loaded and ready to travel.", "default": "" }, "freightRequiredAtDestination": { "type": "string", "title": "The Freightrequiredatdestination Schema", "description": "The date and time when the customer requires the freight to reach destination. For a toCT booking this is the date and time that the freight will be required to reach the CT site. For toSiding bookings this should be when the wagons are required to be placed at the siding.", "default": "" }, "scheduleBooking": { "type": "boolean", "title": "The Schedulebooking Schema", "description": "true/false indicates whether the booking needs to be scheduled or left as an unscheduled booking.", "default": false }, "scheduleTo": { "type": "string", "title": "The Scheduleto Schema", "description": "'freightAvailable' or 'freightRequiredAtDestination' indicates whether the booking needs to be scheduled to when the freight is available to travel or to when the freight is required at destination. Typically inbound empty supply will be scheduled to the service that gets the equipment to destination by when it is required at destination whereas outbound loads will be booked to the first service departing after the freight is available to travel.", "default": "freightAvailable" }, "scheduleWaitlistOK": { "type": "boolean", "title": "The ScheduleWaitlistOK Schema", "description": "true/false indicates whether it is ok for the booking to be waitlisted if there is no available capacity and the service allows waitlisting. This option will only be used where the customer is set up to allow 'waitlisting'", "default": false }, "scheduleFirstOnly": { "type": "boolean", "title": "The ScheduleFirstOnly Schema", "description": "true/false indicates whether to only allow scheduling against the 'first' service that satisfies the customer requirement. Where 'true' it will not search for services with available capacity but rather attempt to book to the 'first' service that meets the requirement. If no capacity is available it will check whether waitlisting is allowed. If it is, it will waitlist, else it will reject the booking with 'No Capacity Available'.", "default": false }, "customerReference": { "type": "string", "title": "The Customerreference Schema", "description": "The customer reference for the booking, typically this will be the Customer Purchase Order Number.", "default": "" }, "releaseNumber": { "type": "string", "title": "The Releasenumber Schema", "description": "The Shipping line booking reference which is used to release empty container from the container park and supplied to the Port when delivering freight to be shipped.", "default": "" }, "commodity": { "type": "string", "title": "The Commodity Schema", "description": "The commodity code for the freight to be moved in the booking.", "default": "" }, "equipmentCategory": { "type": "string", "title": "The Equipmentcategory Schema", "description": "Wagon/Container indicates the type of equipment being booked.", "default": "" }, "doorPickUp": { "$ref": "#/definitions/doorPickUp" }, "doorDropOff": { "$ref": "#/definitions/doorDropOff" }, "equipmentAttributes": { "$ref": "#/definitions/equipmentAttributes" }, "imexAttributes": { "$ref": "#/definitions/imexAttributes" }, "bookerEmail": { "type": "string", "title": "Email of the booker", "description": "If the booker requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "senderEmail": { "type": "string", "title": "Email of the sender", "description": "If the sender requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "receiverEmail": { "type": "string", "title": "Email of the receiver", "description": "If the receiver requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "scheduleServices": { "$ref": "#/definitions/scheduleServices" } } }, "bookingResponseBody": { "type": "object", "required": [ "bookingID", "bookingReference", "freightPayerCode", "freightAvailable", "freightRequiredAtDestination", "commodity", "equipmentAttributes", "customerReference" ], "properties": { "bookingID": { "type": "string", "title": "The bookingID Schema", "description": "A unique ID to be generated by CTMS.", "default": "" }, "bookingSource": { "type": "string", "title": "The Bookingsource Schema", "description": "Identifies the channel by which the booking was received, for example, email, phone, EDI.", "default": "EDI" }, "bookingReference": { "type": "string", "title": "The BookingReference Schema", "description": "A customer supplied reference that uniquely identifies this booking request.", "default": "" }, "bookingType": { "type": "string", "title": "The Bookingtype Schema", "description": "The type of booking to be created, standard, repeat master (recurring booking), cash sale, service recovery. The default for EDI bookings will be 'Standard'", "default": "standard" }, "bookerCode": { "type": "string", "title": "The Bookercode Schema", "description": "The Customer Address Code for the party requesting the booking.", "default": "" }, "freightPayerCode": { "type": "string", "title": "The Freightpayercode Schema", "description": "The Customer Address Code for the Freight Payer, that is the customer address (and associated customer account) that will be invoiced for the booking.", "default": "" }, "senderCode": { "type": "string", "title": "The Sendercode Schema", "description": "The Customer Address Code for the address from which the freight is originating. If this is not supplied then Sender Address details must be supplied in order to identify the Sender Code.", "default": "" }, "railOrigin": { "type": "string", "title": "The Railorigin Schema", "description": "The Location Code for the 'on rail' location from where the freight will travel. If not provided this will be derived from the Sender Code using the following rules. If the Sender Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Sender Address is not associated to a Siding then this will be the CT Site linked to the Sender Address.", "default": "" }, "exCTorSiding": { "type": "string", "title": "The Exctorsiding Schema", "description": "Determines whether the freight will travel from a Siding or a CT Site. If not supplied then this will default using the same rules as for railOrigin. If provided the Customers Sender Address must be associated to a siding in order to place an ex siding booking. Any sender address can request an ex CT booking.", "default": "" }, "doorPickupRequired": { "type": "boolean", "title": "The Doorpickuprequired Schema", "description": "For ex CT bookings defines whether the customer requires their freight to be collected from their sender address and transported to the CT site. Where this is required, door pickup details must also be provided to create the required transport orders.", "default": false }, "senderAddress": { "$ref": "#/definitions/senderAddress" }, "receiverCode": { "type": "string", "title": "The Receivercode Schema", "description": "The Customer Address Code for the address to which the freight is destined. If this is not supplied then Receiver Address details must be supplied in order to identify the Receiver Code.", "default": "" }, "railDestination": { "type": "string", "title": "The Raildestination Schema", "description": "The Location Code for the 'on rail' location to where the freight will travel. If not provided this will be derived from the Receiver Code using the following rules. If the Receiver Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Receiver Address is not associated to a Siding then this will be the CT Site linked to the Receiver Address City.", "default": "" }, "toCTorSiding": { "type": "string", "title": "The Toctorsiding Schema", "description": "Determines whether the freight will travel to a Siding or a CT Site. If not supplied then this will default using the same rules as for railDestination. If provided the Customers Receiver Address must be associated to a siding in order to place a to siding booking. Any receiver address can request a to CT booking.", "default": "" }, "doorDropoffRequired": { "type": "boolean", "title": "The Doordropoffrequired Schema", "description": "For to CT bookings defines whether the customer requires their freight to be collected from the CT Site and delivered to their receiver address. Where this is required, door dropoff details must also be provided to create the required transport orders.", "default": false }, "receiverAddress": { "$ref": "#/definitions/receiverAddress" }, "freightAvailable": { "type": "string", "title": "The Freightavailable Schema", "description": "The date and time when the freight will be available to travel. For an exCT booking this is the date and time that the freight will be at the CT site. For siding freight this is the time the freight will be loaded and ready to travel.", "default": "" }, "freightRequiredAtDestination": { "type": "string", "title": "The Freightrequiredatdestination Schema", "description": "The date and time when the customer requires the freight to reach destination. For a toCT booking this is the date and time that the freight will be required to reach the CT site. For toSiding bookings this should be when the wagons are required to be placed at the siding.", "default": "" }, "scheduleBooking": { "type": "boolean", "title": "The Schedulebooking Schema", "description": "true/false indicates whether the booking needs to be scheduled or left as an unscheduled booking.", "default": false }, "scheduleTo": { "type": "string", "title": "The Scheduleto Schema", "description": "'freightAvailable' or 'freightRequiredAtDestination' indicates whether the booking needs to be scheduled to when the freight is available to travel or to when the freight is required at destination. Typically inbound empty supply will be scheduled to the service that gets the equipment to destination by when it is required at destination whereas outbound loads will be booked to the first service departing after the freight is available to travel.", "default": "freightAvailable" }, "scheduleWaitlistOK": { "type": "boolean", "title": "The ScheduleWaitlistOK Schema", "description": "true/false indicates whether it is ok for the booking to be waitlisted if there is no available capacity and the service allows waitlisting. This option will only be used where the customer is set up to allow 'waitlisting'", "default": false }, "scheduleFirstOnly": { "type": "boolean", "title": "The ScheduleFirstOnly Schema", "description": "true/false indicates whether to only allow scheduling against the 'first' service that satisfies the customer requirement. Where 'true' it will not search for services with available capacity but rather attempt to book to the 'first' service that meets the requirement. If no capacity is available it will check whether waitlisting is allowed. If it is, it will waitlist, else it will reject the booking with 'No Capacity Available'.", "default": false }, "customerReference": { "type": "string", "title": "The Customerreference Schema", "description": "The customer reference for the booking, typically this will be the Customer Purchase Order Number.", "default": "" }, "releaseNumber": { "type": "string", "title": "The Releasenumber Schema", "description": "The Shipping line booking reference which is used to release empty container from the container park and supplied to the Port when delivering freight to be shipped.", "default": "" }, "commodity": { "type": "string", "title": "The Commodity Schema", "description": "The commodity code for the freight to be moved in the booking.", "default": "" }, "equipmentCategory": { "type": "string", "title": "The Equipmentcategory Schema", "description": "Wagon/Container indicates the type of equipment being booked.", "default": "" }, "doorPickUp": { "$ref": "#/definitions/doorPickUp" }, "doorDropOff": { "$ref": "#/definitions/doorDropOff" }, "equipmentAttributes": { "$ref": "#/definitions/equipmentAttributesResponse" }, "imexAttributes": { "$ref": "#/definitions/imexAttributes" }, "bookerEmail": { "type": "string", "title": "Email of the booker", "description": "If the booker requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "senderEmail": { "type": "string", "title": "Email of the sender", "description": "If the sender requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "receiverEmail": { "type": "string", "title": "Email of the receiver", "description": "If the receiver requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "scheduleStatus": { "type": "string", "title": "The result from scheduling", "description": "The result of the scheduling request where this was requested and it was able to schedule any equipment. This will be Complete (fully scheduled), Partial (partially scheduled).", "default": "" }, "errors": { "$ref": "#/definitions/errorModel/properties/errors" }, "_links": { "$ref": "#/definitions/errorModel/properties/_links" } } }, "updateRequestBody": { "type": "object", "required": [ "bookingReference", "freightPayerCode", "freightAvailable", "freightRequiredAtDestination", "commodity", "equipmentAttributes", "customerReference" ], "properties": { "bookingSource": { "type": "string", "title": "The Bookingsource Schema", "description": "Identifies the channel by which the booking was received, for example, email, phone, EDI.", "default": "EDI" }, "bookingReference": { "type": "string", "title": "The BookingReference Schema", "description": "A customer supplied reference that uniquely identifies the booking to update. This field along with bookingID is used to identify the booking to update.", "default": "" }, "bookingType": { "type": "string", "title": "The Bookingtype Schema", "description": "The type of booking to be created, standard, repeat master (recurring booking), cash sale, service recovery. The default for EDI bookings will be 'Standard'", "default": "standard" }, "bookerCode": { "type": "string", "title": "The Bookercode Schema", "description": "The Customer Address Code for the party requesting the booking.", "default": "" }, "freightPayerCode": { "type": "string", "title": "The Freightpayercode Schema", "description": "The Customer Address Code for the Freight Payer, that is the customer address (and associated customer account) that will be invoiced for the booking.", "default": "" }, "senderCode": { "type": "string", "title": "The Sendercode Schema", "description": "The Customer Address Code for the address from which the freight is originating. If this is not supplied then Sender Address details must be supplied in order to identify the Sender Code.", "default": "" }, "railOrigin": { "type": "string", "title": "The Railorigin Schema", "description": "The Location Code for the 'on rail' location from where the freight will travel. If not provided this will be derived from the Sender Code using the following rules. If the Sender Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Sender Address is not associated to a Siding then this will be the CT Site linked to the Sender Address.", "default": "" }, "exCTorSiding": { "type": "string", "title": "The Exctorsiding Schema", "description": "Determines whether the freight will travel from a Siding or a CT Site. If not supplied then this will default using the same rules as for railOrigin. If provided the Customers Sender Address must be associated to a siding in order to place an ex siding booking. Any sender address can request an ex CT booking.", "default": "" }, "doorPickupRequired": { "type": "boolean", "title": "The Doorpickuprequired Schema", "description": "For ex CT bookings defines whether the customer requires their freight to be collected from their sender address and transported to the CT site. Where this is required, door pickup details must also be provided to create the required transport orders.", "default": false }, "senderAddress": { "$ref": "#/definitions/senderAddress" }, "receiverCode": { "type": "string", "title": "The Receivercode Schema", "description": "The Customer Address Code for the address to which the freight is destined. If this is not supplied then Receiver Address details must be supplied in order to identify the Receiver Code.", "default": "" }, "railDestination": { "type": "string", "title": "The Raildestination Schema", "description": "The Location Code for the 'on rail' location to where the freight will travel. If not provided this will be derived from the Receiver Code using the following rules. If the Receiver Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Receiver Address is not associated to a Siding then this will be the CT Site linked to the Receiver Address City.", "default": "" }, "toCTorSiding": { "type": "string", "title": "The Toctorsiding Schema", "description": "Determines whether the freight will travel to a Siding or a CT Site. If not supplied then this will default using the same rules as for railDestination. If provided the Customers Receiver Address must be associated to a siding in order to place a to siding booking. Any receiver address can request a to CT booking.", "default": "" }, "doorDropoffRequired": { "type": "boolean", "title": "The Doordropoffrequired Schema", "description": "For to CT bookings defines whether the customer requires their freight to be collected from the CT Site and delivered to their receiver address. Where this is required, door dropoff details must also be provided to create the required transport orders.", "default": false }, "receiverAddress": { "$ref": "#/definitions/receiverAddress" }, "freightAvailable": { "type": "string", "title": "The Freightavailable Schema", "description": "The date and time when the freight will be available to travel. For an exCT booking this is the date and time that the freight will be at the CT site. For siding freight this is the time the freight will be loaded and ready to travel.", "default": "" }, "freightRequiredAtDestination": { "type": "string", "title": "The Freightrequiredatdestination Schema", "description": "The date and time when the customer requires the freight to reach destination. For a toCT booking this is the date and time that the freight will be required to reach the CT site. For toSiding bookings this should be when the wagons are required to be placed at the siding.", "default": "" }, "scheduleBooking": { "type": "boolean", "title": "The Schedulebooking Schema", "description": "true/false indicates whether the booking needs to be scheduled or left as an unscheduled booking.", "default": false }, "scheduleTo": { "type": "string", "title": "The Scheduleto Schema", "description": "'freightAvailable' or 'freightRequiredAtDestination' indicates whether the booking needs to be scheduled to when the freight is available to travel or to when the freight is required at destination. Typically inbound empty supply will be scheduled to the service that gets the equipment to destination by when it is required at destination whereas outbound loads will be booked to the first service departing after the freight is available to travel.", "default": "freightAvailable" }, "scheduleWaitlistOK": { "type": "boolean", "title": "The ScheduleWaitlistOK Schema", "description": "true/false indicates whether it is ok for the booking to be waitlisted if there is no available capacity and the service allows waitlisting. This option will only be used where the customer is set up to allow 'waitlisting'", "default": false }, "scheduleFirstOnly": { "type": "boolean", "title": "The ScheduleFirstOnly Schema", "description": "true/false indicates whether to only allow scheduling against the 'first' service that satisfies the customer requirement. Where 'true' it will not search for services with available capacity but rather attempt to book to the 'first' service that meets the requirement. If no capacity is available it will check whether waitlisting is allowed. If it is, it will waitlist, else it will reject the booking with 'No Capacity Available'.", "default": false }, "customerReference": { "type": "string", "title": "The Customerreference Schema", "description": "The customer reference for the booking, typically this will be the Customer Purchase Order Number.", "default": "" }, "releaseNumber": { "type": "string", "title": "The Releasenumber Schema", "description": "The Shipping line booking reference which is used to release empty container from the container park and supplied to the Port when delivering freight to be shipped.", "default": "" }, "commodity": { "type": "string", "title": "The Commodity Schema", "description": "The commodity code for the freight to be moved in the booking.", "default": "" }, "equipmentCategory": { "type": "string", "title": "The Equipmentcategory Schema", "description": "Wagon/Container indicates the type of equipment being booked.", "default": "" }, "doorPickUp": { "$ref": "#/definitions/doorPickUp" }, "doorDropOff": { "$ref": "#/definitions/doorDropOff" }, "equipmentAttributes": { "$ref": "#/definitions/equipmentAttributes" }, "imexAttributes": { "$ref": "#/definitions/imexAttributes" }, "bookerEmail": { "type": "string", "title": "Email of the booker", "description": "If the booker requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "senderEmail": { "type": "string", "title": "Email of the sender", "description": "If the sender requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "receiverEmail": { "type": "string", "title": "Email of the receiver", "description": "If the receiver requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "modificationReason": { "type": "string", "title": "The Modification Reason", "description": "The reason the booking is to be modified.", "default": "Modified at Customer Request" }, "scheduleServices": { "$ref": "#/definitions/scheduleServices" } } }, "updateResponseBody": { "type": "object", "required": [ "bookingID", "bookingReference", "freightPayerCode", "freightAvailable", "freightRequiredAtDestination", "commodity", "equipmentAttributes", "customerReference", "modificationReason" ], "properties": { "bookingID": { "type": "string", "title": "The bookingID Schema", "description": "A unique ID generated by CTMS for the updated booking. This may not match the booking ID in the request.", "default": "" }, "bookingSource": { "type": "string", "title": "The Bookingsource Schema", "description": "Identifies the channel by which the booking was received, for example, email, phone, EDI.", "default": "EDI" }, "bookingReference": { "type": "string", "title": "The BookingReference Schema", "description": "A customer supplied reference that uniquely identified the booking to update.", "default": "" }, "bookingType": { "type": "string", "title": "The Bookingtype Schema", "description": "The type of booking to be created, standard, repeat master (recurring booking), cash sale, service recovery. The default for EDI bookings will be 'Standard'", "default": "standard" }, "bookerCode": { "type": "string", "title": "The Bookercode Schema", "description": "The Customer Address Code for the party requesting the booking.", "default": "" }, "freightPayerCode": { "type": "string", "title": "The Freightpayercode Schema", "description": "The Customer Address Code for the Freight Payer, that is the customer address (and associated customer account) that will be invoiced for the booking.", "default": "" }, "senderCode": { "type": "string", "title": "The Sendercode Schema", "description": "The Customer Address Code for the address from which the freight is originating. If this is not supplied then Sender Address details must be supplied in order to identify the Sender Code.", "default": "" }, "railOrigin": { "type": "string", "title": "The Railorigin Schema", "description": "The Location Code for the 'on rail' location from where the freight will travel. If not provided this will be derived from the Sender Code using the following rules. If the Sender Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Sender Address is not associated to a Siding then this will be the CT Site linked to the Sender Address.", "default": "" }, "exCTorSiding": { "type": "string", "title": "The Exctorsiding Schema", "description": "Determines whether the freight will travel from a Siding or a CT Site. If not supplied then this will default using the same rules as for railOrigin. If provided the Customers Sender Address must be associated to a siding in order to place an ex siding booking. Any sender address can request an ex CT booking.", "default": "" }, "doorPickupRequired": { "type": "boolean", "title": "The Doorpickuprequired Schema", "description": "For ex CT bookings defines whether the customer requires their freight to be collected from their sender address and transported to the CT site. Where this is required, door pickup details must also be provided to create the required transport orders.", "default": false }, "senderAddress": { "$ref": "#/definitions/senderAddress" }, "receiverCode": { "type": "string", "title": "The Receivercode Schema", "description": "The Customer Address Code for the address to which the freight is destined. If this is not supplied then Receiver Address details must be supplied in order to identify the Receiver Code.", "default": "" }, "railDestination": { "type": "string", "title": "The Raildestination Schema", "description": "The Location Code for the 'on rail' location to where the freight will travel. If not provided this will be derived from the Receiver Code using the following rules. If the Receiver Address is associated to a Siding, this will be the 'on rail' location linked to the Siding. If the Receiver Address is not associated to a Siding then this will be the CT Site linked to the Receiver Address City.", "default": "" }, "toCTorSiding": { "type": "string", "title": "The Toctorsiding Schema", "description": "Determines whether the freight will travel to a Siding or a CT Site. If not supplied then this will default using the same rules as for railDestination. If provided the Customers Receiver Address must be associated to a siding in order to place a to siding booking. Any receiver address can request a to CT booking.", "default": "" }, "doorDropoffRequired": { "type": "boolean", "title": "The Doordropoffrequired Schema", "description": "For to CT bookings defines whether the customer requires their freight to be collected from the CT Site and delivered to their receiver address. Where this is required, door dropoff details must also be provided to create the required transport orders.", "default": false }, "receiverAddress": { "$ref": "#/definitions/receiverAddress" }, "freightAvailable": { "type": "string", "title": "The Freightavailable Schema", "description": "The date and time when the freight will be available to travel. For an exCT booking this is the date and time that the freight will be at the CT site. For siding freight this is the time the freight will be loaded and ready to travel.", "default": "" }, "freightRequiredAtDestination": { "type": "string", "title": "The Freightrequiredatdestination Schema", "description": "The date and time when the customer requires the freight to reach destination. For a toCT booking this is the date and time that the freight will be required to reach the CT site. For toSiding bookings this should be when the wagons are required to be placed at the siding.", "default": "" }, "scheduleBooking": { "type": "boolean", "title": "The Schedulebooking Schema", "description": "true/false indicates whether the booking needs to be scheduled or left as an unscheduled booking.", "default": false }, "scheduleTo": { "type": "string", "title": "The Scheduleto Schema", "description": "'freightAvailable' or 'freightRequiredAtDestination' indicates whether the booking needs to be scheduled to when the freight is available to travel or to when the freight is required at destination. Typically inbound empty supply will be scheduled to the service that gets the equipment to destination by when it is required at destination whereas outbound loads will be booked to the first service departing after the freight is available to travel.", "default": "freightAvailable" }, "scheduleWaitlistOK": { "type": "boolean", "title": "The ScheduleWaitlistOK Schema", "description": "true/false indicates whether it is ok for the booking to be waitlisted if there is no available capacity and the service allows waitlisting. This option will only be used where the customer is set up to allow 'waitlisting'", "default": false }, "scheduleFirstOnly": { "type": "boolean", "title": "The ScheduleFirstOnly Schema", "description": "true/false indicates whether to only allow scheduling against the 'first' service that satisfies the customer requirement. Where 'true' it will not search for services with available capacity but rather attempt to book to the 'first' service that meets the requirement. If no capacity is available it will check whether waitlisting is allowed. If it is, it will waitlist, else it will reject the booking with 'No Capacity Available'.", "default": false }, "customerReference": { "type": "string", "title": "The Customerreference Schema", "description": "The customer reference for the booking, typically this will be the Customer Purchase Order Number.", "default": "" }, "releaseNumber": { "type": "string", "title": "The Releasenumber Schema", "description": "The Shipping line booking reference which is used to release empty container from the container park and supplied to the Port when delivering freight to be shipped.", "default": "" }, "commodity": { "type": "string", "title": "The Commodity Schema", "description": "The commodity code for the freight to be moved in the booking.", "default": "" }, "equipmentCategory": { "type": "string", "title": "The Equipmentcategory Schema", "description": "Wagon/Container indicates the type of equipment being booked.", "default": "" }, "doorPickUp": { "$ref": "#/definitions/doorPickUp" }, "doorDropOff": { "$ref": "#/definitions/doorDropOff" }, "equipmentAttributes": { "$ref": "#/definitions/equipmentAttributesResponse" }, "imexAttributes": { "$ref": "#/definitions/imexAttributes" }, "bookerEmail": { "type": "string", "title": "Email of the booker", "description": "If the booker requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "senderEmail": { "type": "string", "title": "Email of the sender", "description": "If the sender requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "receiverEmail": { "type": "string", "title": "Email of the receiver", "description": "If the receiver requires a booking confirmation to be emailed then they must supply an email address to send this to.", "default": "" }, "modificationReason": { "type": "string", "title": "The Modification Reason", "description": "The reason the booking was modified.", "default": "" }, "scheduleStatus": { "type": "string", "title": "The result from scheduling", "description": "The result of the scheduling request where this was requested and it was able to schedule any equipment. This will be Complete (fully scheduled), Partial (partially scheduled).", "default": "" }, "errors": { "$ref": "#/definitions/errorModel/properties/errors" }, "_links": { "$ref": "#/definitions/errorModel/properties/_links" } } }, "cancelRequestBody": { "type": "object", "required": [ "bookingReference" ], "properties": { "bookingReference": { "type": "string", "title": "The BookingReference Schema", "description": "A customer supplied reference that uniquely identifies the booking to cancel. This field along with bookingID is used to identify the booking.", "default": "" }, "cancellationReason": { "type": "string", "title": "The Bookingsource Schema", "description": "The reason that the booking is being cancelled.", "default": "Cancelled at Customer Request" } } }, "cancelResponseBody": { "type": "object", "required": [ "bookingReference", "bookingID", "cancellationReason" ], "properties": { "bookingID": { "type": "string", "title": "The bookingID Schema", "description": "The KiwiRail unique ID that identified the CTMS to cancel. This field along with bookingReference was used to identify the booking.", "default": "" }, "bookingReference": { "type": "string", "title": "The BookingReference Schema", "description": "A customer supplied reference that uniquely identified the booking to cancel. This field along with bookingID was used to identify the booking.", "default": "" }, "cancellationReason": { "type": "string", "title": "The Bookingsource Schema", "description": "The reason that the booking was being cancelled.", "default": "" } } }, "imexAttributes": { "type": "object", "description": "Where the booking is for Imports or Exports the shipping details can be captured.", "properties": { "ship": { "type": "string", "title": "The Ship Schema", "description": "The ship that the freight is on (for inbound) or booked to (outbound)", "default": "" }, "shipOperator": { "type": "string", "title": "The Shipoperator Schema", "description": "The shipping line that operates the ship", "default": "" }, "shipCutOffDateTime": { "type": "string", "title": "The Shipcutoffdatetime Schema", "description": "For export, the time that the freight must reach the Port", "default": "" }, "voyageNumber": { "type": "string", "title": "The Voyagenumber Schema", "description": "The voyage number for the ship sailing", "default": "" }, "nzPort": { "type": "string", "title": "The Nzport Schema", "description": "The NZ Port that the freight is inbound to, or outbound from", "default": "" }, "customsClearanceNumber": { "type": "string", "title": "The Customsclearancenumber Schema", "description": "For imports, the NZ customs clearance number for clearing the goods from the Port", "default": "" }, "overseasDestination": { "type": "string", "title": "The Overseasdestination Schema", "description": "For exports, the overseas Port to which the freight is destined", "default": "" } } }, "senderAddress": { "type": "object", "description": "Optionally the customer can supply address details for the Sender Code to be derived from the Address. The Address Name and City must be supplied, Suburb is optional, in order to return a Customer Address Code.", "required": [ "senderAddressName", "senderAddressCity" ], "properties": { "senderAddressName": { "type": "string", "title": "The Senderaddressname Schema", "description": "The Customer Address Name that can be used to derive the Sender Code.", "default": "" }, "senderAddressSuburb": { "type": "string", "title": "The Senderaddresssuburb Schema", "description": "The Customer Address Suburb that can be used to derive the Sender Code.", "default": "" }, "senderAddressCity": { "type": "string", "title": "The Senderaddresscity Schema", "description": "The Customer Address Town/City that can be used to derive the Sender Code.", "default": "" } } }, "receiverAddress": { "type": "object", "description": "Optionally the customer can supply address details to derive the Receiver Code from the Address. The Address Name and City must be supplied, Suburb is optional, in order to return a Customer Address Code.", "required": [ "receiverAddressName", "receiverAddressCity" ], "properties": { "receiverAddressName": { "type": "string", "title": "The Receiveraddressname Schema", "description": "The Customer Address Name that can be used to derive the Receiver Code.", "default": "" }, "receiverAddressSuburb": { "type": "string", "title": "The Receiveraddresssuburb Schema", "description": "The Customer Address Suburb that can be used to derive the Receiver Code.", "default": "" }, "receiverAddressCity": { "type": "string", "title": "The Receiveraddresscity Schema", "description": "The Customer Address Town/City that can be used to derive the Receiver Code.", "default": "" } } }, "doorPickUp": { "type": "array", "minItems": 0, "maxItems": 2, "description": "indicates whether any transport orders are to be created to transport the empty/loaded container at origin", "items": { "type": "object", "required": [ "moveType", "empty", "pickUpDateTime" ], "properties": { "moveType": { "type": "string", "title": "The Movetype Schema", "description": "origin", "default": "" }, "empty": { "type": "boolean", "title": "The Empty Schema", "description": "true/false indicates whether this is an empty or loaded container", "default": false }, "pickUpDateTime": { "type": "string", "title": "The Pickupdatetime Schema", "description": "The date and time that the container is to be picked up, either at the customer site for a loaded container, or at the container supply site for an empty container.", "default": "" }, "deliveryDateTime": { "type": "string", "title": "The Deliverydatetime Schema", "description": "The date and time that the container is to be picked up, either at the KR CT Site for a loaded container, or at the customer site for an empty container.", "default": "" } } } }, "doorDropOff": { "type": "array", "minItems": 0, "maxItems": 2, "description": "Indicates whether any transport orders are to be created to transport the empty/loaded container at destination.", "items": { "type": "object", "required": [ "moveType", "empty" ], "properties": { "moveType": { "type": "string", "title": "The Movetype Schema", "description": "destination", "default": "" }, "empty": { "type": "boolean", "title": "The Empty Schema", "description": "true/false indicates whether this is an empty or loaded container", "default": false }, "pickUpDateTime": { "type": "string", "title": "The Pickupdatetime Schema", "description": "The date and time that the container is to be picked up, either at the customer site for a loaded container, or at the container supply site for an empty container.", "default": "" }, "deliveryDateTime": { "type": "string", "title": "The Deliverydatetime Schema", "description": "The date and time that the container is to be picked up, either at the KR CT Site for a loaded container, or at the customer site for an empty container.", "default": "" } } } }, "scheduleServices": { "type": "array", "description": "Schedule to Service list", "items": { "type": "object", "required": [ "serviceID" ], "properties": { "serviceID": { "type": "string", "title": "Service ID", "description": "The Service Identifier for the service the equipment to book to ", "default": "" } } } }, "scheduleDetails": { "type": "object", "description": "Where the equipment has been scheduled the schedule details", "required": [ "serviceCutOffDateTime", "arrivalAtDestinationDateTime", "waitlisted" ], "properties": { "serviceCutOffDateTime": { "type": "string", "title": "The service cut off date and time", "description": "This is the date and time that the equipment needs to be checked in at the CT site for ex CT bookings, or manifest received by for ex siging bookings in order for it to travel on the sceduled service", "default": "" }, "arrivalAtDestinationDateTime": { "type": "string", "title": "The release time at destination", "description": "The time the equipment is scheduled to arrive at the destination Rail Terminal", "default": "" }, "expectedAtDestinationDateTime": { "type": "string", "title": "The release time at destination", "description": "The time the equipment is scheduled to be released to the customer at destination" }, "waitlisted": { "type": "boolean", "title": "Confirmed/waitlist indicator", "description": "true/false indicates whether the equipment has been waitlisted or conformed on the Service", "default": false } } }, "equipmentAttributes": { "type": "array", "minItems": 1, "maxItems": 50, "description": "At least one equipment line must exist for a booking.", "items": { "type": "object", "required": [ "netWeight" ], "properties": { "equipmentGroup": { "type": "string", "title": "The Equipmentgroup Schema", "description": "The KiwiRail Equipment Group code of the equipment to be booked. Where the equipment is not KiwiRail supply the customer can specify the Equipment Group and the Equipment Class will default. If the Equipment class is provided the Equipment Group will default from the Class. This must be one of the valid values - refer 'EquipmentGroup'", "default": "" }, "equipmentClass": { "type": "string", "title": "The Equipmentclass Schema", "description": "The KiwiRail Equipment Class code of the equipment to be booked. This must be provided where the equipment is to be supplied by KiwiRail else it may be defaulted from the Equipment Group. This must be one of the valid values - refer 'EquipmentClass'", "default": "" }, "quantity": { "type": "integer", "title": "The Quantity Schema", "description": "The quantity of this group, class and weight of equipment and commodity to be booked.", "default": 1 }, "netWeight": { "type": "integer", "title": "The Netweight Schema", "description": "The net weight of the freight being booked. This must be supplied but may be 0 where the commodity is empty.", "default": 0 }, "reefer": { "type": "boolean", "title": "The Reefer Schema", "description": "true/false indicates whether it is reefer commodity being booked. Where this is 'true' reefer attributes must be supplied for the equipment.", "default": false }, "hazardous": { "type": "boolean", "title": "The Hazardous Schema", "description": "true/false indicates whether it is hazardous commodity being booked. Where this is 'true' haz attributes may be supplied for the equipment.", "default": false }, "kiwiRailSupplyIndicator": { "type": "boolean", "title": "The Kiwirailsupplyindicator Schema", "description": "true/false indicates whether the equipment is to be supplied by KiwiRail. For wagon bookings this will always be 'true'." }, "orderNumber": { "type": "string", "title": "The Ordernumber Schema", "description": "A customer supplied order number for this equipment", "default": "" }, "equipmentID": { "type": "string", "title": "Equipment ID for the container / wagon", "description": "The identifier for the equipment line. This is the container or wagon ID to be moved.", "default": "" }, "underBond": { "type": "boolean", "title": "Container is under bond?", "description": "Indicates whether the container is under bond.", "default": false }, "reeferAttributes": { "$ref": "#/definitions/reeferAttributes" }, "hazAttributes": { "$ref": "#/definitions/hazAttributes" }, "kiwiRailSupplyAttributes": { "type": "object", "required": [ "supplyDateTime" ], "properties": { "supplyDateTime": { "type": "string", "title": "The Supplydatetime Schema", "description": "Where KiwiRail is to supply the equipment this is the date and time that it is required to be supplied. This is required where the kiwiRailSupplyIndicator is true.", "default": "" } } } } } }, "equipmentAttributesResponse": { "type": "array", "minItems": 1, "maxItems": 50, "description": "At least one equipment line must exist for a booking.", "items": { "type": "object", "required": [ "netWeight" ], "properties": { "equipmentGroup": { "type": "string", "title": "The Equipmentgroup Schema", "description": "The KiwiRail Equipment Group code of the equipment to be booked. Where the equipment is not KiwiRail supply the customer can specify the Equipment Group and the Equipment Class will default. If the Equipment class is provided the Equipment Group will default from the Class. This must be one of the valid values - refer 'EquipmentGroup'", "default": "" }, "equipmentClass": { "type": "string", "title": "The Equipmentclass Schema", "description": "The KiwiRail Equipment Class code of the equipment to be booked. This must be provided where the equipment is to be supplied by KiwiRail else it may be defaulted from the Equipment Group. This must be one of the valid values - refer 'EquipmentClass'", "default": "" }, "quantity": { "type": "integer", "title": "The Quantity Schema", "description": "The quantity of this group, class and weight of equipment and commodity to be booked.", "default": 1 }, "netWeight": { "type": "integer", "title": "The Netweight Schema", "description": "The net weight of the freight being booked. This must be supplied but may be 0 where the commodity is empty.", "default": 0 }, "reefer": { "type": "boolean", "title": "The Reefer Schema", "description": "true/false indicates whether it is reefer commodity being booked. Where this is 'true' reefer attributes must be supplied for the equipment.", "default": false }, "hazardous": { "type": "boolean", "title": "The Hazardous Schema", "description": "true/false indicates whether it is hazardous commodity being booked. Where this is 'true' haz attributes may be supplied for the equipment.", "default": false }, "kiwiRailSupplyIndicator": { "type": "boolean", "title": "The Kiwirailsupplyindicator Schema", "description": "true/false indicates whether the equipment is to be supplied by KiwiRail. For wagon bookings this will always be 'true'." }, "orderNumber": { "type": "string", "title": "The Ordernumber Schema", "description": "A customer supplied order number for this equipment", "default": "" }, "equipmentID": { "type": "string", "title": "Equipment ID for the container / wagon", "description": "The identifier for the equipment line. This is the container or wagon ID to be moved.", "default": "" }, "underBond": { "type": "boolean", "title": "Container is under bond?", "description": "Indicates whether the container is under bond.", "default": false }, "reeferAttributes": { "$ref": "#/definitions/reeferAttributes" }, "hazAttributes": { "$ref": "#/definitions/hazAttributes" }, "kiwiRailSupplyAttributes": { "type": "object", "required": [ "supplyDateTime" ], "properties": { "supplyDateTime": { "type": "string", "title": "The Supplydatetime Schema", "description": "Where KiwiRail is to supply the equipment this is the date and time that it is required to be supplied. This is required where the kiwiRailSupplyIndicator is true.", "default": "" } } }, "scheduleDetails": { "$ref": "#/definitions/scheduleDetails" } } } }, "reeferAttributes": { "type": "object", "required": [ "setTemperature", "requiresGenerator" ], "description": "Where the equipment is 'reefer' the following information must be supplied.", "properties": { "setTemperature": { "type": "number", "title": "The Settemperature Schema", "description": "The temperature that the container is to be set at.", "default": "" }, "allowedTimeOffPower": { "type": "number", "title": "The Allowedtimeoffpower Schema", "description": "The maximum amount of time that the container is allowed to be off power. This is cummulative and is not reset when the container is plugged in.", "default": "" }, "requiresGenerator": { "type": "boolean", "title": "The Requiresgenerator Schema", "description": "true/false indicates whether the freight being transported is 'refrigerated' commodity which requires a generator (so that it does not exceed the maximum time off power)", "default": false }, "KRSupply": { "type": "boolean", "title": "The Krsupply Schema", "description": "true/false where a generator is required this indicates whether the generator is to be supplied by KiwiRail." } } }, "hazAttributes": { "type": "array", "description": "Where the equipment is 'hazardous' the following information may be supplied. Only one haz class and UN code can be supplied for a booking request.", "items": { "type": "object", "required": [ "hazClass", "un" ], "properties": { "hazClass": { "type": "string", "title": "The Hazclass Schema", "description": "The haz class of the commodity", "default": "" }, "un": { "type": "string", "title": "The Un Schema", "description": "The haz UN code of the commodity", "default": "" } } } } } }