{
  "openapi": "3.1.1",
  "info": {
    "title": "Seating manager",
    "description": "Seating manager generates seating offers and keeps track of what seats are reserved and/or blocked",
    "version": "2026.09.0"
  },
  "servers": [
    {
      "url": "https://api.entur.io/seating-manager"
    }
  ],
  "security": [
    {
      "bearer-key": []
    }
  ],
  "paths": {
    "/v1-beta/sorting": {
      "get": {
        "tags": [
          "sorting-controller"
        ],
        "summary": "Get sorting properties for a tenant.",
        "description": "Sorting properties control the order in which reservations are rebooked.",
        "operationId": "getSortingPriorities",
        "parameters": [
          {
            "name": "ownerOrganisationId",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SortingResponseV1"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "sorting-controller"
        ],
        "summary": "Reset sorting properties for a tenant.",
        "description": "Sorting properties control the order in which reservations are rebooked.This function will delete all existing sorting priorities for the tenant and then insert the new ones.",
        "operationId": "putSortingPriorities",
        "parameters": [
          {
            "name": "ownerOrganisationId",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SortingRequestV1"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SortingResponseV1"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/{datedServiceJourneyId}/materials": {
      "put": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Update material for a seating offer",
        "description": "The material compositions for a seating offer will be replaced by new ones. Each new material composition will be specified with carriages and carriage details.",
        "operationId": "updateMaterial",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The `dated service journey` of the seating offer that will be updated.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MaterialCompositionRequest"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatingOfferResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/{reference}": {
      "get": {
        "tags": [
          "reservation-controller"
        ],
        "operationId": "getReservation",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "The `reference` of the reservation that will be fetched",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "description": "The `reference` of the reservation that will be fetched",
              "format": "uuid",
              "examples": [
                "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              ]
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Update a reservation with reservation lines",
        "description": "\n# Update a reservation with reservation lines.\nThe draft reservation version containing only the requested reservation lines will be returned.\n\nIf reservationLineRequests (body) is empty, then the draft reservation will contain no reservation lines.\n    ",
        "operationId": "fullUpdateReservation",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "The `reference` of the reservation that will be updated.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "description": "The `reference` of the reservation that will be updated.",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReservationLineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "reservation-controller"
        ],
        "operationId": "updateReservation",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "The `reference` of the reservation that will be updated.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "description": "The `reference` of the reservation that will be updated.",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/ReservationUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/third-party-reservations": {
      "post": {
        "tags": [
          "third-party-reservation-controller"
        ],
        "summary": "Create a third party reservation",
        "description": "Creates a third party reservation. Seating Manager will contact the owning system if a client tries to get a reservation with the corresponding reference.",
        "operationId": "createThirdPartyReservation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateThirdPartyReservationsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateThirdPartyReservationsResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/refresh": {
      "post": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Force refresh active elements after changes in rolling-stock",
        "description": "\nThis endpoint fetches updated elements by series from rolling-stock, and updates the seating-offer \n    ",
        "operationId": "refreshElementSeries",
        "parameters": [
          {
            "name": "elementSeries",
            "in": "query",
            "description": "The element series that has been updated.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "The earliest departure date of the seatingOffers that will be refreshed.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "The latest departure date of the seatingOffers that will be refreshed.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations": {
      "get": {
        "tags": [
          "reservation-controller"
        ],
        "operationId": "getReservationsOnSeatingOffer",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "description": "The `datedServiceJourney` of the reservation that will be fetched",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:DatedServiceJourney:61_21-12-02"
              }
            }
          },
          {
            "name": "reservationStatus",
            "in": "query",
            "description": "The `reservation status` of the reservation that will be fetched. Defaults to DRAFT and CONFIRMED.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "description": "The `reservation status` of the reservation that will be fetched. Defaults to DRAFT and CONFIRMED.",
              "enum": [
                "DRAFT",
                "CONFIRMED",
                "CANCELLED",
                "DEPRECATED"
              ],
              "examples": [
                "DRAFT,CONFIRMED"
              ]
            },
            "examples": {
              "default": {
                "value": "DRAFT,CONFIRMED"
              }
            }
          },
          {
            "name": "rebookingStatuses",
            "in": "query",
            "description": "The `rebooking statuses` of the reservation that will be fetched. Defaults to all.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACCEPTED",
                  "MANUAL",
                  "SUGGESTED",
                  "REBOOKED_DRAFT",
                  "REJECTED",
                  "NONE"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "NONE"
              }
            }
          },
          {
            "name": "updatedAfter",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "NSR code of the origin stop place. When combined with destination, returns only reservations onboard the requested leg.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:337"
              }
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "NSR code of the destination stop place. When combined with origin, returns only reservations onboard the requested leg.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:669"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReservationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Create a reservation from origin to destination on a DatedServiceJourney",
        "description": "This endpoint can be used to create a reservation, optionally with the supplied reservation linesAn organisation id will be stored, this id determined by the authentication used by the client",
        "operationId": "createReservation",
        "parameters": [
          {
            "name": "ownerOrganisationId",
            "in": "query",
            "description": "The organisation to be set as owner of the reservation. Only Entur may specify ownerOrganisation, otherwise the requesting organisation will be set as owner of the reservation.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "description": "The organisation to be set as owner of the reservation. Only Entur may specify ownerOrganisation, otherwise the requesting organisation will be set as owner of the reservation.",
              "format": "int64",
              "examples": [
                1
              ]
            },
            "examples": {
              "default": {
                "value": 1
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReservationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/{reference}/reservation-lines/replace": {
      "post": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Replace reservation lines",
        "description": "\n          Replace existing reservation lines connected with new allocated reservation lines.\n          ",
        "operationId": "replaceOrderLines",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "UUID for the reservation we want to replace reservationLines on.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceReservationLinesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/{reference}/reservation-line": {
      "post": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Add reservation lines",
        "description": "\n          Adds reservation lines connected to the given reservation.\n          The response is a list of all reservation lines that exists on the reservation after adding the ones in the request.\n          ",
        "operationId": "addReservationLines",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "UUID for the reservation we want to add reservation lines to.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          },
          {
            "name": "groupOverride",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "description": "List with  reservation lines to add",
                "items": {
                  "$ref": "#/components/schemas/CreateReservationLinesBySeatingPropertiesRequest"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Remove reservation lines",
        "description": "\n          Removes reservation lines connected to the given reservation.\n          The response is a list of UUIDs representing the reservation line references that got removed.\n          ",
        "operationId": "removeReservationLines",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "UUID for the reservation we want to remove reservation lines from.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "description": "List with UUIDs of reservation lines to cancel",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/{reference}/rebooking-notification": {
      "post": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Notifies customer about rebooked seats",
        "description": "\n          Triggers a notification to the customer about rebooked seats.\n          ",
        "operationId": "triggerRebookingMessage",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "UUID for the reservation we want to trigger a notification for.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/allocate": {
      "post": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Create reservation and reserve seats by seating properties",
        "description": "Create reservation and reserve seats allocated by seating properties. If the optional orderLineId is provided for a set of seating properties, the reservation line(s) allocated by the seating properties will be associated to the orderLineId",
        "operationId": "allocateReservationBySeatingProperties",
        "parameters": [
          {
            "name": "ownerOrganisationId",
            "in": "query",
            "description": "The organisation to be set as owner of the reservation. Only Entur may specify ownerOrganisation, otherwise the requesting organisation will be set as owner of the reservation.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "description": "The organisation to be set as owner of the reservation. Only Entur may specify ownerOrganisation, otherwise the requesting organisation will be set as owner of the reservation.",
              "format": "int64",
              "examples": [
                1
              ]
            },
            "examples": {
              "default": {
                "value": 1
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReservationBySeatingPropertiesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/allocate/trip": {
      "post": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Create reservations for a sequence of legs and reserve seats by seating properties",
        "description": "Create reservation and reserve seats allocated by seating properties. If the optional orderLineId is provided for a set of seating properties, the reservation line(s) allocated by the seating properties will be associated to the orderLineId",
        "operationId": "allocateReservationForTripBySeatingProperties",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTripReservationBySeatingPropertiesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReservationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/rebookings/seat-type": {
      "post": {
        "tags": [
          "rebooking-controller"
        ],
        "summary": "Trigger rebooking of multiple reservation to a new seat type",
        "description": "Attempt to find new seats with a new seat type.",
        "operationId": "rebookToSeatType",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RebookToSeatTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReservationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/{datedServiceJourneyId}": {
      "get": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Fetch journey metadata about a given dated service journey",
        "description": "\nThe response contains metadata on seating offer and the elements attached based on a given dated service journey id.\n    ",
        "operationId": "getSeatingOfferInfoByDatedServiceJourney",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The `datedServiceJourney` info that will be fetched.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datedServiceJourneyVersion",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatingOfferResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Update seating offer for datedServiceJourney.",
        "description": "Update the seating offer for the given datedServiceJourney. Currently it is only possible to set seating-offer as inactive, which will close the departure for sales.",
        "operationId": "patchSeatingOffer",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The `datedServiceJourney` info that will be updated.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchSeatingOfferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatingOfferResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/{reference}/reservation-lines/{reservationLineReference}": {
      "patch": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Update a reservation line in a reservation",
        "description": "\n# Update a reservation line in a reservation.\nThe result will depend on the reservation status.\n- **ReservationStatus:DRAFT** : The draft reservation version will contain the updated reservation line and existing lines.\n- **ReservationStatus:CONFIRMED** : A new draft reservation version containing only the updated reservation line.\n- **ReservationStatus:CANCELLED** : No operation.\n    ",
        "operationId": "partialUpdateReservation",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "The `reference` of the reservation the `reservation` that will be updated.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          },
          {
            "name": "reservationLineReference",
            "in": "path",
            "description": "The `reference` of the `reservationLine` to be updated.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PatchReservationLineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationLineResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/rebookings/{reference}/rebook": {
      "patch": {
        "tags": [
          "rebooking-controller"
        ],
        "summary": "Trigger rebooking of reservation",
        "description": "Attempt to find new seats for a reservation on it's current departure. If no new seats found, keep existing reservation lines.",
        "operationId": "rebook",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "The reference of the reservation.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "123e4567-e89b-12d3-a456-426614174000"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RebookedReservationResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/seat-display/{datedServiceJourneyId}": {
      "get": {
        "tags": [
          "seat-display-controller"
        ],
        "summary": "Get trip data by ID",
        "description": "Retrieves detailed information about a specific trip including coaches, seats, reservations, route & station names. Designed for use by seat displays in trains.",
        "operationId": "getTripById",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The unique identifier of the trip (DSJ)",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TripResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/rebookings": {
      "get": {
        "tags": [
          "rebooking-v-1-controller"
        ],
        "summary": "Fetch unhandled rebooked reservations for a dated service journey",
        "description": "Fetch all unhandled rebooked reservations for a dated service journey. A unhandled rebooked reservation is a reservations that has `status=DRAFT` and rebooking status SUGGESTED, MANUAL or ACCEPTED.",
        "operationId": "getRebookedReservationsV1",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "description": "Dated service journey id to fetch rebooked reservations for.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:DatedServiceJourney:64_BRG-OSL_22-06-03"
              }
            }
          },
          {
            "name": "reservationStatus",
            "in": "query",
            "description": "The status of the reservations considered, defaults to DRAFT",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "DRAFT",
              "enum": [
                "DRAFT",
                "CONFIRMED",
                "CANCELLED",
                "DEPRECATED"
              ]
            },
            "examples": {
              "default": {
                "value": "CONFIRMED"
              }
            }
          },
          {
            "name": "rebookingStatuses",
            "in": "query",
            "description": "The `rebooking statuses` of the reservation that will be fetched. Defaults to SUGGESTED, MANUAL or ACCEPTED.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACCEPTED",
                  "MANUAL",
                  "SUGGESTED",
                  "REBOOKED_DRAFT",
                  "REJECTED",
                  "NONE"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "NONE"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RebookedReservationResponseV1"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/rebookings/dated-service-journeys": {
      "get": {
        "tags": [
          "rebooking-v-1-controller"
        ],
        "summary": "Fetch rebooking statistics grouped by original dated service journey",
        "description": "Fetch statistics for original departures from today onward in Norwegian local time. Supply exactly one of organisationId or lineId; supplying both or neither returns 400. The caller must have reservation read access to the organisations owning the selected original and replacement departures. Statistics count travel intentions, not individual reservation legs, under the original departure. Departures whose five rebooking counters are all zero are omitted. The reservation status defaults to DRAFT; rebooking statuses are MANUAL, SUGGESTED and ACCEPTED, in that priority order. Snoozed travel intentions are counted separately and excluded from active counts. No-journey travel intentions are counted separately for DRAFT only.",
        "operationId": "getDatedServiceJourneysWithRebookingsStatsV1",
        "parameters": [
          {
            "name": "organisationId",
            "in": "query",
            "description": "Owner organisation of the original departures. Required when lineId is omitted; cannot be combined with lineId.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "examples": {
              "default": {
                "value": 1
              }
            }
          },
          {
            "name": "lineId",
            "in": "query",
            "description": "Line of the original departures. Required when organisationId is omitted; cannot be combined with organisationId.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:Line:70"
              }
            }
          },
          {
            "name": "reservationStatus",
            "in": "query",
            "description": "The status of the reservations considered, defaults to DRAFT",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "DRAFT",
              "enum": [
                "DRAFT",
                "CONFIRMED",
                "CANCELLED",
                "DEPRECATED"
              ]
            },
            "examples": {
              "default": {
                "value": "DRAFT"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rebooking statistics for the original departures.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RebookingOverviewResponseV1"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Supply exactly one of organisationId or a non-blank lineId.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks read access to the requested data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommonError"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/capacities/{datedServiceJourneyId}/total": {
      "get": {
        "tags": [
          "capacity-controller-v-1"
        ],
        "operationId": "getTotalCapacity",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromStopPlaceId",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "seatingPropertiesKey",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "FareClass",
                  "GroupBooking",
                  "AccommodationFacility",
                  "SeatAttachment",
                  "SeatPosition",
                  "RelativeDirection",
                  "NuisanceFacilities",
                  "PassengerCommsFacilities",
                  "SanitaryFacilities",
                  "MobilityFacilities",
                  "BaggageType"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TotalMaterialCompositionCapacityResponseV1"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seats/{datedServiceJourneyId}/reservations": {
      "get": {
        "tags": [
          "capacities-controller"
        ],
        "summary": "Get seat reservations for a seating offer.",
        "description": "Get seat reservations for stations in a seating offer.",
        "operationId": "getSeatsReservations",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "Id of dated service journey",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "GOA:DatedServiceJourney:3004_STV-EGS_21-04-09"
              }
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "Nsr code for first station",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:337"
              }
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "Nsr code for last station",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:548"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatsReservationsResponseV1"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seats/{datedServiceJourneyId}/occupancies": {
      "get": {
        "tags": [
          "capacities-controller"
        ],
        "summary": "Get seat occupancy for a seating offer.",
        "description": "Get seat occupancy for stations in a seating offer.For each station between the origin and destination station, the following information is given:availability: AVAILABLE or OCCUPIED.boarding:true if a new passenger will occupy the seat on tis station.alighting:true if a passenger will vacate the seat on this station.",
        "operationId": "getSeatsOccupancies",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "Id of dated service journey",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "GOA:DatedServiceJourney:3004_STV-EGS_21-04-09"
              }
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "Nsr code for first station",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:337"
              }
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "Nsr code for last station",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:548"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatsOccupancyResponseV1"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seats/{datedServiceJourneyId}/available": {
      "get": {
        "tags": [
          "capacities-controller"
        ],
        "summary": "Fetch available seats on a departure",
        "description": "\nThe response contains seats that are available for reservation, grouped by their element and compartment (if applicable).\nIf the departure has no available seats or is otherwise unavailable for reservation, an empty list is returned.\n    ",
        "operationId": "getAvailableSeatsWithCompartmentsOnSeatingOffer",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The `datedServiceJourney` the available seats will be fetched for.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "The `origin` of the capacity query.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "The `destination` of the capacity query.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailableElementWithCompartmentsResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seats/{datedServiceJourneyId}/availabilities": {
      "get": {
        "tags": [
          "capacities-controller"
        ],
        "summary": "Get seats and seat status for a seating offer.",
        "description": "Get seat information for all seats in a seating offer. The information includes seat properties and information about the corresponding carriage.Each seat will classified AVAILABLE or OCCUPIED. To be classified as AVAILABLE, the seat must be available for reservation on the entire distance between the origin and destination station.",
        "operationId": "getSeatsAvailabilities",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "Id of dated service journey",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "GOA:DatedServiceJourney:3004_STV-EGS_21-04-09"
              }
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "Nsr code for first station",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:337"
              }
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "Nsr code for last station",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:548"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatsAvailabilitiesResponseV1"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers": {
      "get": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Fetch list of seating offers given either serviceJourneyId or lineId",
        "description": "Get a list of all seating offers based on either serviceJourneyId or lineId",
        "operationId": "getSeatingOffersInfoByServiceJourneyIdOrLineId",
        "parameters": [
          {
            "name": "serviceJourneyId",
            "in": "query",
            "description": "The netex serviceJourneyId for the seating offers",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "GOA:ServiceJourneyId:500"
              }
            }
          },
          {
            "name": "lineId",
            "in": "query",
            "description": "The netex lineId for the seating offers",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "GOA:Line:50"
              }
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "description": "The `statuses` of the seatingOffers that will be fetched. Defaults to ACTIVE and TO_BE_REPLACED.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "CANCELLED",
                  "TO_BE_REPLACED",
                  "REPLACED_MATERIAL",
                  "REPLACED_DSJ",
                  "SEAT_USAGES_DELETED",
                  "REMOVED",
                  "DEPRECATED",
                  "REPLACED"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "ACTIVE,TO_BE_REPLACED"
              }
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "The earliest departure date of the seatingOffers that will be fetched.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "examples": {
              "default": {
                "value": "2023-02-17"
              }
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "The latest departure date of the seatingOffers that will be fetched.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "examples": {
              "default": {
                "value": "2023-02-17"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SeatingOfferResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/{datedServiceJourneyId}/availability": {
      "get": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Fetch available seats on a seating offer",
        "description": "\nThe response contains seats that are available for reservation, grouped by their element.\n    ",
        "operationId": "getAvailableSeatsOnSeatingOffer",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The `datedServiceJourney` the seats will be fetched for.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "The `origin` of the capacity query.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "The `destination` of the capacity query.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AvailableElementResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/service-journey-periods": {
      "get": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Fetch list of serviceJourneyIds with period of first and last departure date",
        "operationId": "getServiceJourneySchedulesByLineId",
        "parameters": [
          {
            "name": "lineId",
            "in": "query",
            "description": "The netex lineId for the unique serviceJourneyIds with seating offers",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "GOA:Line:50"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServiceJourneyScheduleResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/service-journey-ids-per-line-id": {
      "get": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Fetch list of unique serviceJourneyId per lineId",
        "operationId": "getServiceJourneyIdsByLineId",
        "parameters": [
          {
            "name": "lineId",
            "in": "query",
            "description": "The netex lineId for the unique serviceJourneyIds with seating offers",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "GOA:Line:50"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/debug/{datedServiceJourneyId}": {
      "get": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Fetch journey data to debug a dated service journey",
        "description": "\nThe response contains requested data on seating offer for a given dated service journey id.\n    ",
        "operationId": "getDebugSeatingOffer",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The `datedServiceJourney` debug info that will be fetched.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datedServiceJourneyVersion",
            "in": "query",
            "description": "The version of the seating offer to fetch. Fetches the newest version if not specified",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "examples": {
              "default": {
                "value": 1
              }
            }
          },
          {
            "name": "elementCarriageIdentifier",
            "in": "query",
            "description": "The carriage to fetch seats and seat usages for. Fetches all if not specified",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": 4
              }
            }
          },
          {
            "name": "seatNumber",
            "in": "query",
            "description": "The seat to fetch seat usages for. Fetches all if not specified.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": 4
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatingOfferDebugResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/seating-offers/debug/{datedServiceJourneyId}/": {
      "get": {
        "tags": [
          "seating-offer-controller"
        ],
        "summary": "Fetch journey data to debug a dated service journey",
        "description": "\nThe response contains requested data on seating offer for a given dated service journey id.\n    ",
        "operationId": "getDebugSeatingOffer_1",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "path",
            "description": "The `datedServiceJourney` debug info that will be fetched.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datedServiceJourneyVersion",
            "in": "query",
            "description": "The version of the seating offer to fetch. Fetches the newest version if not specified",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "examples": {
              "default": {
                "value": 1
              }
            }
          },
          {
            "name": "elementCarriageIdentifier",
            "in": "query",
            "description": "The carriage to fetch seats and seat usages for. Fetches all if not specified",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": 4
              }
            }
          },
          {
            "name": "seatNumber",
            "in": "query",
            "description": "The seat to fetch seat usages for. Fetches all if not specified.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": 4
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeatingOfferDebugResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/travel-intentions/{originalDatedServiceJourneyId}": {
      "get": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Fetch grouped reservations for a travel intention",
        "description": "\n            Fetches all travel intentions connected to the given original dated service journey id, grouped by travel intention reference with their full rebooking history. \n            Each group contains all versions of the travel intention and the reservations belonging to each version. Filters on reservation status and rebooking status are \n            applied only to the latest version of each travel intention — groups where the latest version does not match are excluded entirely. The fullHistory parameter \n            controls how many versions are included per group: when true (default), all versions are returned; when false, only the two most recent versions are returned.\n            ",
        "operationId": "getGroupedReservations",
        "parameters": [
          {
            "name": "originalDatedServiceJourneyId",
            "in": "path",
            "description": "The ID of the original dated service journey — the departure the travel intentions were initially created for and that connects all related travel intentions and their reservations together.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:DatedServiceJourney:64_BRG-OSL_22-06-03"
              }
            }
          },
          {
            "name": "reservationStatus",
            "in": "query",
            "description": "The `reservation status` to filter on. If not specified, all statuses are included.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "DRAFT",
                  "CONFIRMED",
                  "CANCELLED",
                  "DEPRECATED"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "DRAFT"
              }
            }
          },
          {
            "name": "rebookingStatusFilter",
            "in": "query",
            "description": "The `rebooking statuses` to filter on. Defaults to all statuses if not specified.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACCEPTED",
                  "MANUAL",
                  "SUGGESTED",
                  "REBOOKED_DRAFT",
                  "REJECTED",
                  "NONE"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "MANUAL"
              }
            }
          },
          {
            "name": "fullHistory",
            "in": "query",
            "description": "Whether to return the full version history of each travel intention. If false, only the two most recent versions are returned. Defaults to full history.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "boolean",
              "default": true
            },
            "examples": {
              "default": {
                "value": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TravelIntentionResponseV1"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/reservation-line/{reservationLineReference}": {
      "get": {
        "tags": [
          "reservation-controller"
        ],
        "operationId": "getReservationByReservationLineReference",
        "parameters": [
          {
            "name": "reservationLineReference",
            "in": "path",
            "description": "The `reference` of the reservation line that will be fetched",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReservationResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/orderId/{orderId}": {
      "get": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Get reservations by orderId",
        "description": "Fetches the newest version of all reservations connected to the orderId",
        "operationId": "getReservationsByOrderId",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "The orderId of the reservations that will be fetched",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "CHRT56"
              }
            }
          },
          {
            "name": "reservationStatuses",
            "in": "query",
            "description": "Optional reservation statuses to filter on. If not supplied, defaults to DRAFT, CONFIRMED and CANCELLED, falling back to DEPRECATED if no active reservations exist for the orderId",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "DRAFT",
                  "CONFIRMED",
                  "CANCELLED",
                  "DEPRECATED"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "CONFIRMED,DEPRECATED"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReservationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/debug/{reference}": {
      "get": {
        "tags": [
          "reservation-controller"
        ],
        "summary": "Get all versions of reservation",
        "description": "Fetches all versions of reservation with given reference",
        "operationId": "getAllReservationVersions",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "description": "The `reference` of the reservation that will be fetched with all versions",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "examples": {
              "default": {
                "value": "c129cc9c-76e4-4f28-a4e2-5af96550627a"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReservationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/reservations/by-statuses": {
      "get": {
        "tags": [
          "reservation-controller"
        ],
        "operationId": "getReservationsOnSeatingOfferByStatuses",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "description": "The `datedServiceJourney` of the reservation that will be fetched",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:DatedServiceJourney:61_21-12-02"
              }
            }
          },
          {
            "name": "reservationStatus",
            "in": "query",
            "description": "The `reservation status` of the reservations that will be fetched. Defaults to DRAFT and CONFIRMED.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "description": "The `reservation status` of the reservations that will be fetched. Defaults to DRAFT and CONFIRMED.",
              "items": {
                "type": "string",
                "description": "The `reservation status` of the reservations that will be fetched. Defaults to DRAFT and CONFIRMED.",
                "enum": [
                  "DRAFT",
                  "CONFIRMED",
                  "CANCELLED",
                  "DEPRECATED"
                ],
                "examples": [
                  "DRAFT,CONFIRMED"
                ]
              },
              "examples": [
                "DRAFT,CONFIRMED"
              ]
            },
            "examples": {
              "default": {
                "value": "DRAFT,CONFIRMED"
              }
            }
          },
          {
            "name": "rebookingStatuses",
            "in": "query",
            "description": "The `rebooking statuses` of the reservation that will be fetched. Defaults to all.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACCEPTED",
                  "MANUAL",
                  "SUGGESTED",
                  "REBOOKED_DRAFT",
                  "REJECTED",
                  "NONE"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "NONE"
              }
            }
          },
          {
            "name": "updatedAfter",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "description": "NSR code of the origin stop place. When combined with destination, returns only reservations onboard the requested stretch.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:337"
              }
            }
          },
          {
            "name": "destination",
            "in": "query",
            "description": "NSR code of the destination stop place. When combined with origin, returns only reservations onboard the requested stretch.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "NSR:StopPlace:669"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReservationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/rebookings": {
      "get": {
        "tags": [
          "rebooking-controller"
        ],
        "summary": "Fetch unhandled rebooked reservations for a dated service journey",
        "description": "Fetch all unhandled rebooked reservations for a dated service journey. A unhandled rebooked reservation is a reservations that has `status=DRAFT` and rebooking status SUGGESTED, MANUAL or ACCEPTED.",
        "operationId": "getRebookedReservations",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "description": "Dated service journey id to fetch rebooked reservations for.",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:DatedServiceJourney:64_BRG-OSL_22-06-03"
              }
            }
          },
          {
            "name": "reservationStatus",
            "in": "query",
            "description": "The status of the reservations considered, defaults to DRAFT",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "DRAFT",
              "enum": [
                "DRAFT",
                "CONFIRMED",
                "CANCELLED",
                "DEPRECATED"
              ]
            },
            "examples": {
              "default": {
                "value": "CONFIRMED"
              }
            }
          },
          {
            "name": "rebookingStatuses",
            "in": "query",
            "description": "The `rebooking statuses` of the reservation that will be fetched. Defaults to SUGGESTED, MANUAL or ACCEPTED.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACCEPTED",
                  "MANUAL",
                  "SUGGESTED",
                  "REBOOKED_DRAFT",
                  "REJECTED",
                  "NONE"
                ]
              }
            },
            "examples": {
              "default": {
                "value": "NONE"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RebookedReservationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/rebookings/dated-service-journeys": {
      "get": {
        "tags": [
          "rebooking-controller"
        ],
        "operationId": "getDatedServiceJourneysWithRebookingsStats",
        "parameters": [
          {
            "name": "lineId",
            "in": "query",
            "description": "The line ID for which service journeys with rebooking stats should be fetched",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:Line:70"
              }
            }
          },
          {
            "name": "serviceJourneyId",
            "in": "query",
            "description": "The `serviceJourney` for which an overview of the rebookings of the connected dated service journeys that will be fetched",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:ServiceJourney:709"
              }
            }
          },
          {
            "name": "reservationStatus",
            "in": "query",
            "description": "The status of the reservations considered, defaults to DRAFT",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "CONFIRMED",
                "CANCELLED",
                "DEPRECATED"
              ]
            },
            "examples": {
              "default": {
                "value": "DRAFT"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RebookingOverviewResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/rebookings/dated-service-journeys/history": {
      "get": {
        "tags": [
          "rebooking-controller"
        ],
        "operationId": "getServiceJourneyWithRebookingHistory",
        "parameters": [
          {
            "name": "serviceJourneyId",
            "in": "query",
            "description": "The `serviceJourney` for which an overview of the rebooking history of the connected dated service journeys that will be fetched",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "default": {
                "value": "VYG:ServiceJourney:709"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RebookingHistoryOverviewResponse"
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/preview/updated-material": {
      "get": {
        "tags": [
          "preview-controller"
        ],
        "summary": "Get preview of customer communications for rebookings triggered by updated material",
        "operationId": "getUpdatedMaterialPreview",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/preview/replaced-departure-override": {
      "get": {
        "tags": [
          "preview-controller"
        ],
        "summary": "Get preview of customer communications after rebooking to another departure",
        "operationId": "getReplacedDepartureOverridePreview",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "replacerDatedServiceJourneyId",
            "in": "query",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/preview/rebooked-travel-intention/by-reference": {
      "get": {
        "tags": [
          "preview-controller"
        ],
        "summary": "Get preview of RebookedTravelIntention Gnaal workflow for a specific travel intention",
        "operationId": "getRebookedTravelIntentionPreviewByReference",
        "parameters": [
          {
            "name": "travelIntentionReference",
            "in": "query",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/preview/rebooked-travel-intention/by-dated-service-journey": {
      "get": {
        "tags": [
          "preview-controller"
        ],
        "summary": "Get preview of RebookedTravelIntention Gnaal workflow for a dated service journey",
        "operationId": "getRebookedTravelIntentionPreviewByDsj",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1-beta/preview/material-override": {
      "get": {
        "tags": [
          "preview-controller"
        ],
        "summary": "Get preview of customer communications for rebookings triggered by a material-override",
        "operationId": "getMaterialOverridePreview",
        "parameters": [
          {
            "name": "datedServiceJourneyId",
            "in": "query",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewResponse"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/ready": {
      "get": {
        "tags": [
          "readiness-controller"
        ],
        "operationId": "ready",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "ReservationLineRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "The reference of the reservation line if already existing. Leave blank for new reservation lines.",
            "format": "uuid"
          },
          "orderLineId": {
            "type": "string",
            "description": "OrderLine ID for this reservation line`",
            "examples": [
              "d4a599f6-6b0b-473f-a182-79f87a4a8689"
            ]
          },
          "numberOfTravellers": {
            "type": "integer",
            "description": "Number of travellers on the reservation line.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of reservation line.",
            "examples": [
              "SINGLE_SEAT"
            ]
          }
        },
        "description": "`reservationLine` details for the updated reservation. These reservationsLines will completely replace the existing reservationLines on the existing reservation.",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "SINGLE_SEAT": "#/components/schemas/SingleSeatReservationLineRequest",
            "COMPARTMENT": "#/components/schemas/CompartmentReservationLineRequest",
            "FREE_SEATING": "#/components/schemas/FreeSeatingReservationLineRequest",
            "FAILED_REBOOKING": "#/components/schemas/FailedRebookingReservationLineRequest"
          }
        }
      },
      "SingleSeatReservationLineRequest": {
        "required": [
          "elementCarriageNumber",
          "seatNumber",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineRequest"
          },
          {
            "type": "object",
            "properties": {
              "seatNumber": {
                "type": "string",
                "description": "The `seat number` of the seat being reserved on this `reservationLine`.",
                "examples": [
                  "1"
                ]
              },
              "elementCarriageNumber": {
                "type": "integer",
                "description": "The `carriage number` of the element of the seat being reserved on this `reservationLine`.",
                "format": "int32",
                "examples": [
                  1
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "The `carriage identifier` of the element of the seat being reserved on this `reservationLine`.",
                "examples": [
                  "1"
                ]
              }
            }
          }
        ]
      },
      "FreeSeatingReservationLineRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineRequest"
          },
          {
            "type": "object",
            "properties": {
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "The `carriage identifier` for the free seating being reserved on this `reservationLine`.",
                "examples": [
                  "1"
                ]
              }
            }
          }
        ]
      },
      "CompartmentReservationLineRequest": {
        "required": [
          "compartmentName",
          "elementCarriageNumber",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineRequest"
          },
          {
            "type": "object",
            "properties": {
              "compartmentName": {
                "type": "string",
                "description": "Logical name of the compartment.",
                "examples": [
                  "10"
                ]
              },
              "elementCarriageNumber": {
                "type": "integer",
                "description": "The `carriage number` of the element containing the compartment.",
                "format": "int32",
                "examples": [
                  1
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "The `carriage identifier` of the element containing the compartment.",
                "examples": [
                  "1"
                ]
              },
              "orderLineIds": {
                "type": "array",
                "description": "Order line ids for each single seat if the compartment is changed from several single seats. If not, leave empty",
                "items": {
                  "type": "string",
                  "description": "Order line ids for each single seat if the compartment is changed from several single seats. If not, leave empty",
                  "examples": [
                    "[\"11sdw-1234-5678-90ab-cdef12345678\",\"11sdw-1234-5678-90ab-cdef12345678\"]"
                  ]
                },
                "examples": [
                  [
                    "11sdw-1234-5678-90ab-cdef12345678",
                    "11sdw-1234-5678-90ab-cdef12345678"
                  ]
                ]
              }
            }
          }
        ]
      },
      "FailedRebookingReservationLineRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineRequest"
          },
          {
            "type": "object",
            "properties": {
              "information": {
                "type": "string",
                "description": "Information as to why rebooking failed. This field is immutable."
              },
              "reservedProperties": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "The properties reserved by the traveller before rebooking occurs. This field is immutable."
                }
              },
              "previousType": {
                "type": "string",
                "description": "The previous type of reservation line.",
                "examples": [
                  "SINGLE_SEAT"
                ]
              },
              "previousElementCarriageIdentifier": {
                "type": "string",
                "description": "The `carriage number` of the carriage of the seat or compartment previously reserved on this `reservationLine`.",
                "examples": [
                  "1"
                ]
              },
              "previousSeatNumber": {
                "type": "string",
                "description": "The `seat number` of the seat previously reserved on this `reservationLine` if it was a SingleSeatReservationLine.",
                "examples": [
                  "1"
                ]
              },
              "previousCompartmentName": {
                "type": "string",
                "description": "Logical name of the compartment previously reserved on this `reservationLine` if it was a CompartmentReservationLine.",
                "examples": [
                  "10"
                ]
              },
              "previousOrderLineIds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "ReservationLineResponse": {
        "required": [
          "reference",
          "requestedProperties",
          "requestedSeatingProperties",
          "reservedProperties",
          "reservedSeatingProperties",
          "type"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Reference for this reservation line`",
            "format": "uuid"
          },
          "reservedProperties": {
            "type": "array",
            "items": {
              "minLength": 1,
              "type": "string",
              "description": "The properties reserved by the reservation line.",
              "examples": [
                "[FareClass_STANDARD_CLASS]"
              ]
            }
          },
          "reservedSeatingProperties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "requestedProperties": {
            "type": "array",
            "items": {
              "minLength": 1,
              "type": "string",
              "description": "The properties required by the traveller.",
              "examples": [
                "[FareClass_STANDARD_CLASS]"
              ]
            }
          },
          "requestedSeatingProperties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "orderLineId": {
            "type": "string",
            "description": "OrderLine ID for this reservation line.",
            "examples": [
              "d4a599f6-6b0b-473f-a182-79f87a4a8689"
            ]
          },
          "numberOfTravellers": {
            "type": "integer",
            "description": "Number of travellers on the reservation line.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of reservation line.",
            "examples": [
              "SINGLE_SEAT"
            ]
          }
        },
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "SINGLE_SEAT": "#/components/schemas/SingleSeatReservationLineResponse",
            "COMPARTMENT": "#/components/schemas/CompartmentReservationLineResponse",
            "FREE_SEATING": "#/components/schemas/FreeSeatingReservationLineResponse",
            "FAILED_REBOOKING": "#/components/schemas/FailedRebookingReservationLineResponse"
          }
        }
      },
      "SingleSeatReservationLineResponse": {
        "required": [
          "elementCarriageIdentifier",
          "reference",
          "requestedProperties",
          "requestedSeatingProperties",
          "reservedProperties",
          "reservedSeatingProperties",
          "seatNumber",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponse"
          },
          {
            "type": "object",
            "properties": {
              "seatNumber": {
                "type": "string",
                "description": "Seat number of this seat. This relates to the seat marker on the actual vehicle.",
                "examples": [
                  "S12"
                ]
              },
              "elementCarriageNumber": {
                "type": "integer",
                "description": "Carriage number of the corresponding carriage.",
                "format": "int32",
                "examples": [
                  3
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage identifier of the corresponding carriage.",
                "examples": [
                  "3"
                ]
              }
            }
          }
        ]
      },
      "CompartmentReservationLineResponse": {
        "required": [
          "compartmentLabel",
          "compartmentName",
          "elementCarriageIdentifier",
          "orderLineIds",
          "reference",
          "requestedProperties",
          "requestedSeatingProperties",
          "reservedProperties",
          "reservedSeatingProperties",
          "seatsInCompartment",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponse"
          },
          {
            "type": "object",
            "properties": {
              "compartmentName": {
                "type": "string",
                "description": "Logical name of the compartment.",
                "examples": [
                  "10"
                ]
              },
              "elementCarriageNumber": {
                "type": "integer",
                "description": "Carriage number of the element in which the compartment resides.",
                "format": "int32",
                "examples": [
                  1
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage number of the element in which the compartment resides.",
                "examples": [
                  "1"
                ]
              },
              "seatsInCompartment": {
                "type": "array",
                "description": "All seatNumbers located in compartment.",
                "items": {
                  "type": "string",
                  "description": "All seatNumbers located in compartment.",
                  "examples": [
                    "[\"1\",\"2\",\"3\"]"
                  ]
                },
                "examples": [
                  [
                    "1",
                    "2",
                    "3"
                  ]
                ]
              },
              "orderLineIds": {
                "type": "array",
                "description": "List of order line ids for if the compartment was changed from several single seats. If not, it should be empty.",
                "items": {
                  "type": "string",
                  "description": "List of order line ids for if the compartment was changed from several single seats. If not, it should be empty.",
                  "examples": [
                    "[\"11sdw-1234-5678-90ab-cdef12345678\",\"11sdw-1234-5678-90ab-cdef12345678\"]"
                  ]
                },
                "examples": [
                  [
                    "11sdw-1234-5678-90ab-cdef12345678",
                    "11sdw-1234-5678-90ab-cdef12345678"
                  ]
                ]
              },
              "compartmentLabel": {
                "type": "string",
                "description": "String of seats in the compartment.",
                "examples": [
                  "Kupe 11, 12, 13, 14, 15, 16"
                ]
              }
            }
          }
        ]
      },
      "FreeSeatingReservationLineResponse": {
        "required": [
          "reference",
          "requestedProperties",
          "requestedSeatingProperties",
          "reservedProperties",
          "reservedSeatingProperties",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponse"
          },
          {
            "type": "object",
            "properties": {
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage identifier of the corresponding carriage.",
                "examples": [
                  "3"
                ]
              }
            }
          }
        ]
      },
      "FailedRebookingReservationLineResponse": {
        "required": [
          "information",
          "orderLineIds",
          "previousType",
          "reference",
          "requestedProperties",
          "requestedSeatingProperties",
          "reservedProperties",
          "reservedSeatingProperties",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponse"
          },
          {
            "type": "object",
            "properties": {
              "information": {
                "type": "string",
                "description": "Information about the reservation line.",
                "examples": [
                  "Some information"
                ]
              },
              "previousType": {
                "type": "string",
                "description": "The previous type of reservation line.",
                "examples": [
                  "SINGLE_SEAT"
                ]
              },
              "previousElementCarriageIdentifier": {
                "type": "string",
                "description": "The `carriage number` of the carriage of the seat or compartment previously reserved on this `reservationLine`.",
                "examples": [
                  "1"
                ]
              },
              "previousSeatNumber": {
                "type": "string",
                "description": "The `seat number` of the seat previously reserved on this `reservationLine` if it was a SingleSeatReservationLine.",
                "examples": [
                  "1"
                ]
              },
              "previousCompartmentName": {
                "type": "string",
                "description": "Logical name of the compartment previously reserved on this `reservationLine` if it was a CompartmentReservationLine.",
                "examples": [
                  "10"
                ]
              },
              "orderLineIds": {
                "type": "array",
                "description": "List of order line ids for the previous reservation, one value if the previous reservation was a single seat or compartment, multiple values if it was several single seat rebooked to one compartment reservation.",
                "items": {
                  "type": "string",
                  "description": "List of order line ids for the previous reservation, one value if the previous reservation was a single seat or compartment, multiple values if it was several single seat rebooked to one compartment reservation.",
                  "examples": [
                    "[\"11sdw-1234-5678-90ab-cdef12345678\",\"11sdw-1234-5678-90ab-cdef12345678\"]"
                  ]
                },
                "examples": [
                  [
                    "11sdw-1234-5678-90ab-cdef12345678",
                    "11sdw-1234-5678-90ab-cdef12345678"
                  ]
                ]
              }
            }
          }
        ]
      },
      "RebookedReservationLineDataResponse": {
        "required": [
          "reservationLineType",
          "reservedProperties"
        ],
        "type": "object",
        "properties": {
          "reservationLineType": {
            "type": "string",
            "description": "The type of reservation line.",
            "examples": [
              "SINGLE_SEAT"
            ]
          },
          "reservedProperties": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "The properties required by the traveller.",
              "examples": [
                "[FareClass_STANDARD_CLASS]"
              ]
            }
          }
        },
        "discriminator": {
          "propertyName": "reservationLineType",
          "mapping": {
            "SINGLE_SEAT": "#/components/schemas/SingleSeatDataResponse",
            "COMPARTMENT": "#/components/schemas/CompartmentDataResponse",
            "FREE_SEATING": "#/components/schemas/FreeSeatingDataResponse",
            "FAILED_REBOOKING": "#/components/schemas/FailedRebookingDataResponse"
          }
        }
      },
      "SingleSeatDataResponse": {
        "required": [
          "elementCarriageIdentifier",
          "elementSeries",
          "elementSeriesVersion",
          "reservationLineType",
          "reservedProperties",
          "seatNumber"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineDataResponse"
          },
          {
            "type": "object",
            "properties": {
              "seatNumber": {
                "type": "string",
                "description": "Seat number of this seat. This relates to the seat marker on the actual vehicle.",
                "examples": [
                  "S12"
                ]
              },
              "elementCarriageNumber": {
                "type": "integer",
                "description": "Carriage number of the corresponding carriage.",
                "format": "int32",
                "examples": [
                  3
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage identifier of the corresponding carriage.",
                "examples": [
                  "3"
                ]
              },
              "elementSeries": {
                "type": "string",
                "description": "Rolling stock series for the element this seat is reserved in",
                "examples": [
                  "GOA-BM73A-KOMFORT"
                ]
              },
              "elementSeriesVersion": {
                "type": "integer",
                "description": "Rolling stock series version for the element this seat is reserved in",
                "format": "int32",
                "examples": [
                  1
                ]
              }
            }
          }
        ]
      },
      "CompartmentDataResponse": {
        "required": [
          "compartmentName",
          "elementCarriageIdentifier",
          "elementSeries",
          "elementSeriesVersion",
          "reservationLineType",
          "reservedProperties",
          "seatsInCompartment"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineDataResponse"
          },
          {
            "type": "object",
            "properties": {
              "compartmentName": {
                "type": "string",
                "description": "Logical name of the compartment.",
                "examples": [
                  "10"
                ]
              },
              "numberOfTravellers": {
                "type": "integer",
                "description": "Number of travellers on the reservation line.",
                "format": "int32",
                "examples": [
                  2
                ]
              },
              "elementCarriageNumber": {
                "type": "integer",
                "description": "Carriage number of the element in which the compartment resides.",
                "format": "int32",
                "examples": [
                  1
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage number of the element in which the compartment resides.",
                "examples": [
                  "1"
                ]
              },
              "seatsInCompartment": {
                "type": "array",
                "description": "All seatNumbers located in compartment.",
                "items": {
                  "type": "string",
                  "description": "All seatNumbers located in compartment.",
                  "examples": [
                    "[\"1\",\"2\",\"3\"]"
                  ]
                },
                "examples": [
                  [
                    "1",
                    "2",
                    "3"
                  ]
                ]
              },
              "elementSeries": {
                "type": "string",
                "description": "Rolling stock series for the element this compartment is reserved in",
                "examples": [
                  "GOA-BM73A-KOMFORT"
                ]
              },
              "elementSeriesVersion": {
                "type": "integer",
                "description": "Rolling stock series version for the element this compartment is reserved in",
                "format": "int32",
                "examples": [
                  1
                ]
              }
            }
          }
        ]
      },
      "FreeSeatingDataResponse": {
        "required": [
          "reservationLineType",
          "reservedProperties"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineDataResponse"
          },
          {
            "type": "object",
            "properties": {
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage identifier of the corresponding carriage.",
                "examples": [
                  "3"
                ]
              },
              "elementSeries": {
                "type": "string",
                "description": "Rolling stock series for the element this free seat is reserved in, if any",
                "examples": [
                  "GOA-BM73A-KOMFORT"
                ]
              },
              "elementSeriesVersion": {
                "type": "integer",
                "description": "Rolling stock series version for the element the free seat is reserved in, if any",
                "format": "int32",
                "examples": [
                  1
                ]
              }
            }
          }
        ]
      },
      "FailedRebookingDataResponse": {
        "required": [
          "information",
          "reservationLineType",
          "reservedProperties"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineDataResponse"
          },
          {
            "type": "object",
            "properties": {
              "information": {
                "type": "string",
                "description": "Information about the reservation line that failed to be rebooked and a best effort description of why it failed. This field should include information about what seats or compartment in what element failed to be rebooked.",
                "examples": [
                  "Compartment 1 in element TYPE-73A-BFR-STANDARD-VY, v1 was closed due to <reason>. Unable to rebook 3 travellers due to <reason>."
                ]
              }
            }
          }
        ]
      },
      "PatchReservationLineRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "elementCarriageNumber": {
            "type": "integer",
            "description": "The `carriage number` of the element of the seat being reserved on this `reservationLine`.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "elementCarriageIdentifier": {
            "type": "string",
            "description": "The `carriage identifier` of the element of the seat being reserved on this `reservationLine`.",
            "examples": [
              "1"
            ]
          },
          "orderLineId": {
            "type": "string",
            "description": "OrderLine ID for this reservation line`",
            "examples": [
              "d4a599f6-6b0b-473f-a182-79f87a4a8689"
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of reservation line.",
            "examples": [
              "SINGLE_SEAT"
            ]
          }
        },
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "SINGLE_SEAT": "#/components/schemas/PatchSingleSeatReservationLineRequest",
            "COMPARTMENT": "#/components/schemas/PatchCompartmentReservationLineRequest",
            "FREE_SEATING": "#/components/schemas/PatchFreeSeatingReservationLineRequest"
          }
        }
      },
      "PatchSingleSeatReservationLineRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/PatchReservationLineRequest"
          },
          {
            "type": "object",
            "properties": {
              "seatNumber": {
                "type": "string",
                "description": "The `seat number` of the seat being reserved on this `reservationLine`.",
                "examples": [
                  "1"
                ]
              }
            }
          }
        ]
      },
      "PatchCompartmentReservationLineRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/PatchReservationLineRequest"
          },
          {
            "type": "object",
            "properties": {
              "numberOfTravellers": {
                "type": "integer",
                "description": "Number of travellers on the reservation line.",
                "format": "int32",
                "examples": [
                  2
                ]
              },
              "compartmentName": {
                "type": "string",
                "description": "Logical name of the compartment.",
                "examples": [
                  "10"
                ]
              }
            }
          }
        ]
      },
      "PatchFreeSeatingReservationLineRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/PatchReservationLineRequest"
          }
        ]
      },
      "RebookedReservationLineResponseV1": {
        "required": [
          "reference",
          "reservationLineType",
          "reservedProperties"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Reference for this reservation line`",
            "format": "uuid"
          },
          "orderLineId": {
            "type": "string",
            "description": "OrderLine ID for this reservation line`",
            "examples": [
              "d4a599f6-6b0b-473f-a182-79f87a4a8689"
            ]
          },
          "reservationLineType": {
            "type": "string",
            "description": "The type of reservation line.",
            "examples": [
              "SINGLE_SEAT"
            ]
          },
          "reservedProperties": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "The properties required by the traveller.",
              "examples": [
                "[FareClass_STANDARD_CLASS]"
              ]
            }
          }
        },
        "discriminator": {
          "propertyName": "reservationLineType",
          "mapping": {
            "SINGLE_SEAT": "#/components/schemas/RebookedSingleSeatReservationLineResponseV1",
            "COMPARTMENT": "#/components/schemas/RebookedCompartmentReservationLineResponseV1",
            "FREE_SEATING": "#/components/schemas/RebookedFreeSeatingReservationLineResponseV1",
            "FAILED_REBOOKING": "#/components/schemas/FailedRebookingDataResponseV1"
          }
        }
      },
      "FailedRebookingDataResponseV1": {
        "required": [
          "information",
          "reference",
          "reservationLineType",
          "reservedProperties"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "information": {
                "type": "string",
                "description": "Information about the reservation line that failed to be rebooked and a best effort description of why it failed. This field should include information about what seats or compartment in what element failed to be rebooked.",
                "examples": [
                  "Compartment 1 in element TYPE-73A-BFR-STANDARD-VY, v1 was closed due to <reason>. Unable to rebook 3 travellers due to <reason>."
                ]
              }
            }
          }
        ]
      },
      "RebookedSingleSeatReservationLineResponseV1": {
        "required": [
          "elementCarriageIdentifier",
          "elementSeries",
          "elementSeriesVersion",
          "reference",
          "reservationLineType",
          "reservedProperties",
          "seatNumber"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "seatNumber": {
                "type": "string",
                "description": "Seat number of this seat. This relates to the seat marker on the actual vehicle.",
                "examples": [
                  "S12"
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage identifier of the corresponding carriage.",
                "examples": [
                  "3"
                ]
              },
              "elementSeries": {
                "type": "string",
                "description": "Rolling stock series for the element this seat is reserved in",
                "examples": [
                  "GOA-BM73A-KOMFORT"
                ]
              },
              "elementSeriesVersion": {
                "type": "integer",
                "description": "Rolling stock series version for the element this seat is reserved in",
                "format": "int32",
                "examples": [
                  1
                ]
              }
            }
          }
        ]
      },
      "RebookedFreeSeatingReservationLineResponseV1": {
        "required": [
          "reference",
          "reservationLineType",
          "reservedProperties"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage identifier of the corresponding carriage.",
                "examples": [
                  "3"
                ]
              },
              "elementSeries": {
                "type": "string",
                "description": "Rolling stock series for the element this free seat is reserved in, if any",
                "examples": [
                  "GOA-BM73A-KOMFORT"
                ]
              },
              "elementSeriesVersion": {
                "type": "integer",
                "description": "Rolling stock series version for the element the free seat is reserved in, if any",
                "format": "int32",
                "examples": [
                  1
                ]
              }
            }
          }
        ]
      },
      "RebookedCompartmentReservationLineResponseV1": {
        "required": [
          "compartmentName",
          "elementCarriageIdentifier",
          "elementSeries",
          "elementSeriesVersion",
          "reference",
          "reservationLineType",
          "reservedProperties",
          "seatsInCompartment"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/RebookedReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "compartmentName": {
                "type": "string",
                "description": "Logical name of the compartment.",
                "examples": [
                  "10"
                ]
              },
              "numberOfTravellers": {
                "type": "integer",
                "description": "Number of travellers on the reservation line.",
                "format": "int32",
                "examples": [
                  2
                ]
              },
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage number of the element in which the compartment resides.",
                "examples": [
                  "1"
                ]
              },
              "seatsInCompartment": {
                "type": "array",
                "description": "All seatNumbers located in compartment.",
                "items": {
                  "type": "string",
                  "description": "All seatNumbers located in compartment.",
                  "examples": [
                    "[\"1\",\"2\",\"3\"]"
                  ]
                },
                "examples": [
                  [
                    "1",
                    "2",
                    "3"
                  ]
                ]
              },
              "elementSeries": {
                "type": "string",
                "description": "Rolling stock series for the element this compartment is reserved in",
                "examples": [
                  "GOA-BM73A-KOMFORT"
                ]
              },
              "elementSeriesVersion": {
                "type": "integer",
                "description": "Rolling stock series version for the element this compartment is reserved in",
                "format": "int32",
                "examples": [
                  1
                ]
              }
            }
          }
        ]
      },
      "ReservationLineResponseV1": {
        "required": [
          "numberOfTravellers",
          "orderLineIds",
          "reference",
          "requestedSeatingProperties",
          "reservedSeatingProperties",
          "type"
        ],
        "type": "object",
        "properties": {
          "orderLineIds": {
            "type": "array",
            "description": "List of order line ids linked to this reservation line. Contains one ID for single seat or compartment, multiple IDs if it was several single seat rebooked to one compartment reservation.",
            "items": {
              "type": "string",
              "description": "List of order line ids linked to this reservation line. Contains one ID for single seat or compartment, multiple IDs if it was several single seat rebooked to one compartment reservation."
            }
          },
          "reference": {
            "type": "string",
            "description": "Reference for this reservation line",
            "format": "uuid"
          },
          "requestedSeatingProperties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "reservedSeatingProperties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "numberOfTravellers": {
            "type": "integer",
            "description": "Number of travellers on the reservation line.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of reservation line.",
            "examples": [
              "SINGLE_SEAT"
            ]
          }
        },
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "SINGLE_SEAT": "#/components/schemas/SingleSeatReservationLineResponseV1",
            "COMPARTMENT": "#/components/schemas/CompartmentReservationLineResponseV1",
            "FREE_SEATING": "#/components/schemas/FreeSeatingReservationLineResponseV1",
            "FAILED_REBOOKING": "#/components/schemas/FailedRebookingReservationLineResponseV1"
          }
        }
      },
      "SingleSeatReservationLineResponseV1": {
        "required": [
          "elementCarriageIdentifier",
          "numberOfTravellers",
          "orderLineIds",
          "reference",
          "requestedSeatingProperties",
          "reservedSeatingProperties",
          "seatNumber",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "seatNumber": {
                "type": "string"
              },
              "elementCarriageIdentifier": {
                "type": "string"
              },
              "requestedProperties": {
                "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
              },
              "reservedProperties": {
                "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
              }
            }
          }
        ]
      },
      "CompartmentReservationLineResponseV1": {
        "required": [
          "compartmentLabel",
          "compartmentName",
          "elementCarriageIdentifier",
          "numberOfTravellers",
          "orderLineIds",
          "reference",
          "requestedSeatingProperties",
          "reservedSeatingProperties",
          "seatsInCompartment",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage number of the element in which the compartment resides.",
                "examples": [
                  "1"
                ]
              },
              "compartmentName": {
                "type": "string",
                "description": "Logical name of the compartment.",
                "examples": [
                  "10"
                ]
              },
              "seatsInCompartment": {
                "type": "array",
                "description": "All seatNumbers located in compartment.",
                "items": {
                  "type": "string",
                  "description": "All seatNumbers located in compartment.",
                  "examples": [
                    "[\"1\",\"2\",\"3\"]"
                  ]
                },
                "examples": [
                  [
                    "1",
                    "2",
                    "3"
                  ]
                ]
              },
              "requestedProperties": {
                "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
              },
              "reservedProperties": {
                "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
              },
              "compartmentLabel": {
                "type": "string",
                "description": "String of seats in the compartment.",
                "examples": [
                  "Kupe 11, 12, 13, 14, 15, 16"
                ]
              }
            }
          }
        ]
      },
      "FreeSeatingReservationLineResponseV1": {
        "required": [
          "numberOfTravellers",
          "orderLineIds",
          "reference",
          "requestedSeatingProperties",
          "reservedSeatingProperties",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "elementCarriageIdentifier": {
                "type": "string",
                "description": "Carriage identifier of the carriage containing the free seating. Null if the whole departure is available for free seating",
                "examples": [
                  "3"
                ]
              }
            }
          }
        ]
      },
      "FailedRebookingReservationLineResponseV1": {
        "required": [
          "information",
          "numberOfTravellers",
          "orderLineIds",
          "reference",
          "requestedSeatingProperties",
          "reservedSeatingProperties",
          "type"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ReservationLineResponseV1"
          },
          {
            "type": "object",
            "properties": {
              "information": {
                "type": "string",
                "description": "Information about the reservation line.",
                "examples": [
                  "Some information"
                ]
              }
            }
          }
        ]
      },
      "SortingRequestV1": {
        "required": [
          "sortingKey",
          "sortingValue"
        ],
        "type": "object",
        "properties": {
          "sortingKey": {
            "type": "string",
            "description": "Sorting key.",
            "examples": [
              "NuisanceFacilityEnum.noAnimals"
            ]
          },
          "sortingValue": {
            "type": "integer",
            "description": "Sorting value.",
            "format": "int32",
            "examples": [
              2
            ]
          }
        },
        "description": "Sorting property for rebooking of reservations."
      },
      "SortingResponseV1": {
        "required": [
          "sortingKey",
          "sortingValue"
        ],
        "type": "object",
        "properties": {
          "sortingKey": {
            "type": "string",
            "description": "Sorting key.",
            "examples": [
              "NuisanceFacilityEnum.noAnimals"
            ]
          },
          "sortingValue": {
            "type": "integer",
            "description": "Sorting value.",
            "format": "int32",
            "examples": [
              2
            ]
          }
        },
        "description": "Sorting property for rebooking of reservations."
      },
      "MaterialCompositionRequest": {
        "required": [
          "elements",
          "existingMaterialCompositionNetexId"
        ],
        "type": "object",
        "properties": {
          "existingMaterialCompositionNetexId": {
            "type": "string",
            "description": "The netex id of the `material composition` that will be changed.",
            "examples": [
              "GOA:CompoundTrain:73a_1-2-3-4"
            ]
          },
          "newMaterialCompositionNetexId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new netex id of the `material composition` that will be changed. If not supplied, an id will be generated.",
            "examples": [
              "GOA:CompoundTrain:73a_1-2-3-4_extra-carriage"
            ]
          },
          "elements": {
            "type": "array",
            "description": "List of elements in the changed material composition. Each list element corresponds to a carriage.",
            "items": {
              "$ref": "#/components/schemas/MaterialElementRequest"
            }
          }
        }
      },
      "MaterialElementRequest": {
        "required": [
          "carriageIdentifier",
          "direction",
          "logicalElementSeries",
          "sequenceNumber"
        ],
        "type": "object",
        "properties": {
          "logicalElementSeries": {
            "type": "string",
            "description": "The rolling stock series of the `logical element` for this element.",
            "examples": [
              "GOA-BM73A-PREMIUM"
            ]
          },
          "carriageIdentifier": {
            "type": "string",
            "description": "The carriage identifier for this element.",
            "examples": [
              "5"
            ]
          },
          "sequenceNumber": {
            "type": "integer",
            "description": "The sequence number for this element in the material composition. 1-n",
            "format": "int32",
            "examples": [
              3
            ]
          },
          "direction": {
            "type": "string",
            "description": "The direction for this element.",
            "enum": [
              "FORWARDS",
              "BACKWARDS",
              "UNKNOWN"
            ],
            "examples": [
              "BACKWARDS"
            ]
          }
        },
        "description": "List of elements in the changed material composition. Each list element corresponds to a carriage."
      },
      "ElementPartResponseV1": {
        "required": [
          "destinationStopPlace",
          "direction",
          "materialCompositionNetexId",
          "originStopPlace",
          "sequenceNumber"
        ],
        "type": "object",
        "properties": {
          "originStopPlace": {
            "$ref": "#/components/schemas/StopPlaceWithTimesResponseV1"
          },
          "destinationStopPlace": {
            "$ref": "#/components/schemas/StopPlaceWithTimesResponseV1"
          },
          "materialCompositionNetexId": {
            "type": "string",
            "description": "Netex id for corresponding material composition.",
            "examples": [
              "GOA:CompoundTrain:73"
            ]
          },
          "sequenceNumber": {
            "type": "integer",
            "description": "Sequence number of the element in this material composition.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "direction": {
            "type": "string",
            "description": "Direction of the element in this material composition.",
            "enum": [
              "FORWARDS",
              "BACKWARDS",
              "UNKNOWN"
            ],
            "examples": [
              "BACKWARDS"
            ]
          }
        },
        "description": "Information about one element in one material composition."
      },
      "SeatingOfferElementResponse": {
        "required": [
          "carriageIdentifier",
          "carriageNumber",
          "elementParts",
          "netexId",
          "series",
          "seriesVersion"
        ],
        "type": "object",
        "properties": {
          "series": {
            "type": "string",
            "description": "Rolling stock series of the corresponding element.",
            "examples": [
              "GOA-BM73A-KOMFORT"
            ]
          },
          "seriesVersion": {
            "type": "integer",
            "description": "Rolling stock version of the corresponding element.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "carriageNumber": {
            "type": "integer",
            "description": "Carriage number for the element in the train.",
            "format": "int32"
          },
          "carriageIdentifier": {
            "type": "string",
            "description": "Carriage identifier for the element in the train.",
            "examples": [
              "V5-upper"
            ]
          },
          "netexId": {
            "type": "string",
            "description": "Netex id of the element.",
            "examples": [
              "GOA:TrainElement:73-2-A"
            ]
          },
          "seatmapKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seatmap key of the basic element. This can be used as a lookup in the seatmap service.",
            "examples": [
              "SETRA-S431DT-LOWER"
            ]
          },
          "elementParts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ElementPartResponseV1"
            }
          }
        }
      },
      "SeatingOfferResponse": {
        "required": [
          "createdAt",
          "datedServiceJourneyId",
          "datedServiceJourneyVersion",
          "departureDateTime",
          "elements",
          "inactive",
          "lineId",
          "manualMaterial",
          "operatingDate",
          "organisationId",
          "seatingOfferStatus",
          "serviceJourneyId",
          "transportType"
        ],
        "type": "object",
        "properties": {
          "datedServiceJourneyId": {
            "type": "string",
            "description": "The netex id of the `datedServiceJourney`",
            "examples": [
              "VYG:DatedServiceJourney:61_21-12-02"
            ]
          },
          "datedServiceJourneyVersion": {
            "type": "integer",
            "description": "The version of the `datedServiceJourney`",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "organisationId": {
            "type": "integer",
            "description": "The organisation id this seating offer is operated by.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "replacesNetexId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Netex id for the previous material used for this seating offer. If `null` the material on this dated service journey has never been changed.",
            "examples": [
              "GOA:Train:73"
            ]
          },
          "seatingOfferStatus": {
            "type": "string",
            "description": "Describes the seating offer status",
            "enum": [
              "ACTIVE",
              "CANCELLED",
              "TO_BE_REPLACED",
              "REPLACED_MATERIAL",
              "REPLACED_DSJ",
              "SEAT_USAGES_DELETED",
              "REMOVED",
              "DEPRECATED",
              "REPLACED"
            ],
            "examples": [
              "ACTIVE"
            ]
          },
          "serviceJourneyId": {
            "type": "string",
            "description": "The netex id of the `serviceJourney`",
            "examples": [
              "GOA:ServiceJourney:709_337-R"
            ]
          },
          "operatingDate": {
            "type": "string",
            "description": "The date which the departure belongs to. Might differ from departureDateTime.",
            "format": "date",
            "examples": [
              "2023-02-13"
            ]
          },
          "departureDateTime": {
            "type": "string",
            "description": "The time of departure from the first station.",
            "format": "date-time",
            "examples": [
              "2023-02-13T12:00:00+01:00"
            ]
          },
          "lineId": {
            "type": "string",
            "description": "The netex id of the `line`",
            "examples": [
              "GOA:Line:50"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When this seating offer was initially created",
            "format": "date-time",
            "examples": [
              "2018-10-26T10:00:00Z"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The last time this seating offer was updated. If `null` the seating offer has not been updated",
            "format": "date-time",
            "examples": [
              "2018-10-26T10:23:38Z"
            ]
          },
          "inactive": {
            "type": "boolean",
            "description": "Whether this seating offer is closed for sale or not",
            "examples": [
              false
            ]
          },
          "manualMaterial": {
            "type": "boolean",
            "description": "Whether the material for this seating offer was set manually.",
            "examples": [
              false
            ]
          },
          "transportType": {
            "type": "string",
            "description": "The type of transport this seating offer is for.",
            "enum": [
              "BUS",
              "REPLACEMENT_BUS",
              "TRAIN",
              "FERRY",
              "OTHER"
            ],
            "examples": [
              "TRAIN"
            ]
          },
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatingOfferElementResponse"
            }
          }
        }
      },
      "StopPlaceWithTimesResponseV1": {
        "required": [
          "arrivalDateTime",
          "departureDateTime",
          "nsrCode",
          "sequenceNr"
        ],
        "type": "object",
        "properties": {
          "nsrCode": {
            "type": "string",
            "description": "Stop Place id defined by National StopPlace registry.",
            "examples": [
              "NSR:StopPlace:337"
            ]
          },
          "departureDateTime": {
            "type": "string",
            "description": "Time of departure from this stop. Set to time of arrival on last stop.",
            "format": "date-time",
            "examples": [
              "2025-02-12T12:08:45.539473+01:00"
            ]
          },
          "arrivalDateTime": {
            "type": "string",
            "description": "Time of arrival on this stop. Set to time of departure on first stop.",
            "format": "date-time",
            "examples": [
              "2025-02-12T12:08:45.539473+01:00"
            ]
          },
          "sequenceNr": {
            "type": "integer",
            "description": "The ordering of the station in the journey.",
            "format": "int32",
            "examples": [
              0
            ]
          }
        },
        "description": "Destination stop place for this element in this material composition."
      },
      "ReservationResponse": {
        "required": [
          "createdAt",
          "createdBy",
          "datedServiceJourneyId",
          "destinationStopPlace",
          "organisationId",
          "originStopPlace",
          "reference",
          "reservationLines",
          "status",
          "updatedAt",
          "version",
          "versionedAt"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "description": "The `version` of the reservation. Starts with `1`.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "originStopPlace": {
            "$ref": "#/components/schemas/StopPlaceResponseV1"
          },
          "destinationStopPlace": {
            "$ref": "#/components/schemas/StopPlaceResponseV1"
          },
          "datedServiceJourneyId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the dated service journey"
          },
          "status": {
            "minLength": 1,
            "type": "string",
            "description": "Describes the `reservation` status.",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "CANCELLED",
              "DEPRECATED"
            ],
            "examples": [
              "DRAFT"
            ]
          },
          "reference": {
            "minLength": 1,
            "type": "string",
            "description": "The reference for this reservation",
            "format": "uuid",
            "examples": [
              "c129cc9c-76e4-4f28-a4e2-5af96550627a"
            ]
          },
          "organisationId": {
            "type": "integer",
            "description": "The organisation id of the order which the `reservation` belongs to.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "createdAt": {
            "minLength": 1,
            "type": "string",
            "description": "When this reservation was initially created",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "rebookingStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "Describes the `rebooking` status of the reservation.",
            "enum": [
              "ACCEPTED",
              "MANUAL",
              "SUGGESTED",
              "REBOOKED_DRAFT",
              "REJECTED"
            ],
            "examples": [
              "ACCEPTED"
            ]
          },
          "versionedAt": {
            "minLength": 1,
            "type": "string",
            "description": "When this version of this reservation was created",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "updatedAt": {
            "minLength": 1,
            "type": "string",
            "description": "When this was previously updated. This includes status changes, reservation line changes and so on.",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "reservationLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReservationLineResponse"
            }
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The 'id' of the order the reservation belongs to",
            "examples": [
              "A1B2C3D4"
            ]
          },
          "createdBy": {
            "type": "integer",
            "description": "The organisation id this version of the `reservation` was created by.This id is determined by the authentication used by the client.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "updatedBy": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The organisation id of the organisation that last updated this `reservation`.This id is determined by the authentication used by the client.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "info": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional free text information about the reservation.",
            "examples": [
              "Unable to rebook this reservation due to no available seats."
            ]
          }
        }
      },
      "StopPlaceResponseV1": {
        "required": [
          "nsrCode",
          "sequenceNr"
        ],
        "type": "object",
        "properties": {
          "nsrCode": {
            "type": "string",
            "description": "Stop Place id defined by National StopPlace registry.",
            "examples": [
              "NSR:StopPlace:337"
            ]
          },
          "sequenceNr": {
            "type": "integer",
            "description": "The ordering of the station in the journey.",
            "format": "int32",
            "examples": [
              0
            ]
          }
        },
        "description": "Destination `StopPlace` of the `reservation`"
      },
      "CreateThirdPartyReservationsRequest": {
        "required": [
          "reservations"
        ],
        "type": "object",
        "properties": {
          "reservations": {
            "type": "array",
            "description": "The third party reservations to create",
            "items": {
              "$ref": "#/components/schemas/ThirdPartyReservation"
            }
          }
        }
      },
      "ThirdPartyReservation": {
        "required": [
          "datedServiceJourneyId",
          "orderId",
          "owningSystem",
          "reference"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "This id will be used as reference for this reservation.",
            "format": "uuid",
            "examples": [
              "c129cc9c-76e4-4f28-a4e2-5af96550627a"
            ]
          },
          "orderId": {
            "type": "string",
            "description": "An orderId that can be used for lookup purposes",
            "examples": [
              "A1B2C3D4"
            ]
          },
          "datedServiceJourneyId": {
            "type": "string",
            "description": "The `id` of the dated service journey which the `reservation` belongs to.",
            "examples": [
              "ENT:DatedServiceJourney:4788391"
            ]
          },
          "owningSystem": {
            "type": "string",
            "description": "The ID of the system that owns this reservation",
            "examples": [
              "osdm-gateway"
            ]
          }
        },
        "description": "The third party reservations to create"
      },
      "CreateThirdPartyReservationsResponse": {
        "required": [
          "thirdPartyReservations"
        ],
        "type": "object",
        "properties": {
          "thirdPartyReservations": {
            "type": "array",
            "description": "The third party reservations that were created",
            "items": {
              "$ref": "#/components/schemas/ThirdPartyReservationResponse"
            }
          }
        }
      },
      "ThirdPartyReservationResponse": {
        "required": [
          "createdAt",
          "orderId",
          "owningSystem",
          "reference"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "If supplied this id will be used as reference for this reservation. If not it will be generated automatically.",
            "format": "uuid",
            "examples": [
              "c129cc9c-76e4-4f28-a4e2-5af96550627a"
            ]
          },
          "orderId": {
            "type": "string",
            "description": "An orderId that can be used for lookup purposes",
            "examples": [
              "A1B2C3D4"
            ]
          },
          "owningSystem": {
            "type": "string",
            "description": "The ID of the system that owns this reservation",
            "examples": [
              "osdm-gateway"
            ]
          },
          "createdAt": {
            "minLength": 1,
            "type": "string",
            "description": "When this reservation was initially created",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          }
        },
        "description": "The third party reservations that were created"
      },
      "CreateReservationRequest": {
        "required": [
          "datedServiceJourneyId",
          "destinationNsrCode",
          "originNsrCode",
          "reservationLines"
        ],
        "type": "object",
        "properties": {
          "originNsrCode": {
            "minLength": 1,
            "type": "string",
            "description": "The `nsrCode` of the origin stop place",
            "examples": [
              "NSR:StopPlace:337"
            ]
          },
          "destinationNsrCode": {
            "minLength": 1,
            "type": "string",
            "description": "The `nsrCode` of the destination stop place",
            "examples": [
              "NSR:StopPlace:548"
            ]
          },
          "datedServiceJourneyId": {
            "minLength": 1,
            "type": "string",
            "description": "The `id` of the dated service journey which the `reservation` belongs to.",
            "examples": [
              "ENT:DatedServiceJourney:4788391"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "If supplied this id will be used as reference for this reservation. If not it will be generated automatically.",
            "format": "uuid",
            "examples": [
              "c129cc9c-76e4-4f28-a4e2-5af96550627a"
            ]
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "An orderId that can be used for lookup purposes",
            "examples": [
              "A1B2C3D4"
            ]
          },
          "reservationLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReservationLineRequest"
            }
          },
          "status": {
            "type": "string",
            "description": "The status to set for the reservation.",
            "default": "DRAFT",
            "enum": [
              "DRAFT",
              "CONFIRMED"
            ],
            "examples": [
              "DRAFT"
            ]
          }
        }
      },
      "CreateReservationLinesBySeatingPropertiesRequest": {
        "required": [
          "seatingPropertiesToReserve"
        ],
        "type": "object",
        "properties": {
          "seatingPropertiesToReserve": {
            "$ref": "#/components/schemas/SeatingPropertiesRequestV1"
          },
          "numberOfTravellers": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The properties required by the traveller(s).",
            "format": "int32"
          },
          "mustReserveWholeCompartment": {
            "type": "boolean",
            "description": "Whether to reserve a whole compartment to this traveller. If not provided, or set to false, a single seat with the provided properties will be reserved instead.",
            "default": false,
            "examples": [
              true
            ]
          },
          "orderLineId": {
            "type": [
              "string",
              "null"
            ],
            "description": "OrderLine ID to reserve seats for",
            "examples": [
              "d4a599f6-6b0b-473f-a182-79f87a4a8689"
            ]
          }
        },
        "description": "List of SeatingProperties to allocate for."
      },
      "ReplaceReservationLinesRequest": {
        "required": [
          "reservationLinesToAllocate",
          "reservationLinesToRemove"
        ],
        "type": "object",
        "properties": {
          "reservationLinesToAllocate": {
            "type": "array",
            "description": "List of SeatingProperties to allocate for.",
            "items": {
              "$ref": "#/components/schemas/CreateReservationLinesBySeatingPropertiesRequest"
            }
          },
          "reservationLinesToRemove": {
            "type": "array",
            "description": "List of reservationLine-references to remove.",
            "items": {
              "type": "string",
              "description": "List of reservationLine-references to remove.",
              "format": "uuid"
            }
          }
        },
        "description": "Request body detailing which reservation lines to remove and what should replace them"
      },
      "SeatingPropertiesRequestV1": {
        "required": [
          "baggageType",
          "mobilityFacilities",
          "nuisanceFacilities",
          "passengerCommsFacilities",
          "sanitaryFacilities"
        ],
        "type": "object",
        "properties": {
          "fareClass": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fare class of the seat. Netex enumeration.",
            "enum": [
              "UNKNOWN",
              "FIRST_CLASS",
              "SECOND_CLASS",
              "THIRD_CLASS",
              "PREFERENTE",
              "PREMIUM_CLASS",
              "BUSINESS_CLASS",
              "STANDARD_CLASS",
              "TURISTA",
              "ECONOMY_CLASS",
              "ANY"
            ],
            "examples": [
              "FIRST_CLASS"
            ]
          },
          "groupBooking": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group booking permission of the seat. Netex enumeration.",
            "enum": [
              "GROUPS_ALLOWED",
              "GROUPS_NOT_ALLOWED",
              "GROUPS_ALLOWED_WITH_RESERVATION",
              "GROUP_BOOKINGS_RESTRICTED",
              "UNKNOWN"
            ],
            "examples": [
              "GROUPS_ALLOWED"
            ]
          },
          "accommodationFacility": {
            "type": [
              "string",
              "null"
            ],
            "description": "Accommodation property of the seat. Netex enumeration.",
            "enum": [
              "UNKNOWN",
              "SEATING",
              "FOLDING_SEAT",
              "SLEEPER",
              "SINGLE_SLEEPER",
              "DOUBLE_SLEEPER",
              "SPECIAL_SLEEPER",
              "COUCHETTE",
              "SINGLE_COUCHETTE",
              "DOUBLE_COUCHETTE",
              "SPECIAL_SEATING",
              "RECLINING_SEATS",
              "BABY_COMPARTMENT",
              "FAMILY_CARRIAGE",
              "RECREATION_AREA",
              "PANORAMA_COACH",
              "PULLMAN_COACH",
              "PUSHCHAIR",
              "WHEELCHAIR",
              "STANDING"
            ],
            "examples": [
              "SINGLE_SLEEPER"
            ]
          },
          "seatAttachment": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attachment of the seat. Netex enumeration.",
            "enum": [
              "REVERSIBLE",
              "FIXED",
              "FOLDING",
              "REMOVABLE",
              "OTHER"
            ],
            "examples": [
              "REVERSIBLE"
            ]
          },
          "seatPosition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Position of the seat. Netex enumeration.",
            "enum": [
              "WINDOW",
              "AISLE",
              "MIDDLE",
              "UPPER_BERTH",
              "MIDDLE_BERTH",
              "LOWER_BERTH",
              "OTHER"
            ],
            "examples": [
              "MIDDLE_BERTH"
            ]
          },
          "relativeDirection": {
            "type": [
              "string",
              "null"
            ],
            "description": "Relative direction of the seat. Netex enumeration.",
            "enum": [
              "BOTH",
              "FORWARDS",
              "BACKWARDS"
            ],
            "examples": [
              "BACKWARDS"
            ]
          },
          "nuisanceFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible nuisance factors of the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible nuisance factors of the seat. Netex enumerations.",
              "enum": [
                "UNKNOWN",
                "SMOKING",
                "NO_SMOKING",
                "FAMILY_AREA",
                "CHILDFREE_AREA",
                "ANIMALS_ALLOWED",
                "NO_ANIMALS",
                "BREASTFEEDING_FRIENDLY",
                "MOBILE_PHONE_USE_ZONE",
                "MOBILE_PHONE_FREE_ZONE"
              ],
              "examples": [
                "FAMILY_AREA,SMOKING"
              ]
            },
            "examples": [
              "FAMILY_AREA,SMOKING"
            ]
          },
          "passengerCommsFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible communication facilities available for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible communication facilities available for passenger in the seat. Netex enumerations.",
              "enum": [
                "UNKNOWN",
                "FREE_WIFI",
                "PUBLIC_WIFI",
                "POWER_SUPPLY_SOCKETS",
                "TELEPHONE",
                "AUDIO_ENTERTAINMENT",
                "VIDEO_ENTERTAINMENT",
                "BUSINESS_SERVICES",
                "INTERNET",
                "POST_OFFICE",
                "POST_BOX"
              ],
              "examples": [
                "POWER_SUPPLY_SOCKETS,TELEPHONE"
              ]
            },
            "examples": [
              "POWER_SUPPLY_SOCKETS,TELEPHONE"
            ]
          },
          "sanitaryFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible sanitary facilities available for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible sanitary facilities available for passenger in the seat. Netex enumerations.",
              "enum": [
                "NONE",
                "TOILET",
                "WHEELCHAIR_ACCESS_TOILET",
                "SHOWER",
                "WASHING_AND_CHANGE_FACILITIES",
                "BABY_CHANGE",
                "WHEELCHAIR_BABY_CHANGE",
                "SHOE_SHINER",
                "OTHER"
              ],
              "examples": [
                "TOILET,SHOWER"
              ]
            },
            "examples": [
              "TOILET,SHOWER"
            ]
          },
          "mobilityFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible mobility facilities available for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible mobility facilities available for passenger in the seat. Netex enumerations.",
              "enum": [
                "UNKNOWN",
                "LOW_FLOOR",
                "STEP_FREE_ACCESS",
                "SUITABLE_FOR_PUSHCHAIRS",
                "SUITABLE_FOR_WHEELCHAIRS",
                "SUITABLE_FOR_HEAVILIY_DISABLED",
                "BOARDING_ASSISTANCE",
                "ONBOARD_ASSISTANCE",
                "UNACCOMPANIED_MINOR_ASSISTANCE",
                "TACTILE_PLATFORM_EDGES",
                "TACTILE_GUIDING_STRIPS"
              ],
              "examples": [
                "SUITABLE_FOR_WHEELCHAIRS,LOW_FLOOR"
              ]
            },
            "examples": [
              "SUITABLE_FOR_WHEELCHAIRS,LOW_FLOOR"
            ]
          },
          "baggageType": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible baggage types possible for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible baggage types possible for passenger in the seat. Netex enumerations.",
              "enum": [
                "HANDBAG",
                "HAND_LUGGAGE",
                "SMALL_SUITCASE",
                "SUITCASE",
                "TRUNK",
                "OVERSIZE_ITEM",
                "BICYCLE",
                "MOTORCYCLE",
                "SPORTING_EQUIPMENT",
                "SKIS",
                "MUSICAL_INSTRUMENT",
                "PUSH_CHAIR",
                "WHEELCHAIR",
                "MOTORIZED_WHEELCHAIR",
                "LARGE_MOTORIZED_WHEELCHAIR",
                "SMALL_ANIMAL",
                "ANIMAL",
                "GAME",
                "OTHER"
              ],
              "examples": [
                "HANDBAG,SUITCASE"
              ]
            },
            "examples": [
              "HANDBAG,SUITCASE"
            ]
          }
        },
        "description": "Properties of a seat. They describe both physical and logical properties of a seat.Physical properties are for example position of the seat.Logical properties describe properties that the operator use when selling the seat. For example fare class."
      },
      "CreateReservationBySeatingPropertiesRequest": {
        "required": [
          "datedServiceJourneyId",
          "destinationNsrCode",
          "originNsrCode",
          "seatingPropertiesRequests",
          "status"
        ],
        "type": "object",
        "properties": {
          "originNsrCode": {
            "type": "string",
            "description": "The `nsrCode` of the origin stop place",
            "examples": [
              "NSR:StopPlace:337"
            ]
          },
          "destinationNsrCode": {
            "type": "string",
            "description": "The `nsrCode` of the destination stop place",
            "examples": [
              "NSR:StopPlace:548"
            ]
          },
          "datedServiceJourneyId": {
            "type": "string",
            "description": "The `id` of the dated service journey which the `reservation` belongs to.",
            "examples": [
              "ENT:DatedServiceJourney:4788391"
            ]
          },
          "status": {
            "type": "string",
            "description": "The status to set for the reservation.",
            "enum": [
              "DRAFT",
              "CONFIRMED"
            ],
            "examples": [
              "DRAFT"
            ]
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The 'id' of the order the reservation belongs to",
            "examples": [
              "A1B2C3D4"
            ]
          },
          "seatingPropertiesRequests": {
            "type": "array",
            "description": "List of traveler seating properties to reserve seats or compartments for, with optional associated orderLineId.",
            "items": {
              "$ref": "#/components/schemas/CreateReservationLinesBySeatingPropertiesRequest"
            }
          }
        }
      },
      "CreateTripReservationBySeatingPropertiesRequest": {
        "required": [
          "legs",
          "originalDatedServiceJourneyId",
          "reservationLinesRequests"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Order ID for the reservation."
          },
          "originalDatedServiceJourneyId": {
            "type": "string",
            "description": "Original dated service journey ID."
          },
          "status": {
            "type": "string",
            "description": "Initial status of the reservation.",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "CANCELLED",
              "DEPRECATED"
            ]
          },
          "legs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LegRequest"
            }
          },
          "reservationLinesRequests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateTripReservationLinesBySeatingPropertiesRequest"
            }
          }
        },
        "description": "Request to create a trip reservation by seating properties."
      },
      "CreateTripReservationLinesBySeatingPropertiesRequest": {
        "required": [
          "numberOfTravellers",
          "seatingPropertiesToReserve"
        ],
        "type": "object",
        "properties": {
          "seatingPropertiesToReserve": {
            "$ref": "#/components/schemas/SeatingPropertiesRequestV1"
          },
          "numberOfTravellers": {
            "type": "integer",
            "description": "The number of travellers of this reservation line.",
            "format": "int32"
          },
          "mustReserveWholeCompartment": {
            "type": "boolean",
            "description": "Whether to reserve a whole compartment to this traveller. If not provided, or set to false, a single seat with the provided properties will be reserved instead.",
            "default": false,
            "examples": [
              true
            ]
          },
          "orderLineId": {
            "type": [
              "string",
              "null"
            ],
            "description": "OrderLine ID to reserve seats for",
            "examples": [
              "d4a599f6-6b0b-473f-a182-79f87a4a8689"
            ]
          }
        }
      },
      "LegRequest": {
        "required": [
          "datedServiceJourneyId",
          "destinationNsrCode",
          "originNsrCode"
        ],
        "type": "object",
        "properties": {
          "datedServiceJourneyId": {
            "type": "string",
            "description": "Dated service journey ID for the leg."
          },
          "originNsrCode": {
            "type": "string",
            "description": "NSR code where the traveller leg starts."
          },
          "destinationNsrCode": {
            "type": "string",
            "description": "NSR code where the traveller leg ends."
          }
        },
        "description": "Leg of a trip. Each leg results in a new reservation."
      },
      "RebookToSeatTypeRequest": {
        "required": [
          "datedServiceJourneyId",
          "mustReserveWholeCompartment",
          "reservationReferences",
          "seatingProperties"
        ],
        "type": "object",
        "properties": {
          "datedServiceJourneyId": {
            "type": "string",
            "description": "The datedServiceJourney whose reservations should be rebooked"
          },
          "reservationReferences": {
            "type": "array",
            "description": "References of reservations that should be moved",
            "items": {
              "type": "string",
              "description": "References of reservations that should be moved",
              "format": "uuid"
            }
          },
          "seatingProperties": {
            "$ref": "#/components/schemas/SeatingPropertiesRequestV1"
          },
          "mustReserveWholeCompartment": {
            "type": "boolean",
            "description": "If accommodation is COUCHETTE or SLEEPER, should the whole compartment be reserved (true) or can strangers be seated together (false)?"
          }
        }
      },
      "PatchSeatingOfferRequest": {
        "type": "object",
        "properties": {
          "inactive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "If true, the departure will not be open for sales",
            "examples": [
              false
            ]
          },
          "manualMaterial": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "If true, the material on this SeatingOffer has been set manually",
            "examples": [
              false
            ]
          }
        }
      },
      "ReservationUpdateRequest": {
        "required": [
          "checkOrderStatusHistory"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new reservation status. Mutually exclusive with rebookingStatus.",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "CANCELLED",
              "DEPRECATED"
            ],
            "examples": [
              "CONFIRMED"
            ]
          },
          "rebookingStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new rebooking status. Mutually exclusive with status.",
            "enum": [
              "ACCEPTED",
              "MANUAL",
              "SUGGESTED",
              "REBOOKED_DRAFT",
              "REJECTED"
            ],
            "examples": [
              "ACCEPTED"
            ]
          },
          "info": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional information that can be added when patching rebookingStatus to REJECTED.",
            "examples": [
              "No seats available."
            ]
          },
          "checkOrderStatusHistory": {
            "type": "boolean",
            "description": "A flag to be used by internal clients, if true, check if the order has ever been CONFIRMED, should not change reservation status to CONFIRMED if order has never been CONFIRMED",
            "examples": [
              true
            ]
          },
          "sendNotification": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to send rebooking/replaced notification messages on Kafka when confirming. Defaults to true.",
            "examples": [
              true
            ]
          }
        }
      },
      "RebookedReservationLineResponse": {
        "required": [
          "rebookedReservationLine",
          "reference"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "The reference for this reservation line, this is a randomly generated UUID",
            "format": "uuid",
            "examples": [
              "123e4567-e89b-12d3-a456-426614174000"
            ]
          },
          "orderLineId": {
            "type": [
              "string",
              "null"
            ],
            "description": "OrderLine ID for this reservation line`",
            "examples": [
              "d4a599f6-6b0b-473f-a182-79f87a4a8689"
            ]
          },
          "previousReservationLine": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RebookedReservationLineDataResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "rebookedReservationLine": {
            "$ref": "#/components/schemas/RebookedReservationLineDataResponse"
          }
        },
        "description": "Reservation lines that are rebooked for this reservation, including previous reservation line."
      },
      "RebookedReservationResponse": {
        "required": [
          "createdAt",
          "datedServiceJourneyId",
          "destinationStopPlace",
          "organisationId",
          "originStopPlace",
          "rebookedReservationLines",
          "rebookingStatus",
          "reference",
          "reservationStatus",
          "updatedAt",
          "version",
          "versionedAt"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "The reference for this reservation, this is a randomly generated UUID",
            "format": "uuid",
            "examples": [
              "123e4567-e89b-12d3-a456-426614174000"
            ]
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `orderId` of the connected order where the creating client provided it. There are reservations without a connected order.",
            "examples": [
              "ZGMCDSVS"
            ]
          },
          "version": {
            "type": "integer",
            "description": "The highest/newest `version` of this reservation. The initial version number is `1`.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "originStopPlace": {
            "$ref": "#/components/schemas/StopPlaceResponseV1"
          },
          "previousOriginStopPlace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StopPlaceResponseV1"
              },
              {
                "type": "null"
              }
            ]
          },
          "destinationStopPlace": {
            "$ref": "#/components/schemas/StopPlaceResponseV1"
          },
          "previousDestinationStopPlace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StopPlaceResponseV1"
              },
              {
                "type": "null"
              }
            ]
          },
          "datedServiceJourneyId": {
            "type": "string",
            "description": "Id of the dated service journey"
          },
          "previousDatedServiceJourneyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Id of the previous dated service journey if the dated service journey has been changed"
          },
          "organisationId": {
            "type": "integer",
            "description": "The organisation id of the order which the `reservation` belongs to.This id is determined by the authentication used by the client.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When this reservation was initially created",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "versionedAt": {
            "type": "string",
            "description": "When this version of this reservation was created",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When this was previously updated. This includes status changes, reservation line changes and so on.",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "reservationStatus": {
            "type": "string",
            "description": "Describes the `reservation` status.",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "CANCELLED",
              "DEPRECATED"
            ],
            "examples": [
              "DRAFT"
            ]
          },
          "rebookingStatus": {
            "type": "string",
            "description": "Describes the `rebooking` status of the reservation.",
            "enum": [
              "ACCEPTED",
              "MANUAL",
              "SUGGESTED",
              "REBOOKED_DRAFT",
              "REJECTED"
            ],
            "examples": [
              "ACCEPTED"
            ]
          },
          "rebookedReservationLines": {
            "minItems": 1,
            "type": "array",
            "description": "Reservation lines that are rebooked for this reservation, including previous reservation line.",
            "items": {
              "$ref": "#/components/schemas/RebookedReservationLineResponse"
            }
          },
          "info": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional free text information about the reservation.",
            "examples": [
              "Unable to rebook this reservation due to no available seats."
            ]
          }
        }
      },
      "CoachResponse": {
        "required": [
          "id",
          "label",
          "seats",
          "sequenceNumber"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The identifier of the coach",
            "examples": [
              "1"
            ]
          },
          "label": {
            "type": "string",
            "description": "The label of the coach",
            "examples": [
              "1"
            ]
          },
          "sequenceNumber": {
            "type": "integer",
            "description": "The sequence number in this coach",
            "format": "int32"
          },
          "seats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatResponse"
            }
          }
        },
        "description": "List of coaches in this trip"
      },
      "SeatResponse": {
        "required": [
          "id",
          "label",
          "reservations"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The identifier of the seat",
            "examples": [
              "1"
            ]
          },
          "label": {
            "type": "string",
            "description": "The label for the seat",
            "examples": [
              "12A"
            ]
          },
          "reservations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReservationResponse"
            }
          }
        },
        "description": "List of seats in this coach"
      },
      "TripResponse": {
        "required": [
          "coaches",
          "route",
          "stations",
          "tripId"
        ],
        "type": "object",
        "properties": {
          "tripId": {
            "type": "string",
            "description": "The unique identifier of the trip (DSJ)",
            "examples": [
              "VYG:DatedServiceJourney:67_OSL-BRG_25-05-22"
            ]
          },
          "route": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Ordered list of stop place IDs in the route",
              "examples": [
                "[\"NSR:StopPlace:337\",\"NSR:StopPlace:548\"]"
              ]
            }
          },
          "stations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "description": "Mapping of stop place IDs to human-readable station names",
              "examples": [
                "{\"NSR:StopPlace:337\":\"Oslo\",\"NSR:StopPlace:548\":\"Bergen\"}"
              ]
            },
            "description": "Mapping of stop place IDs to human-readable station names",
            "examples": [
              {
                "NSR:StopPlace:337": "Oslo",
                "NSR:StopPlace:548": "Bergen"
              }
            ]
          },
          "coaches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CoachResponse"
            }
          }
        }
      },
      "RebookedReservationResponseV1": {
        "required": [
          "createdAt",
          "datedServiceJourneyId",
          "destinationStopPlace",
          "organisationId",
          "originStopPlace",
          "previousReservationLines",
          "rebookingStatus",
          "reference",
          "reservationLines",
          "reservationStatus",
          "updatedAt",
          "version",
          "versionedAt"
        ],
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "The reference for this reservation, this is a randomly generated UUID",
            "format": "uuid",
            "examples": [
              "123e4567-e89b-12d3-a456-426614174000"
            ]
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `orderId` of the connected order where the creating client provided it. There are reservations without a connected order.",
            "examples": [
              "ZGMCDSVS"
            ]
          },
          "version": {
            "type": "integer",
            "description": "The highest/newest `version` of this reservation. The initial version number is `1`.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "originStopPlace": {
            "$ref": "#/components/schemas/StopPlaceResponseV1"
          },
          "previousOriginStopPlace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StopPlaceResponseV1"
              },
              {
                "type": "null"
              }
            ]
          },
          "destinationStopPlace": {
            "$ref": "#/components/schemas/StopPlaceResponseV1"
          },
          "previousDestinationStopPlace": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StopPlaceResponseV1"
              },
              {
                "type": "null"
              }
            ]
          },
          "datedServiceJourneyId": {
            "type": "string",
            "description": "Id of the dated service journey"
          },
          "previousDatedServiceJourneyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Id of the previous dated service journey if the dated service journey has been changed"
          },
          "organisationId": {
            "type": "integer",
            "description": "The organisation id of the order which the `reservation` belongs to.This id is determined by the authentication used by the client.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When this reservation was initially created",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "versionedAt": {
            "type": "string",
            "description": "When this version of this reservation was created",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When this was previously updated. This includes status changes, reservation line changes and so on.",
            "format": "YYYY-MM-DDThh:mm:ssZ",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "reservationStatus": {
            "type": "string",
            "description": "Describes the `reservation` status.",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "CANCELLED",
              "DEPRECATED"
            ],
            "examples": [
              "DRAFT"
            ]
          },
          "rebookingStatus": {
            "type": "string",
            "description": "Describes the `rebooking` status of the reservation.",
            "enum": [
              "ACCEPTED",
              "MANUAL",
              "SUGGESTED",
              "REBOOKED_DRAFT",
              "REJECTED"
            ],
            "examples": [
              "ACCEPTED"
            ]
          },
          "reservationLines": {
            "minItems": 1,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RebookedReservationLineResponseV1"
            }
          },
          "previousReservationLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RebookedReservationLineResponseV1"
            }
          },
          "info": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional free text information about the reservation.",
            "examples": [
              "Unable to rebook this reservation due to no available seats."
            ]
          }
        }
      },
      "CommonError": {
        "required": [
          "error",
          "exception",
          "message",
          "path",
          "status",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "error": {
            "type": "string"
          },
          "exception": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        }
      },
      "RebookingOverviewResponseV1": {
        "required": [
          "amountOfAcceptedRebookings",
          "amountOfManualRebookings",
          "amountOfNoJourneyRebookings",
          "amountOfSnoozedRebookings",
          "amountOfSuggestedRebookings",
          "originalDatedServiceJourneyId",
          "replacements"
        ],
        "type": "object",
        "properties": {
          "originalDatedServiceJourneyId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the original dated service journey"
          },
          "replacements": {
            "type": "array",
            "description": "All replacement dated service journeys",
            "items": {
              "type": "string",
              "description": "All replacement dated service journeys"
            }
          },
          "amountOfSuggestedRebookings": {
            "type": "integer",
            "description": "Number of rebookings suggested",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "amountOfManualRebookings": {
            "type": "integer",
            "description": "Number of rebookings ready for manual handling",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "amountOfAcceptedRebookings": {
            "type": "integer",
            "description": "Number of rebookings accepted",
            "format": "int32",
            "examples": [
              0
            ]
          },
          "amountOfNoJourneyRebookings": {
            "type": "integer",
            "description": "Number of no-journey rebookings",
            "format": "int32",
            "examples": [
              0
            ]
          },
          "amountOfSnoozedRebookings": {
            "type": "integer",
            "description": "Number of rebookings snoozed",
            "format": "int32",
            "examples": [
              0
            ]
          }
        }
      },
      "SeatingPropertiesResponseV1": {
        "type": "object",
        "properties": {
          "fareClass": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fare class of the seat. Netex enumeration.",
            "enum": [
              "UNKNOWN",
              "FIRST_CLASS",
              "SECOND_CLASS",
              "THIRD_CLASS",
              "PREFERENTE",
              "PREMIUM_CLASS",
              "BUSINESS_CLASS",
              "STANDARD_CLASS",
              "TURISTA",
              "ECONOMY_CLASS",
              "ANY"
            ],
            "examples": [
              "FIRST_CLASS"
            ]
          },
          "groupBooking": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group booking permission of the seat. Netex enumeration.",
            "enum": [
              "GROUPS_ALLOWED",
              "GROUPS_NOT_ALLOWED",
              "GROUPS_ALLOWED_WITH_RESERVATION",
              "GROUP_BOOKINGS_RESTRICTED",
              "UNKNOWN"
            ],
            "examples": [
              "GROUPS_ALLOWED"
            ]
          },
          "accommodationFacility": {
            "type": [
              "string",
              "null"
            ],
            "description": "Accommodation property of the seat. Netex enumeration.",
            "enum": [
              "UNKNOWN",
              "SEATING",
              "FOLDING_SEAT",
              "SLEEPER",
              "SINGLE_SLEEPER",
              "DOUBLE_SLEEPER",
              "SPECIAL_SLEEPER",
              "COUCHETTE",
              "SINGLE_COUCHETTE",
              "DOUBLE_COUCHETTE",
              "SPECIAL_SEATING",
              "RECLINING_SEATS",
              "BABY_COMPARTMENT",
              "FAMILY_CARRIAGE",
              "RECREATION_AREA",
              "PANORAMA_COACH",
              "PULLMAN_COACH",
              "PUSHCHAIR",
              "WHEELCHAIR",
              "STANDING"
            ],
            "examples": [
              "SINGLE_SLEEPER"
            ]
          },
          "seatAttachment": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attachment of the seat. Netex enumeration.",
            "enum": [
              "REVERSIBLE",
              "FIXED",
              "FOLDING",
              "REMOVABLE",
              "OTHER"
            ],
            "examples": [
              "REVERSIBLE"
            ]
          },
          "seatPosition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Position of the seat. Netex enumeration.",
            "enum": [
              "WINDOW",
              "AISLE",
              "MIDDLE",
              "UPPER_BERTH",
              "MIDDLE_BERTH",
              "LOWER_BERTH",
              "OTHER"
            ],
            "examples": [
              "MIDDLE_BERTH"
            ]
          },
          "relativeDirection": {
            "type": [
              "string",
              "null"
            ],
            "description": "Relative direction of the seat. Netex enumeration.",
            "enum": [
              "BOTH",
              "FORWARDS",
              "BACKWARDS"
            ],
            "examples": [
              "BACKWARDS"
            ]
          },
          "nuisanceFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible nuisance factors of the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible nuisance factors of the seat. Netex enumerations.",
              "enum": [
                "UNKNOWN",
                "SMOKING",
                "NO_SMOKING",
                "FAMILY_AREA",
                "CHILDFREE_AREA",
                "ANIMALS_ALLOWED",
                "NO_ANIMALS",
                "BREASTFEEDING_FRIENDLY",
                "MOBILE_PHONE_USE_ZONE",
                "MOBILE_PHONE_FREE_ZONE"
              ],
              "examples": [
                "FAMILY_AREA,SMOKING"
              ]
            },
            "examples": [
              "FAMILY_AREA,SMOKING"
            ]
          },
          "passengerCommsFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible communication facilities available for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible communication facilities available for passenger in the seat. Netex enumerations.",
              "enum": [
                "UNKNOWN",
                "FREE_WIFI",
                "PUBLIC_WIFI",
                "POWER_SUPPLY_SOCKETS",
                "TELEPHONE",
                "AUDIO_ENTERTAINMENT",
                "VIDEO_ENTERTAINMENT",
                "BUSINESS_SERVICES",
                "INTERNET",
                "POST_OFFICE",
                "POST_BOX"
              ],
              "examples": [
                "POWER_SUPPLY_SOCKETS,TELEPHONE"
              ]
            },
            "examples": [
              "POWER_SUPPLY_SOCKETS,TELEPHONE"
            ]
          },
          "sanitaryFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible sanitary facilities available for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible sanitary facilities available for passenger in the seat. Netex enumerations.",
              "enum": [
                "NONE",
                "TOILET",
                "WHEELCHAIR_ACCESS_TOILET",
                "SHOWER",
                "WASHING_AND_CHANGE_FACILITIES",
                "BABY_CHANGE",
                "WHEELCHAIR_BABY_CHANGE",
                "SHOE_SHINER",
                "OTHER"
              ],
              "examples": [
                "TOILET,SHOWER"
              ]
            },
            "examples": [
              "TOILET,SHOWER"
            ]
          },
          "mobilityFacilities": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible mobility facilities available for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible mobility facilities available for passenger in the seat. Netex enumerations.",
              "enum": [
                "UNKNOWN",
                "LOW_FLOOR",
                "STEP_FREE_ACCESS",
                "SUITABLE_FOR_PUSHCHAIRS",
                "SUITABLE_FOR_WHEELCHAIRS",
                "SUITABLE_FOR_HEAVILIY_DISABLED",
                "BOARDING_ASSISTANCE",
                "ONBOARD_ASSISTANCE",
                "UNACCOMPANIED_MINOR_ASSISTANCE",
                "TACTILE_PLATFORM_EDGES",
                "TACTILE_GUIDING_STRIPS"
              ],
              "examples": [
                "SUITABLE_FOR_WHEELCHAIRS,LOW_FLOOR"
              ]
            },
            "examples": [
              "SUITABLE_FOR_WHEELCHAIRS,LOW_FLOOR"
            ]
          },
          "baggageType": {
            "uniqueItems": true,
            "type": "array",
            "description": "Set of possible baggage types possible for passenger in the seat. Netex enumerations.",
            "items": {
              "type": "string",
              "description": "Set of possible baggage types possible for passenger in the seat. Netex enumerations.",
              "enum": [
                "HANDBAG",
                "HAND_LUGGAGE",
                "SMALL_SUITCASE",
                "SUITCASE",
                "TRUNK",
                "OVERSIZE_ITEM",
                "BICYCLE",
                "MOTORCYCLE",
                "SPORTING_EQUIPMENT",
                "SKIS",
                "MUSICAL_INSTRUMENT",
                "PUSH_CHAIR",
                "WHEELCHAIR",
                "MOTORIZED_WHEELCHAIR",
                "LARGE_MOTORIZED_WHEELCHAIR",
                "SMALL_ANIMAL",
                "ANIMAL",
                "GAME",
                "OTHER"
              ],
              "examples": [
                "HANDBAG,SUITCASE"
              ]
            },
            "examples": [
              "HANDBAG,SUITCASE"
            ]
          }
        },
        "description": "Properties of a seat. They describe both physical and logical properties of a seat.Physical properties are for example position of the seat.Logical properties describe properties that the operator use when selling the seat. For example fare class."
      },
      "TotalCapacityEntryResponseV1": {
        "required": [
          "numberOfSeats",
          "seatingPropertyKey",
          "totalCompartments"
        ],
        "type": "object",
        "properties": {
          "seatingPropertyKey": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "numberOfSeats": {
            "type": "integer",
            "format": "int32"
          },
          "totalCompartments": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "TotalMaterialCompositionCapacityResponseV1": {
        "required": [
          "fromStopPlaceId",
          "materialCompositionId",
          "totalCapacitiesBySeatingProperties",
          "untilStopPlaceId"
        ],
        "type": "object",
        "properties": {
          "materialCompositionId": {
            "type": "string"
          },
          "fromStopPlaceId": {
            "type": "string"
          },
          "untilStopPlaceId": {
            "type": "string"
          },
          "totalCapacitiesBySeatingProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TotalCapacityEntryResponseV1"
            }
          }
        }
      },
      "SeatsAvailabilitiesElementResponseV1": {
        "required": [
          "elementCarriageNumber",
          "elementNetexId",
          "elementParts",
          "series",
          "seriesVersion"
        ],
        "type": "object",
        "properties": {
          "elementNetexId": {
            "type": "string",
            "description": "Netex id of the element.",
            "examples": [
              "GOA:TrainElement:73-2-A"
            ]
          },
          "series": {
            "type": "string",
            "description": "Rolling stock series of the element.",
            "examples": [
              "GOA-BM73A-KOMFORT"
            ]
          },
          "seriesVersion": {
            "type": "integer",
            "description": "Rolling stock version of the element.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "elementCarriageNumber": {
            "type": "integer",
            "description": "Number of the element.",
            "format": "int32",
            "examples": [
              15
            ]
          },
          "seatmapKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "Nøkkel til seatmap som tilhører elementet.",
            "examples": [
              "BM73"
            ]
          },
          "elementParts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ElementPartResponseV1"
            }
          }
        },
        "description": "Information about one element in the material of this seat offer."
      },
      "SeatsReservationsReservationResponseV1": {
        "required": [
          "nsrCodeDestination",
          "nsrCodeOrigin",
          "reference",
          "sequenceNrDestination",
          "sequenceNrOrigin",
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the reservation.",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "CANCELLED",
              "DEPRECATED"
            ],
            "examples": [
              "DRAFT or CONFIRMED"
            ]
          },
          "sequenceNrOrigin": {
            "type": "integer",
            "description": "Index of the origin station of the reservation.",
            "format": "int32",
            "examples": [
              0
            ]
          },
          "sequenceNrDestination": {
            "type": "integer",
            "description": "Index of the destination station of the reservation.",
            "format": "int32",
            "examples": [
              0
            ]
          },
          "nsrCodeOrigin": {
            "type": "string",
            "description": "Nsr code of the origin station of the reservation.",
            "examples": [
              "NSR:StopPlace:269"
            ]
          },
          "nsrCodeDestination": {
            "type": "string",
            "description": "Nsr code of the destination station of the reservation.",
            "examples": [
              "NSR:StopPlace:337"
            ]
          },
          "reference": {
            "type": "string",
            "description": "Reference of the reservation holding this seat.",
            "format": "uuid",
            "examples": [
              "c129cc9c-76e4-4f28-a4e2-5af96550627a"
            ]
          },
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional orderId connected to this reservation",
            "examples": [
              "ABCD1234"
            ]
          }
        },
        "description": "One reservation for the corresponding seat."
      },
      "SeatsReservationsResponseV1": {
        "required": [
          "elements",
          "seats",
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the seat offer.",
            "examples": [
              "ACTIVE"
            ]
          },
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatsAvailabilitiesElementResponseV1"
            }
          },
          "seats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatsReservationsSeatResponseV1"
            }
          }
        },
        "description": "Seat reservations for a seat offer. "
      },
      "SeatsReservationsSeatResponseV1": {
        "required": [
          "elementCarriageNumber",
          "properties",
          "reservations",
          "seatNumber",
          "series",
          "seriesVersion"
        ],
        "type": "object",
        "properties": {
          "seatNumber": {
            "type": "string",
            "description": "Seat number.",
            "examples": [
              "23"
            ]
          },
          "elementCarriageNumber": {
            "type": "integer",
            "description": "Number of the corresponding element.",
            "format": "int32",
            "examples": [
              3
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "series": {
            "type": "string",
            "description": "Rolling stock series of the corresponding element.",
            "examples": [
              "GOA-BM73A-KOMFORT"
            ]
          },
          "seriesVersion": {
            "type": "integer",
            "description": "Rolling stock version of the corresponding element.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "compartmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "A unique identifier of each compartment. If set then every seat with the same compartmentName belongs to the same physical compartment.",
            "examples": [
              "1"
            ]
          },
          "reservations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatsReservationsReservationResponseV1"
            }
          }
        },
        "description": "Information about one seat in the seat offer. Only seats with reservations are listed."
      },
      "CapacitiesOccupancyElementResponseV1": {
        "required": [
          "elementCarriageNumber",
          "elementParts",
          "seats",
          "series",
          "seriesVersion"
        ],
        "type": "object",
        "properties": {
          "elementCarriageNumber": {
            "type": "integer",
            "description": "Number of the corresponding element. The number used by passengers to find the correct carriage.",
            "format": "int32",
            "examples": [
              3
            ]
          },
          "series": {
            "type": "string",
            "description": "Rolling stock series of the corresponding element.",
            "examples": [
              "GOA-BM73A-KOMFORT"
            ]
          },
          "seriesVersion": {
            "type": "integer",
            "description": "Rolling stock version of the corresponding element.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "seats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatsOccupancySeatResponseV1"
            }
          },
          "elementParts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ElementPartResponseV1"
            }
          }
        },
        "description": "Element containing a set of seats, and their occupancy status."
      },
      "CapacitiesOccupancySeatUsageResponseV1": {
        "required": [
          "alighting",
          "availability",
          "boarding",
          "closed",
          "nsrCode"
        ],
        "type": "object",
        "properties": {
          "nsrCode": {
            "type": "string",
            "description": "Id of the StopPlace from which the stretch originates.",
            "examples": [
              "NSR:StopPlace:337"
            ]
          },
          "availability": {
            "type": "string",
            "description": "Availability of the seat.",
            "enum": [
              "AVAILABLE",
              "OCCUPIED",
              "CLOSED",
              "LAST_STOP"
            ],
            "examples": [
              "OCCUPIED"
            ]
          },
          "closed": {
            "type": "boolean",
            "description": "Is the seat closed for this stopPlace. Always true if departure is inactive.",
            "examples": [
              true
            ]
          },
          "boarding": {
            "type": "boolean",
            "description": "Will the seat be occupied by a new passenger on this stopPlace?",
            "examples": [
              true
            ]
          },
          "alighting": {
            "type": "boolean",
            "description": "Will a passenger vacate this seat on this stopPlace?",
            "examples": [
              true
            ]
          }
        },
        "description": "List of seat usages between two neighboring stopPlaces."
      },
      "SeatsOccupancyResponseV1": {
        "required": [
          "elements"
        ],
        "type": "object",
        "properties": {
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CapacitiesOccupancyElementResponseV1"
            }
          }
        },
        "description": "Occupancy status for seats in seat offer separated by elements."
      },
      "SeatsOccupancySeatResponseV1": {
        "required": [
          "properties",
          "seatNumber",
          "seatUsages"
        ],
        "type": "object",
        "properties": {
          "seatNumber": {
            "type": "string",
            "description": "Seat number.",
            "examples": [
              "23"
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "compartmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "A unique identifier of each compartment. If set then every seat with the same compartmentName belongs to the same physical compartment.",
            "examples": [
              "1"
            ]
          },
          "seatUsages": {
            "type": "array",
            "description": "List of seat usages between two neighboring stopPlaces.",
            "items": {
              "$ref": "#/components/schemas/CapacitiesOccupancySeatUsageResponseV1"
            }
          }
        },
        "description": "Occupancy status for one seat."
      },
      "AvailableCompartmentResponse": {
        "required": [
          "compartmentName",
          "seats"
        ],
        "type": "object",
        "properties": {
          "compartmentName": {
            "type": "string",
            "description": "Unique name identifying compartment in an element.",
            "examples": [
              "COMPARTMENT_1"
            ]
          },
          "compartmentLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable label identifying compartment in an element.",
            "examples": [
              "Kupé 21, 25"
            ]
          },
          "seats": {
            "type": "array",
            "description": "Seats in compartment.",
            "items": {
              "$ref": "#/components/schemas/AvailableSeatResponse"
            }
          }
        },
        "description": "Compartment (e.g. Sleeper, Couchette etc.) with available seats."
      },
      "AvailableElementWithCompartmentsResponse": {
        "required": [
          "availableCompartments",
          "availableSingleSeats",
          "carriageIdentifier"
        ],
        "type": "object",
        "properties": {
          "carriageIdentifier": {
            "type": "string",
            "description": "Carriage number of the element.",
            "examples": [
              "1"
            ]
          },
          "availableCompartments": {
            "type": "array",
            "description": "Available compartments in element.",
            "items": {
              "$ref": "#/components/schemas/AvailableCompartmentResponse"
            }
          },
          "availableSingleSeats": {
            "type": "array",
            "description": "Available single seats in element. These are seats that are not part of a compartment.",
            "items": {
              "$ref": "#/components/schemas/AvailableSeatResponse"
            }
          }
        },
        "description": "Element (e.g. train carriage) with available seats and/or compartments."
      },
      "AvailableSeatResponse": {
        "required": [
          "properties",
          "seatNumber"
        ],
        "type": "object",
        "properties": {
          "seatNumber": {
            "type": "string",
            "description": "Seat number of seat.",
            "examples": [
              "21"
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          }
        },
        "description": "Seat with seatNumber and properties."
      },
      "SeatsAvailabilitiesResponseV1": {
        "required": [
          "elements",
          "seats",
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the seat offer.",
            "examples": [
              "ACTIVE"
            ]
          },
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatsAvailabilitiesElementResponseV1"
            }
          },
          "seats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatsAvailabilitiesSeatResponseV1"
            }
          }
        },
        "description": "Seat availabilities for a seat offer. "
      },
      "SeatsAvailabilitiesSeatResponseV1": {
        "required": [
          "availability",
          "closed",
          "elementCarriageNumber",
          "properties",
          "seatNumber",
          "series",
          "seriesVersion"
        ],
        "type": "object",
        "properties": {
          "seatNumber": {
            "type": "string",
            "description": "Seat number.",
            "examples": [
              "23"
            ]
          },
          "elementCarriageNumber": {
            "type": "integer",
            "description": "Number of the corresponding element.",
            "format": "int32",
            "examples": [
              3
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "series": {
            "type": "string",
            "description": "Rolling stock series of the corresponding element.",
            "examples": [
              "GOA-BM73A-KOMFORT"
            ]
          },
          "seriesVersion": {
            "type": "integer",
            "description": "Rolling stock version of the corresponding element.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "availability": {
            "type": "string",
            "description": "Availability of the seat.",
            "enum": [
              "AVAILABLE",
              "OCCUPIED",
              "CLOSED",
              "LAST_STOP"
            ],
            "examples": [
              "OCCUPIED"
            ]
          },
          "closed": {
            "type": "boolean",
            "description": "Is the seat closed for this stopPlace. Always true if departure is inactive.",
            "examples": [
              true
            ]
          },
          "compartmentLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "For internal use only!! If set then every seat with the same label belongs to the same physical compartment.",
            "examples": [
              "1"
            ]
          },
          "compartmentName": {
            "type": [
              "string",
              "null"
            ],
            "description": "A unique identifier of each compartment. If set then every seat with the same compartmentName belongs to the same physical compartment.",
            "examples": [
              "1"
            ]
          }
        },
        "description": "Availability information for one seat in the seat offer."
      },
      "AvailableElementResponse": {
        "required": [
          "availableSeats",
          "carriageIdentifier"
        ],
        "type": "object",
        "properties": {
          "carriageIdentifier": {
            "type": "string",
            "description": "Carriage number of the element.",
            "examples": [
              "1"
            ]
          },
          "availableSeats": {
            "type": "array",
            "description": "Available seats in element.",
            "items": {
              "$ref": "#/components/schemas/AvailableSeatResponse"
            }
          }
        },
        "description": "Element (e.g. train carriage) with available."
      },
      "ServiceJourneyScheduleResponse": {
        "required": [
          "firstDepartureDate",
          "lastDepartureDate",
          "serviceJourneyId"
        ],
        "type": "object",
        "properties": {
          "serviceJourneyId": {
            "type": "string",
            "description": "The netex id of the `serviceJourney`",
            "examples": [
              "GOA:ServiceJourney:709_337-R"
            ]
          },
          "firstDepartureDate": {
            "type": "string",
            "description": "The first date and time of departure.",
            "format": "date",
            "examples": [
              "2023-02-13"
            ]
          },
          "lastDepartureDate": {
            "type": "string",
            "description": "The last date and time of departure.",
            "format": "date",
            "examples": [
              "2023-02-18"
            ]
          }
        }
      },
      "ElementDebugResponse": {
        "required": [
          "carriageIdentifier",
          "elementParts",
          "netexId",
          "seats",
          "series",
          "seriesVersion"
        ],
        "type": "object",
        "properties": {
          "series": {
            "type": "string",
            "description": "Rolling stock series of the corresponding element.",
            "examples": [
              "GOA-BM73A-KOMFORT"
            ]
          },
          "seriesVersion": {
            "type": "integer",
            "description": "Rolling stock version of the corresponding element.",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "carriageIdentifier": {
            "type": "string",
            "description": "Carriage identifier for the element in the train.",
            "examples": [
              "4"
            ]
          },
          "netexId": {
            "type": "string",
            "description": "Netex id of the element.",
            "examples": [
              "GOA:TrainElement:73-2-A"
            ]
          },
          "seatmapKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seatmap key of the basic element. This can be used as a lookup in the seatmap service.",
            "examples": [
              "SETRA-S431DT-LOWER"
            ]
          },
          "elementParts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ElementPartResponseV1"
            }
          },
          "seats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatDebugResponse"
            }
          }
        }
      },
      "SeatDebugResponse": {
        "required": [
          "column",
          "elementCarriageIdentifier",
          "properties",
          "row",
          "seatGroups",
          "seatNumber",
          "seatUsages"
        ],
        "type": "object",
        "properties": {
          "seatNumber": {
            "type": "string",
            "description": "The seat number of the seat.",
            "examples": [
              "101"
            ]
          },
          "elementCarriageIdentifier": {
            "type": "string",
            "description": "The carriage identifier of the carriage containing the seat.",
            "examples": [
              "4"
            ]
          },
          "row": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The row in the carriage containing the seat.",
            "format": "int32",
            "examples": [
              4
            ]
          },
          "column": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The column in the carriage containing the seat.",
            "format": "int32",
            "examples": [
              4
            ]
          },
          "properties": {
            "$ref": "#/components/schemas/SeatingPropertiesResponseV1"
          },
          "seatGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatGroupDebugResponse"
            }
          },
          "seatUsages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeatUsageDebugResponse"
            }
          }
        }
      },
      "SeatGroupDebugResponse": {
        "required": [
          "name",
          "seatGroupType"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the seat group.",
            "examples": [
              "COMPARTMENT-1"
            ]
          },
          "seatGroupType": {
            "type": "string",
            "description": "The type of the seat group.",
            "enum": [
              "OTHER",
              "TABLE_GROUP",
              "COMPARTMENT",
              "COMPANION"
            ],
            "examples": [
              "COMPARTMENT"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "The label of the seat group.",
            "examples": [
              "Kupe 1: 11-15"
            ]
          }
        }
      },
      "SeatUsageDebugResponse": {
        "required": [
          "createdAt",
          "elementClosureReferences",
          "fromSequenceNumber",
          "seatNumberClosureReferences",
          "toSequenceNumber"
        ],
        "type": "object",
        "properties": {
          "fromSequenceNumber": {
            "type": "integer",
            "description": "The sequence nr of the stop place that this seat usage is from.",
            "format": "int32",
            "examples": [
              0
            ]
          },
          "toSequenceNumber": {
            "type": "integer",
            "description": "The sequence nr of the stop place that this seat usage is to.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "reservationLineReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reference of the reservation line that has reserved this seat usage. Null if unreserved.",
            "format": "uuid",
            "examples": [
              "784160f6-4afe-4ff9-8d11-186d4cd9b8b8"
            ]
          },
          "elementClosureReferences": {
            "type": "array",
            "description": "The references of element closures affecting this seat usage.",
            "items": {
              "type": "string",
              "description": "The references of element closures affecting this seat usage.",
              "examples": [
                "[784160f6-4afe-4ff9-8d11-186d4cd9b8b8]"
              ]
            },
            "examples": [
              "[784160f6-4afe-4ff9-8d11-186d4cd9b8b8]"
            ]
          },
          "seatNumberClosureReferences": {
            "type": "array",
            "description": "The references of seat closures affecting this seat usage.",
            "items": {
              "type": "string",
              "description": "The references of seat closures affecting this seat usage.",
              "examples": [
                "[784160f6-4afe-4ff9-8d11-186d4cd9b8b8]"
              ]
            },
            "examples": [
              "[784160f6-4afe-4ff9-8d11-186d4cd9b8b8]"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When this seat usage was initially created.",
            "format": "date-time",
            "examples": [
              "2018-10-26T10:00:00Z"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When this seat usage was las updated. Null if never updated after creation.",
            "format": "date-time",
            "examples": [
              "2018-10-26T10:00:00Z"
            ]
          },
          "updatedBy": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The organisation id that last updated this seat usage.",
            "format": "int64",
            "examples": [
              1
            ]
          }
        }
      },
      "SeatingOfferDebugResponse": {
        "required": [
          "capactiyOnly",
          "createdAt",
          "createdBy",
          "datedServiceJourneyId",
          "datedServiceJourneyVersion",
          "departureDateTime",
          "elements",
          "inactive",
          "lineId",
          "manualMaterial",
          "organisationId",
          "seatingOfferStatus",
          "serviceJourneyId",
          "stopPlaces",
          "transportType",
          "updatedBy"
        ],
        "type": "object",
        "properties": {
          "datedServiceJourneyId": {
            "type": "string",
            "description": "The netex id of the `datedServiceJourney`",
            "examples": [
              "VYG:DatedServiceJourney:61_21-12-02"
            ]
          },
          "datedServiceJourneyVersion": {
            "type": "integer",
            "description": "The version of the `datedServiceJourney`",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "organisationId": {
            "type": "integer",
            "description": "The organisation id this seating offer is operated by.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "replacesNetexId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Netex id for the previous material used for this seating offer. If `null` the material on this dated service journey has never been changed.",
            "examples": [
              "GOA:Train:73"
            ]
          },
          "seatingOfferStatus": {
            "type": "string",
            "description": "Describes the seating offer status",
            "enum": [
              "ACTIVE",
              "CANCELLED",
              "TO_BE_REPLACED",
              "REPLACED_MATERIAL",
              "REPLACED_DSJ",
              "SEAT_USAGES_DELETED",
              "REMOVED",
              "DEPRECATED",
              "REPLACED"
            ],
            "examples": [
              "ACTIVE"
            ]
          },
          "serviceJourneyId": {
            "type": "string",
            "description": "The netex id of the `serviceJourney`",
            "examples": [
              "GOA:ServiceJourney:709_337-R"
            ]
          },
          "departureDateTime": {
            "type": "string",
            "description": "The time of departure from the first station.",
            "format": "date-time",
            "examples": [
              "2023-02-13T10:00:00Z"
            ]
          },
          "lineId": {
            "type": "string",
            "description": "The netex id of the `line`",
            "examples": [
              "GOA:Line:50"
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When this seating offer was initially created",
            "format": "date-time",
            "examples": [
              "2018-10-26T10:00:00Z"
            ]
          },
          "createdBy": {
            "type": "integer",
            "description": "The organisation id this seating offer was created by.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The last time this seating offer was updated. If `null` the seating offer has not been updated",
            "format": "date-time",
            "examples": [
              "2018-10-26T10:23:38Z"
            ]
          },
          "updatedBy": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The organisation id that last updated this seating offer.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "inactive": {
            "type": "boolean",
            "description": "Whether this seating offer is closed for sale or not",
            "examples": [
              false
            ]
          },
          "manualMaterial": {
            "type": "boolean",
            "description": "Whether the material for this seating offer was set manually.",
            "examples": [
              false
            ]
          },
          "capactiyOnly": {
            "type": "boolean",
            "description": "Whether the seating offer has real RollingStock material or is meant for capacity only.",
            "examples": [
              false
            ]
          },
          "transportType": {
            "type": "string",
            "description": "The type of transport this seating offer is for.",
            "enum": [
              "BUS",
              "REPLACEMENT_BUS",
              "TRAIN",
              "FERRY",
              "OTHER"
            ],
            "examples": [
              "TRAIN"
            ]
          },
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ElementDebugResponse"
            }
          },
          "stopPlaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StopPlaceWithTimesResponseV1"
            }
          }
        }
      },
      "ReservationResponseV1": {
        "required": [
          "createdAt",
          "createdBy",
          "datedServiceJourneyId",
          "destinationNsrCode",
          "organisationId",
          "originNsrCode",
          "reference",
          "reservationLines",
          "status",
          "updatedAt",
          "version",
          "versionedAt",
          "versionedAtDatedServiceJourneyVersion"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The 'id' of the order the reservation belongs to",
            "examples": [
              "A1B2C3D4"
            ]
          },
          "reference": {
            "type": "string",
            "description": "The reference for this reservation",
            "format": "uuid",
            "examples": [
              "c129cc9c-76e4-4f28-a4e2-5af96550627a"
            ]
          },
          "version": {
            "type": "integer",
            "description": "The `version` of the reservation. Starts with `1`.",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "datedServiceJourneyId": {
            "type": "string",
            "description": "Id of the dated service journey"
          },
          "versionedAtDatedServiceJourneyVersion": {
            "type": "integer",
            "description": "The `version` of the datedServiceJouney at the time the reservation was versioned",
            "format": "int32"
          },
          "originNsrCode": {
            "type": "string",
            "description": "Origin `NSR code` of the `reservation`"
          },
          "destinationNsrCode": {
            "type": "string",
            "description": "Destination `NSR code` of the `reservation`"
          },
          "organisationId": {
            "type": "integer",
            "description": "The organisation id of the order which the `reservation` belongs to.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "status": {
            "type": "string",
            "description": "Describes the `reservation` status.",
            "enum": [
              "DRAFT",
              "CONFIRMED",
              "CANCELLED",
              "DEPRECATED"
            ],
            "examples": [
              "DRAFT"
            ]
          },
          "rebookingStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "Describes the `rebooking` status of the reservation.",
            "enum": [
              "ACCEPTED",
              "MANUAL",
              "SUGGESTED",
              "REBOOKED_DRAFT",
              "REJECTED"
            ],
            "examples": [
              "ACCEPTED"
            ]
          },
          "notificationRule": {
            "type": [
              "string",
              "null"
            ],
            "description": "Rule for what type of notification is sent to reservation owner on departure closures",
            "enum": [
              "CANCELLED_WITHOUT_REPLACEMENT",
              "CANCELLED_WITH_REPLACEMENT",
              "REPLACED_TO_OTHER_SERVICE"
            ],
            "examples": [
              "CANCELLED_WITHOUT_REPLACEMENT"
            ]
          },
          "info": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional free text information about the reservation.",
            "examples": [
              "Unable to rebook this reservation due to no available seats."
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "When this reservation was initially created",
            "format": "date-time",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "createdBy": {
            "type": "integer",
            "description": "The organisation id this version of the `reservation` was created by.This id is determined by the authentication used by the client.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "versionedAt": {
            "type": "string",
            "description": "When this version of this reservation was created",
            "format": "date-time",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "updatedAt": {
            "type": "string",
            "description": "When this was previously updated. This includes status changes, reservation line changes and so on.",
            "format": "date-time",
            "examples": [
              "2011-12-03T10:15:30+01:00"
            ]
          },
          "updatedBy": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The organisation id of the organisation that last updated this `reservation`.This id is determined by the authentication used by the client.",
            "format": "int64",
            "examples": [
              20
            ]
          },
          "reservationLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReservationLineResponseV1"
            }
          }
        }
      },
      "TravelIntentionResponseV1": {
        "required": [
          "travelIntentionReference",
          "versions"
        ],
        "type": "object",
        "properties": {
          "travelIntentionReference": {
            "type": "string",
            "format": "uuid"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TravelIntentionVersionResponseV1"
            }
          }
        }
      },
      "TravelIntentionVersionResponseV1": {
        "required": [
          "destinationNsrCode",
          "originNsrCode",
          "originalDatedServiceJourneyId",
          "reservations",
          "snoozed",
          "status",
          "travelIntentionVersion",
          "versionedAt"
        ],
        "type": "object",
        "properties": {
          "travelIntentionVersion": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "NO_JOURNEY",
              "REJECTED",
              "NO_SEATS"
            ]
          },
          "snoozed": {
            "type": "boolean"
          },
          "originalDatedServiceJourneyId": {
            "type": "string"
          },
          "originNsrCode": {
            "type": "string"
          },
          "destinationNsrCode": {
            "type": "string"
          },
          "versionedAt": {
            "type": "string",
            "format": "date-time"
          },
          "info": {
            "type": [
              "string",
              "null"
            ]
          },
          "reservations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReservationResponseV1"
            }
          }
        }
      },
      "RebookingOverviewResponse": {
        "required": [
          "amountOfAcceptedRebookings",
          "amountOfManualRebookings",
          "amountOfSuggestedRebookings",
          "datedServiceJourneyId"
        ],
        "type": "object",
        "properties": {
          "datedServiceJourneyId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the dated service journey"
          },
          "amountOfSuggestedRebookings": {
            "type": "integer",
            "description": "Number of rebookings suggested",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "amountOfManualRebookings": {
            "type": "integer",
            "description": "Number of rebookings ready for manual handling",
            "format": "int32",
            "examples": [
              2
            ]
          },
          "amountOfAcceptedRebookings": {
            "type": "integer",
            "description": "Number of rebookings accepted",
            "format": "int32",
            "examples": [
              0
            ]
          }
        }
      },
      "RebookingHistoryOverviewResponse": {
        "required": [
          "amountOfConfirmed",
          "amountOfRejected",
          "datedServiceJourneyId"
        ],
        "type": "object",
        "properties": {
          "datedServiceJourneyId": {
            "minLength": 1,
            "type": "string",
            "description": "Id of the dated service journey"
          },
          "amountOfRejected": {
            "type": "integer",
            "description": "Number of rejected rebooked reservations",
            "format": "int32",
            "examples": [
              1
            ]
          },
          "amountOfConfirmed": {
            "type": "integer",
            "description": "Number of confirmed rebooked reservations",
            "format": "int32",
            "examples": [
              2
            ]
          }
        }
      },
      "PreviewResponse": {
        "required": [
          "englishPreview",
          "norwegianPreview"
        ],
        "type": "object",
        "properties": {
          "norwegianPreview": {
            "type": "string"
          },
          "englishPreview": {
            "type": "string"
          }
        }
      }
    },
    "parameters": {
      "ET-Client-Name": {
        "name": "ET-Client-Name",
        "in": "header",
        "description": "Entur Client Header.\nIt is required that all consumers identify themselves by using this header.\nEntur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.\nThe structure of ET-Client-Name should be: `<company>-<application>`.",
        "required": false,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      },
      "X-Correlation-Id": {
        "name": "X-Correlation-Id",
        "in": "header",
        "description": "Correlation id",
        "required": false,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "bearer-key": {
        "type": "http",
        "scheme": "Bearer",
        "bearerFormat": "jwt"
      }
    }
  }
}