{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "Hotel booking response JSON schema",
	"type": "object",
	"additionalProperties": false,
	"definitions": {
		"hotelBookingResponse": {
			"description": "Response to booking request",
			"type": "object",
			"properties": {
				"versionNumber": {
					"$ref": "commonTypes.json#/definitions/schemaVersion"
				},
				"booking": {
					"description": "If this element is present, the reservation is confirmed",
					"type": "object",
					"properties": {
						"bookingReference": {
							"$ref": "commonTypes.json#/definitions/xs:string"
						},
						"clientRef": {
							"$ref": "commonTypes.json#/definitions/xs:string"
						},
						"currencyCode": {
							"$ref": "commonTypes.json#/definitions/currencyCodeType"
						},
						"paymentDueDate": {
							"$ref": "commonTypes.json#/definitions/xs:date"
						},
						"bookingTotalPrice": {
							"$ref": "bookingCommonTypes.json#/definitions/priceWithTaxes",
							"description": "Total price for all items on the booking"
						},
						"commission": {
							"$ref": "bookingCommonTypes.json#/definitions/priceType",
							"description": "Total subagent dynamic markup price for the booking requested"
						},
						"departureDate": {
							"additionalProperties": false,
							"$ref": "commonTypes.json#/definitions/xs:date"
						},
						"items": {
							"description": "Main part of the booking items",
							"type": "array",
							"minItems": 1,
							"items": {
								"$ref": "#/definitions/bookingResponseItemType"
							},
							"additionalProperties": false
						},
						"paymentInfo": {
							"$ref": "bookingCommonTypes.json#/definitions/paymentResponseType"
						}
					},
					"required": [
						"bookingReference",
						"currencyCode",
						"bookingTotalPrice",
						"items"
					],
					"additionalProperties": false
				},
				"errors": {
					"$ref": "commonTypes.json#/definitions/errors",
					"description": "Collection of errors happen during the reservation of items."
				},
				"responseAuditInfo": {
					"$ref": "commonTypes.json#/definitions/responseAuditInfo",
					"description": "Standard audit information sent with responses"
				},
				"warnings": {
					"$ref": "commonTypes.json#/definitions/warnings"
				}
			},
			"required": [
				"versionNumber",
				"responseAuditInfo"
			],
			"additionalProperties": false
		},
		"bookingResponseItemType": {
			"description": "Contains the details of the Confirmed Reservation item.",
			"type": "object",
			"properties": {
				"allowModifications": {
					"$ref": "commonTypes.json#/definitions/xs:nonNegativeInteger"
				},
				"itemNumber": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"paymentStatus": {
					"$ref": "bookingCommonTypes.json#/definitions/paymentStatusType"
				},
				"status": {
					"$ref": "bookingCommonTypes.json#/definitions/bookingStatusType"
				},
				"supplierReservationReference": {
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"tourReference": {
					"$ref": "bookingCommonTypes.json#/definitions/tourReferenceType"
				},
				"alerts": {
					"description": "Collection of alert messages which are specific to this room",
					"type": "array",
					"minItems": 1,
					"items": {
						"$ref": "commonTypes.json#/definitions/alertType"
					},
					"additionalProperties": false
				},
				"giataCode": {
					"additionalProperties": false,
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"hotel": {
					"type": "object",
					"properties": {
						"preferences": {
							"$ref": "bookingCommonTypes.json#/definitions/preferencesType"
						},
						"rooms": {
							"description": "This will be added only when returnFullBookingDetail is true",
							"type": "array",
							"minItems": 1,
							"items": {
								"$ref": "bookingCommonTypes.json#/definitions/bookingRoomOptionType"
							},
							"additionalProperties": false
						},
						"stayPeriod": {
							"$ref": "commonTypes.json#/definitions/stayPeriodResponseType",
							"description": "Service Date Range "
						}
					},
					"required": [
						"stayPeriod"
					],
					"additionalProperties": false,
					"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.BookingResponseHotel"
				},
				"itemTotalPrice": {
					"$ref": "bookingCommonTypes.json#/definitions/priceWithTaxes",
					"description": "Total price for all items on the booking"
				},
				"leadPaxName": {
					"$ref": "bookingCommonTypes.json#/definitions/paxNameType"
				},
				"productCode": {
					"$ref": "commonTypes.json#/definitions/productCodeType",
					"description": "Unique reference to product"
				},
				"specialRequest": {
					"additionalProperties": false,
					"description": "Confirmation of the special request",
					"$ref": "commonTypes.json#/definitions/xs:string"
				}
			},
			"required": [
				"allowModifications",
				"status",
				"tourReference",
				"itemTotalPrice",
				"leadPaxName",
				"productCode"
			],
			"additionalProperties": false,
			"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.BookingResponseItem"
		}
	},
	"$ref": "#/definitions/hotelBookingResponse"
}