{
  "swagger": "2.0",
  "paths": {
    "/health": {
      "get": {
        "summary": "Health Check",
        "parameters": [
          {
            "name": "Authorization",
            "description": "Bearer token",
            "required": true,
            "in": "header",
            "type": "string"
          },
          {
            "name": "client_id",
            "description": "Unique client id identifying the organisation making the request",
            "required": true,
            "in": "header",
            "type": "string"
          },
          {
            "name": "X-Correlation-Cust-Id",
            "description": "Unique client correlation id that can be used to trace requests",
            "required": false,
            "in": "header",
            "type": "string"
          },
          {
            "name": "Accept-Encoding",
            "description": "Indicates the content encoding that the client can understand. Specifying gzip will result in compressed (and faster) responses.",
            "required": false,
            "in": "header",
            "type": "string"
          },
          {
            "name": "User-Agent",
            "description": "Name and version number of system making the request, e.g. RDGRuntime/7.41.2",
            "required": true,
            "in": "header",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Service is healthy"
          }
        }
      }
    },
    "/api/v2/bookings/revisions": {
      "get": {
        "description": "Returns bookings with revisions details which were occured after the supplied date and time having applicable change types\n",
        "produces": ["application/json"],
        "parameters": [
          {
            "name": "createdAfter",
            "description": "Date and time after which bookings have been changed",
            "required": true,
            "in": "query",
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "Authorization",
            "description": "Bearer",
            "required": true,
            "in": "header",
            "type": "string"
          },
          {
            "name": "X-Correlation-Id",
            "description": "Unique mule message id that can be traced through mule API-led layer which is set in experience API",
            "required": false,
            "in": "header",
            "type": "string"
          },
          {
            "name": "X-Correlation-Cust-Id",
            "description": "Unique client reference id that can be traced through mule API-led layer (if supplied)",
            "required": false,
            "in": "header",
            "type": "string"
          },
          {
            "name": "client_id",
            "description": "Security token to access API on Anypoint Platform",
            "required": true,
            "in": "header",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded without any errors.\n",
            "headers": {
              "X-SSL-Client-Verify": {
                "x-amf-required": true,
                "description": "It allows you to verify the mTLS(Mutual Transport Layer Security) settings \nis applied in MuleSoft Anypoint Platform for a specific API client\n",
                "type": "string"
              },
              "X-Correlation-Id": {
                "x-amf-required": true,
                "description": "Unique mule message id that can be traced through mule API-led layers  \n",
                "type": "string"
              }
            },
            "x-amf-mediaType": "application/json",
            "schema": {
              "$ref": "#/definitions/ClientBookingChangesHistory"
            }
          },
          "400": {
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).\nExamples of error code are GBR_EXCEPTION_0001, GBR_EXCEPTION_3000, GBR_EXCEPTION_3001, GBR_EXCEPTION_3002, GBR_EXCEPTION_3003 etc. including business error codes from system of records APIs are connected to.\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "403": {
            "description": "The server understood the request but refuses to authorize it.\nNote: error message is just a representation purpose only and will be generated by the system(s)    \n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "404": {
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "405": {
            "description": "The method received in the request-line is known by the origin server but not supported by the target resource.\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "406": {
            "description": "The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "412": {
            "description": "One or more conditions given in the request header fields evaluated to false when tested on the server.\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "415": {
            "description": "The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "429": {
            "description": "The user has sent too many requests in a given amount of time (\"rate limiting\").\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "500": {
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request. \nExamples of error code are GBR_EXCEPTION_0000, GBR_EXCEPTION_3062, GBR_EXCEPTION_3063, GBR_EXCEPTION_3064, GBR_EXCEPTION_3068\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "503": {
            "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. \nExamples of error code are GBR_EXCEPTION_3065, GBR_EXCEPTION_3066\nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          },
          "504": {
            "description": "The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. \nNote: error message is just a representation purpose only and will be generated by the system(s)\n",
            "x-amf-mediaType": "application/json",
            "schema": {
              "type": "object",
              "required": ["errors"],
              "properties": {
                "errors": {
                  "$ref": "#/definitions/Errors"
                }
              }
            }
          }
        },
        "x-amf-security": [
          {
            "jwt_pass_through": []
          }
        ]
      }
    }
  },
  "definitions": {
    "ClientBookingChangesHistory": {
      "type": "object",
      "required": ["latestStoredBookingChange", "createdAfter"],
      "properties": {
        "latestStoredBookingChange": {
          "title": "Latest Stored Booking Change",
          "type": "string",
          "format": "date-time"
        },
        "hasMaxRequestPeriodExceeded": {
          "title": "has Max Request Period Exceeded",
          "type": "boolean"
        },
        "createdAfter": {
          "title": "Created After",
          "type": "string",
          "format": "date-time"
        },
        "bookingRevisions": {
          "title": "Booking Revisions",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ClientBookingRevision"
          }
        }
      }
    },
    "Errors": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Error"
      }
    },
    "ClientBookingRevision": {
      "type": "object",
      "required": ["bookingReference", "revisionNumber", "revisionCreatedOn"],
      "properties": {
        "bookingReference": {
          "$ref": "#/definitions/BookingReference"
        },
        "revisionNumber": {
          "title": "Revision Number",
          "type": "integer"
        },
        "revisionCreatedOn": {
          "title": "Revision Created On",
          "type": "string",
          "format": "date-time"
        },
        "bookingRevisionChanges": {
          "title": "Booking Revision Changes",
          "type": "array",
          "items": {
            "$ref": "#/definitions/BookingChange"
          }
        }
      }
    },
    "Error": {
      "type": "object",
      "required": ["code", "message", "timestamp"],
      "properties": {
        "code": {
          "description": "Error code in string or numeric format",
          "type": "string"
        },
        "message": {
          "description": "A description of the error",
          "type": "string"
        },
        "timestamp": {
          "description": "A timestamp identifying the time of the error",
          "type": "string"
        }
      }
    },
    "BookingReference": {
      "title": "Booking Reference",
      "description": "A unique identifier for a booking.",
      "type": "string",
      "maxLength": 16
    },
    "BookingChange": {
      "type": "object",
      "required": ["changedField", "changeFieldDataType"],
      "properties": {
        "changedField": {
          "title": "Change Field",
          "type": "string"
        },
        "changeFieldDataType": {
          "title": "Change Field Data Type",
          "type": "string"
        },
        "uuidsData": {
          "title": "Universally Unique Identifier",
          "type": "array",
          "items": {
            "$ref": "#/definitions/UniversallyUniqueIdentifier"
          }
        },
        "booleanData": {
          "title": "Boolean Value",
          "type": "boolean"
        },
        "stringData": {
          "title": "String Data",
          "type": "string"
        }
      }
    },
    "UniversallyUniqueIdentifier": {
      "title": "Universally Unique Identifier (UUID)",
      "description": "A code used to uniquely identify an item.",
      "type": "string",
      "maxLength": 50
    }
  },
  "x-amf-securitySchemes": {
    "jwt_pass_through": {
      "type": "Pass Through",
      "x-amf-describedBy": {
        "headers": {
          "Authorization": {
            "required": false,
            "type": "string"
          }
        }
      }
    }
  }
}
