{
  "basePath": "/",
  "info": {
    "title": "API Documentation",
    "version": "1.0.0"
  },
  "host": "api.demandtrans-apis.com",
  "schemes": [
    "https"
  ],
  "swagger": "2.0",
  "tags": [],
  "paths": {
    "/geocoder/v1/reverse": {
      "get": {
        "summary": "Reverse geocoder that provides address for given location coordinates",
        "operationId": "getGeocoderV1Reverse",
        "parameters": [
          {
            "type": "string",
            "description": "Location, comma-separated pair of latitude and longitude",
            "name": "at",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "Radius in meters of area to search for address",
            "default": 1000,
            "minimum": 1,
            "name": "radius",
            "in": "query"
          }
        ],
        "tags": [
          "geocoder"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ReverseGeocoderAddressSchema"
            },
            "description": "Address information for given location"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "No matching address found"
          }
        }
      }
    },
    "/groups/v1/groups": {
      "get": {
        "summary": "List groups",
        "operationId": "getGroupsV1Groups",
        "parameters": [
          {
            "type": "integer",
            "default": 50,
            "minimum": 1,
            "maximum": 100,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "name": "skip",
            "in": "query"
          }
        ],
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Groups"
            },
            "description": "List of groups"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/orders/v1/miocarBookings": {
      "get": {
        "summary": "List orders",
        "operationId": "getOrdersV1Miocarbookings",
        "parameters": [
          {
            "type": "string",
            "description": "User id, or \"me\" for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "type": "string",
            "name": "externalUserId",
            "in": "query"
          },
          {
            "type": "string",
            "enum": [
              "upcoming",
              "past"
            ],
            "name": "status",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "integer",
            "name": "page",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model2"
            },
            "description": "List of miocar bookings"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/orders/v1/orders": {
      "get": {
        "summary": "List orders",
        "operationId": "getOrdersV1Orders",
        "parameters": [
          {
            "type": "string",
            "description": "Filter by user id, or \"me\" for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Return only active orders, no history",
            "default": false,
            "name": "onlyActive",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "When onlyActive=true, also return recent orders in another list",
            "default": false,
            "name": "includeRecent",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Return only order history, no active orders",
            "default": false,
            "name": "onlyEnded",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Include status = error errors",
            "default": false,
            "name": "includeErrors",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Maximum count of results to return, for pagination",
            "default": 50,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Count of results to skip, for pagination",
            "default": 0,
            "name": "skip",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "List of orders",
            "schema": {
              "$ref": "#/definitions/ListOrdersResponse"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      },
      "post": {
        "summary": "Create a new order, with orders and errors as a response",
        "operationId": "postOrdersV1Orders",
        "parameters": [
          {
            "type": "string",
            "description": "Id of user to create the order for, or \"me\" for current user",
            "default": "me",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/OrderCreationInput"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "The created order",
            "schema": {
              "$ref": "#/definitions/Order"
            }
          },
          "400": {
            "description": "Malformed request or order creation info invalid",
            "schema": {
              "$ref": "#/definitions/CreateOrderError"
            }
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/paymentAccounts/v1/accounts": {
      "get": {
        "summary": "List payment accounts",
        "operationId": "getPaymentaccountsV1Accounts",
        "parameters": [
          {
            "type": "string",
            "description": "Only accounts for this payment operator",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "paymentOperatorId",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by user id, or \"me\" for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Whether to list payment methods for every account",
            "default": false,
            "name": "listMethods",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Maximum count of results to return",
            "default": 50,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Count of results to skip",
            "default": 0,
            "name": "skip",
            "in": "query"
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PaymentAccountsSchema"
            },
            "description": "List of payment accounts and their properties"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not found"
          }
        }
      }
    },
    "/paymentOperators/v1/operators": {
      "get": {
        "summary": "List payment operators",
        "operationId": "getPaymentoperatorsV1Operators",
        "parameters": [
          {
            "type": "string",
            "name": "type",
            "in": "query"
          },
          {
            "type": "integer",
            "minimum": 1,
            "maximum": 75,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "name": "skip",
            "in": "query"
          },
          {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "name": "sortOrder",
            "in": "query"
          }
        ],
        "tags": [
          "paymentOperators"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PaymentOperatorArray"
            },
            "description": "Operators response"
          }
        }
      }
    },
    "/places/v2/nearby": {
      "get": {
        "summary": "Get nearby places",
        "operationId": "getPlacesV2Nearby",
        "parameters": [
          {
            "type": "string",
            "description": "Location, latitude and longitude pair. E.g. \"61.441,23.859\".",
            "name": "at",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "Radius in meters.",
            "default": 1000,
            "name": "radius",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Place types that can be returned",
            "name": "types",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Maximum number of returned places",
            "minimum": 0,
            "maximum": 100,
            "name": "limit",
            "in": "query"
          }
        ],
        "tags": [
          "places"
        ],
        "responses": {
          "200": {
            "description": "Nearby places response",
            "schema": {
              "$ref": "#/definitions/PlacesResponse"
            }
          }
        }
      }
    },
    "/places/v2/search": {
      "get": {
        "summary": "Search",
        "operationId": "getPlacesV2Search",
        "parameters": [
          {
            "type": "string",
            "description": "Search query string",
            "name": "text",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Location, latitude and longitude pair. E.g. \"61.441,23.859\".",
            "name": "at",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The bounding box in \"upper,left,lower,right\" format, eg. 19.2,59.3,32.5,71.1",
            "name": "bbox",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Only return shared place presets tagged with this category, e.g. \"pickup\". Without it, only presets with no categories are returned.",
            "name": "category",
            "in": "query"
          }
        ],
        "tags": [
          "places"
        ],
        "responses": {
          "200": {
            "description": "Search response",
            "schema": {
              "$ref": "#/definitions/SearchResponse"
            }
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          }
        }
      }
    },
    "/places/v2/shortcuts": {
      "get": {
        "summary": "Shortcuts",
        "operationId": "getPlacesV2Shortcuts",
        "parameters": [
          {
            "type": "string",
            "description": "Location, latitude and longitude pair. E.g. \"61.441,23.859\".",
            "name": "at",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Limit how many shortcuts to return.",
            "default": 3,
            "minimum": 0,
            "name": "limit",
            "in": "query"
          }
        ],
        "tags": [
          "places"
        ],
        "responses": {
          "200": {
            "description": "Shortcuts response",
            "schema": {
              "$ref": "#/definitions/PlacesResponse"
            }
          }
        }
      }
    },
    "/places/v2/stations": {
      "get": {
        "summary": "Lists stations that could be start/end locations for a ticket",
        "operationId": "getPlacesV2Stations",
        "parameters": [
          {
            "type": "string",
            "description": "Search query string",
            "name": "text",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Id of the service serving the stations",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "serviceId",
            "in": "query",
            "required": true
          }
        ],
        "tags": [
          "places"
        ],
        "responses": {
          "200": {
            "description": "Search response, with the id being service-specific for the required service",
            "schema": {
              "$ref": "#/definitions/SearchResponse"
            }
          }
        }
      }
    },
    "/places/v2/stops": {
      "get": {
        "summary": "Get nearby stops",
        "operationId": "getPlacesV2Stops",
        "parameters": [
          {
            "type": "string",
            "description": "Location, latitude and longitude pair. E.g. \"61.441,23.859\".",
            "name": "at",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "description": "Radius in meters.",
            "default": 1000,
            "name": "radius",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Limit how many stops to return.",
            "default": 100,
            "maximum": 250,
            "name": "count",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Limit how many departures to return.",
            "default": 100,
            "name": "departureCount",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Get departures starting at this moment (ISO 8601 datetime). Default: Now",
            "name": "departureStartTime",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Limit departures time range in seconds.",
            "default": 86400,
            "name": "departureTimeRange",
            "in": "query"
          }
        ],
        "tags": [
          "places"
        ],
        "responses": {
          "200": {
            "description": "Stops response",
            "schema": {
              "$ref": "#/definitions/StopsResponse"
            }
          }
        }
      }
    },
    "/services/v1/appUpdateRequired": {
      "get": {
        "summary": "Check whether the client app must be updated",
        "operationId": "getServicesV1Appupdaterequired",
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "schema": {
              "type": "boolean"
            },
            "description": "True when the client app is below the configured minimum version"
          }
        }
      }
    },
    "/services/v1/mobilityOptions": {
      "get": {
        "summary": "List allowed mobility options for current user",
        "operationId": "getServicesV1Mobilityoptions",
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/MobilityOptionArray"
            },
            "description": "Mobility options response"
          }
        }
      }
    },
    "/services/v1/organizations": {
      "get": {
        "summary": "List organizations",
        "operationId": "getServicesV1Organizations",
        "parameters": [
          {
            "type": "integer",
            "default": 50,
            "minimum": 1,
            "maximum": 100,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "name": "skip",
            "in": "query"
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/OrganizationArray"
            },
            "description": "Organizations response, sorted by name alphabetically"
          }
        }
      }
    },
    "/services/v1/services": {
      "get": {
        "summary": "List services",
        "operationId": "getServicesV1Services",
        "parameters": [
          {
            "type": "string",
            "description": "List only services nearby location",
            "name": "at",
            "in": "query"
          },
          {
            "type": "integer",
            "minimum": 1,
            "maximum": 75,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "name": "skip",
            "in": "query"
          },
          {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "name": "sortOrder",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "List products for each service",
            "default": false,
            "name": "includeProducts",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Include also station-to-station services with no static products",
            "default": false,
            "name": "includeStationToStation",
            "in": "query"
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ServiceArray"
            },
            "description": "Services response"
          }
        }
      }
    },
    "/auth/v2/.well-known/jwks.json": {
      "get": {
        "summary": "Get public key",
        "operationId": "getAuthV2WellknownJwksjson",
        "description": "get public key",
        "tags": [
          "auth"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/groups/v1/groups/search": {
      "get": {
        "summary": "Search for groups",
        "operationId": "getGroupsV1GroupsSearch",
        "parameters": [
          {
            "type": "string",
            "description": "Name or email to search by",
            "name": "key",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 50,
            "minimum": 1,
            "maximum": 100,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "name": "skip",
            "in": "query"
          }
        ],
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Groups"
            },
            "description": "Group information"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/groups/v1/groups/{groupId}": {
      "get": {
        "summary": "Get group by id",
        "operationId": "getGroupsV1GroupsGroupid",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "groupId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/GroupDetails"
            },
            "description": "Group information"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/orders/v1/miocarBookings/bookingActions": {
      "get": {
        "summary": "Get miocar upcoming booking actions",
        "operationId": "getOrdersV1MiocarbookingsBookingactions",
        "parameters": [
          {
            "type": "string",
            "description": "User id, or \"me\" for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "type": "string",
            "name": "externalUserId",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model2"
            },
            "description": "List of miocar bookings"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/orders/v1/orders/{id}": {
      "get": {
        "summary": "Get a single order",
        "operationId": "getOrdersV1OrdersId",
        "parameters": [
          {
            "type": "string",
            "description": "Id of wanted order",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Token to access shared by link order",
            "name": "shareToken",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "The requested order",
            "schema": {
              "$ref": "#/definitions/Order"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/paymentAccounts/v1/cinetpay/notify": {
      "get": {
        "summary": "Server check for CinetPay",
        "operationId": "getPaymentaccountsV1CinetpayNotify",
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "description": "All OK",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "summary": "Notification URL for CinetPay",
        "operationId": "postPaymentaccountsV1CinetpayNotify",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model130"
            }
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "description": "Operators response",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/paymentOperators/v1/operators/search": {
      "get": {
        "summary": "Search operators",
        "operationId": "getPaymentoperatorsV1OperatorsSearch",
        "parameters": [
          {
            "type": "string",
            "name": "type",
            "in": "query"
          },
          {
            "type": "string",
            "name": "key",
            "in": "query"
          },
          {
            "type": "integer",
            "minimum": 1,
            "maximum": 75,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "name": "skip",
            "in": "query"
          }
        ],
        "tags": [
          "paymentOperators"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PaymentOperatorArray"
            },
            "description": "Operators response"
          }
        }
      }
    },
    "/paymentOperators/v1/operators/{id}": {
      "get": {
        "summary": "Get operator",
        "operationId": "getPaymentoperatorsV1OperatorsId",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "paymentOperators"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PaymentOperator"
            },
            "description": "Operators response"
          }
        }
      }
    },
    "/places/v2/nearby/{placeId}": {
      "get": {
        "summary": "Get place details",
        "operationId": "getPlacesV2NearbyPlaceid",
        "parameters": [
          {
            "type": "string",
            "description": "Place id",
            "name": "placeId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "places"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/NearbyPlaceSchema"
            },
            "description": "Place response"
          }
        }
      }
    },
    "/places/v2/stops/{stopId}": {
      "get": {
        "summary": "Get stop details",
        "operationId": "getPlacesV2StopsStopid",
        "parameters": [
          {
            "type": "string",
            "description": "Stop id",
            "name": "stopId",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Limit how many departures to return.",
            "default": 100,
            "name": "departureCount",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Get departures starting at this moment (ISO 8601 datetime). Default: Now",
            "name": "departureStartTime",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Limit departures time range in seconds.",
            "default": 86400,
            "name": "departureTimeRange",
            "in": "query"
          }
        ],
        "tags": [
          "places"
        ],
        "responses": {
          "200": {
            "description": "Stop response",
            "schema": {
              "$ref": "#/definitions/Stop"
            }
          }
        }
      }
    },
    "/routestore/v1/routes/otp": {
      "get": {
        "summary": "Get all OTP routes from routestore",
        "operationId": "getRoutestoreV1RoutesOtp",
        "tags": [
          "routestore"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model28"
            },
            "description": "Routes response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/routestore/v1/routes/{id}": {
      "get": {
        "summary": "Get route from routestore",
        "operationId": "getRoutestoreV1RoutesId",
        "description": "Unless the logged user has superadmin permissions, only the routes for that user or token holder will be returned",
        "parameters": [
          {
            "type": "string",
            "description": "Route id in the routestore",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Token to access shared by link order",
            "name": "shareToken",
            "in": "query"
          }
        ],
        "tags": [
          "routestore"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/FetchedRouteSchema"
            },
            "description": "Routes response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/services/v1/organizations/{id}": {
      "get": {
        "summary": "Get organizations",
        "operationId": "getServicesV1OrganizationsId",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model20"
            },
            "description": "Organization response"
          }
        }
      }
    },
    "/services/v1/services/{id}": {
      "get": {
        "summary": "Get service",
        "operationId": "getServicesV1ServicesId",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "default": true,
            "name": "enabled",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "List products for each service",
            "default": false,
            "name": "includeProducts",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The station id for departure, if applicable for the service and if product listing is requested",
            "name": "fromStation",
            "in": "query"
          },
          {
            "type": "string",
            "description": "The station id for arrival, if applicable for the service and if product listing is requested",
            "name": "toStation",
            "in": "query"
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "description": "Services response",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          }
        }
      }
    },
    "/users/v2/users/search": {
      "get": {
        "summary": "Search users by string",
        "operationId": "getUsersV2UsersSearch",
        "parameters": [
          {
            "type": "string",
            "description": "Name or email to search by",
            "name": "key",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 50,
            "minimum": 1,
            "maximum": 100,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "name": "skip",
            "in": "query"
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "List of matching users",
            "schema": {
              "$ref": "#/definitions/ListUsersSchema"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{id}": {
      "get": {
        "summary": "Get user information",
        "operationId": "getUsersV2UsersId",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to search, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Audiences for id tokens, comma separated list. If not supplied, no id token is needed",
            "name": "tokenAudiences",
            "in": "query",
            "required": false
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/UserDetailsSchema"
            },
            "description": "User details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      },
      "put": {
        "summary": "Update basic user information",
        "operationId": "putUsersV2UsersId",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to be updated, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model169"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/UserBasicSchema"
            },
            "description": "User details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      },
      "delete": {
        "summary": "Delete user profile and all personal information by superAdmin",
        "operationId": "deleteUsersV2UsersId",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to delete",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model174"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/DeletedUserSchema"
            },
            "description": "Deleted user details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/bonusAccounts/v1/accounts/{userId}/list": {
      "get": {
        "summary": "List active user bonus accounts",
        "operationId": "getBonusaccountsV1AccountsUseridList",
        "parameters": [
          {
            "type": "string",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "bonusAccounts"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/feedback/v1/services/{serviceId}/feedback": {
      "get": {
        "summary": "Get feedback form data for service",
        "operationId": "getFeedbackV1ServicesServiceidFeedback",
        "parameters": [
          {
            "type": "string",
            "description": "Service identifier, UUIDv4",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "serviceId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "feedback"
        ],
        "responses": {
          "200": {
            "description": "Feedback form data",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "post": {
        "summary": "Send service feedback",
        "operationId": "postFeedbackV1ServicesServiceidFeedback",
        "parameters": [
          {
            "type": "string",
            "description": "Service identifier, UUIDv4",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "serviceId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/FeedbackData"
            }
          }
        ],
        "tags": [
          "feedback"
        ],
        "responses": {
          "200": {
            "description": "Feedback form data",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/groups/v1/groups/{groupId}/users": {
      "get": {
        "summary": "List users of group",
        "operationId": "getGroupsV1GroupsGroupidUsers",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "groupId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ListMembersResponse"
            },
            "description": "Group information"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      },
      "post": {
        "summary": "Add user to group",
        "operationId": "postGroupsV1GroupsGroupidUsers",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "groupId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "groupId",
            "in": "query",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/UserIdPayload"
            }
          }
        ],
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Membership"
            },
            "description": "Group information"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/logs": {
      "get": {
        "summary": "List order logs",
        "operationId": "getOrdersV1OrdersIdLogs",
        "parameters": [
          {
            "type": "string",
            "description": "Id of wanted order",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Successful",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/receipt": {
      "get": {
        "summary": "Get order receipt",
        "operationId": "getOrdersV1OrdersIdReceipt",
        "parameters": [
          {
            "type": "string",
            "description": "Order ID",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ReceiptObject"
            },
            "description": "The requested order's receipt"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/details": {
      "get": {
        "summary": "Get an order's details, e.g. products and external data etc.",
        "operationId": "getOrdersV1OrdersIdDetails",
        "parameters": [
          {
            "type": "string",
            "description": "Id of wanted order",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Token to access shared by link order details",
            "name": "shareToken",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Location, latitude and longitude pair, e.g. \"61.441,23.859\"",
            "name": "at",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Accuracy of location in meters",
            "name": "acc",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Timestamp of location information",
            "name": "attime",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "The requested order's details",
            "schema": {
              "$ref": "#/definitions/OrderDetails"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/paymentAccounts/v1/methods/registerStatus/{id}": {
      "get": {
        "summary": "Method registration status",
        "operationId": "getPaymentaccountsV1MethodsRegisterstatusId",
        "parameters": [
          {
            "type": "string",
            "description": "Base64-encoded registration status id as was provided in the pendingActions",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "description": "Current payment method status",
            "schema": {
              "$ref": "#/definitions/PaymentMethodStatusSchema"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request or method has been deleted"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/paymentAccounts/v1/users/{user}/methods": {
      "get": {
        "summary": "List payment methods available for given user",
        "operationId": "getPaymentaccountsV1UsersUserMethods",
        "parameters": [
          {
            "type": "string",
            "description": "Application ID",
            "name": "kyyti-app-appid",
            "in": "header"
          },
          {
            "type": "string",
            "description": "Application version",
            "name": "kyyti-app-version",
            "in": "header"
          },
          {
            "type": "string",
            "description": "Mobile phone device id as defined by the manufacturer",
            "name": "kyyti-app-deviceid",
            "in": "header"
          },
          {
            "type": "string",
            "description": "Mobile platform",
            "enum": [
              "android",
              "ios"
            ],
            "name": "kyyti-app-platform",
            "in": "header"
          },
          {
            "type": "string",
            "description": "Mobile phone model",
            "name": "kyyti-app-devicemodel",
            "in": "header"
          },
          {
            "type": "string",
            "description": "Mobile phone brand or manufacturer name",
            "name": "kyyti-app-devicemanufacturer",
            "in": "header"
          },
          {
            "type": "string",
            "description": "Id of user to get methods for, or me for request logged in user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "description": "Maximum count of results to return (for pagination)",
            "default": 50,
            "name": "limit",
            "in": "query"
          },
          {
            "type": "integer",
            "description": "Count of results to skip (for pagination)",
            "default": 0,
            "name": "skip",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Whether to list credits that can be used as payment methods",
            "default": false,
            "name": "listCreditMethods",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Optional service id to filter payment methods",
            "default": null,
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "service",
            "in": "query"
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PaymentMethodsSchema"
            },
            "description": "List of payment methods available for given user"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "No methods for user found"
          }
        }
      }
    },
    "/pushNotifications/v1/user/{userId}/devices": {
      "get": {
        "summary": "List user devices",
        "operationId": "getPushnotificationsV1UserUseridDevices",
        "parameters": [
          {
            "type": "string",
            "enum": [
              "me"
            ],
            "name": "userId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "pushNotifications"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/DevicesSchema"
            },
            "description": "Successful user registration"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          }
        }
      }
    },
    "/routestore/v1/routes/otp/favorites": {
      "get": {
        "summary": "Get user favorite OTP routes from routestore",
        "operationId": "getRoutestoreV1RoutesOtpFavorites",
        "parameters": [
          {
            "type": "string",
            "description": "User id or `me` for currently logged user",
            "default": "me",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          }
        ],
        "tags": [
          "routestore"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model53"
            },
            "description": "Routes response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      },
      "post": {
        "summary": "Update user favorite OTP routes from routestore",
        "operationId": "postRoutestoreV1RoutesOtpFavorites",
        "parameters": [
          {
            "type": "string",
            "description": "User id or `me` for currently logged user",
            "default": "me",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Update%20user%20favorite%20OTP%20routes"
            }
          }
        ],
        "tags": [
          "routestore"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/UpdateOtpRouteResponse"
            },
            "description": "Successful response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/routestore/v1/routes/otp/pattern": {
      "get": {
        "summary": "Get an OTP route pattern from routestore, including routeGtfsId for /routes/otp/etas requests",
        "operationId": "getRoutestoreV1RoutesOtpPattern",
        "parameters": [
          {
            "type": "string",
            "description": "OTP Pattern Code to fetch data for",
            "name": "code",
            "in": "query"
          }
        ],
        "tags": [
          "routestore"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model56"
            },
            "description": "Pattern response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/email/{email}": {
      "get": {
        "summary": "Get user by email",
        "operationId": "getUsersV2UsersEmailEmail",
        "parameters": [
          {
            "type": "string",
            "description": "Email address to search by",
            "x-format": {
              "email": true
            },
            "name": "email",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/UserShortSchema"
            },
            "description": "Matching user"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/terms/{userId}": {
      "get": {
        "summary": "Get service terms and conditions for the user",
        "operationId": "getUsersV2UsersTermsUserid",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for request user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "type": "boolean",
            "description": "Return full history of acted terms (true) or just currently accepted terms (false)",
            "default": false,
            "name": "history",
            "in": "query"
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/TermsSchema"
            },
            "description": "List of accepted terms"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{id}/miocarAccount": {
      "get": {
        "summary": "Get user miocar account",
        "operationId": "getUsersV2UsersIdMiocaraccount",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model57"
            },
            "description": "User details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{userId}/favouritePlaces": {
      "get": {
        "summary": "List the favourite places of a user",
        "operationId": "getUsersV2UsersUseridFavouriteplaces",
        "description": "List the favourite places of a user",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "List of favourite places",
            "schema": {
              "$ref": "#/definitions/ListFavouritePlacesSchema"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      },
      "post": {
        "summary": "Create a favourite place for a user",
        "operationId": "postUsersV2UsersUseridFavouriteplaces",
        "description": "Create a favourite place for a user. Use this endpoint to favourite a place.",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model161"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/FavouritePlaceSchema"
            },
            "description": "Created favourite place details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/users/v2/users/{id}/keycloak": {
      "get": {
        "summary": "Get user Keycloak info",
        "operationId": "getUsersV2UsersIdKeycloak",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to search, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/details/realtime": {
      "get": {
        "summary": "Poll an order's realtime details, e.g. location or eta",
        "operationId": "getOrdersV1OrdersIdDetailsRealtime",
        "parameters": [
          {
            "type": "string",
            "description": "Id of wanted order",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RealtimeDetails"
            },
            "description": "Realtime details, e.g. location and eta for an order"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/feedback/v1/send": {
      "post": {
        "summary": "Post feedback to Intercom",
        "operationId": "postFeedbackV1Send",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/FeedbackMessage"
            }
          }
        ],
        "tags": [
          "feedback"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/paymentAccounts/v1/intent": {
      "post": {
        "summary": "Create a payment intent & pass back client secret for Native Payments in Stripe",
        "operationId": "postPaymentaccountsV1Intent",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/PaymentIntentCreation"
            }
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model60"
            },
            "description": "PaymentIntent created with Stripe"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/paymentAccounts/v1/methods": {
      "post": {
        "summary": "Register a new payment method with default operator for type",
        "operationId": "postPaymentaccountsV1Methods",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/NewPaymentMethod"
            }
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/NewPaymentMethodSchema"
            },
            "description": "The created payment method with possibly a pending status and pendingActions"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request or operation rejected by bank"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          },
          "409": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Duplicate identity not allowed"
          }
        }
      }
    },
    "/pushNotifications/v1/register": {
      "post": {
        "summary": "Register device for push notifications",
        "operationId": "postPushnotificationsV1Register",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/DeviceRegistrationPayload"
            }
          }
        ],
        "tags": [
          "pushNotifications"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/DevicesSchema"
            },
            "description": "Successful user registration"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          }
        }
      }
    },
    "/routing/v1/routes": {
      "post": {
        "summary": "Get route suggestions",
        "operationId": "postRoutingV1Routes",
        "description": "Get route suggestions from start location to end destination using given parameters. Note that if the `Accept-Language` is provided, the info is returned in best matching localisation.",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/RoutesRequestSchema"
            }
          }
        ],
        "tags": [
          "routing"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RoutesSchema"
            },
            "description": "Routes response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/services/v1/events": {
      "post": {
        "summary": "Create an event for the service or it's orders",
        "operationId": "postServicesV1Events",
        "parameters": [
          {
            "type": "string",
            "name": "serviceKey",
            "in": "query",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/EventInput"
            }
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "description": "Successful action response",
            "schema": {
              "$ref": "#/definitions/NumberSchema"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, requires correct event service key"
          }
        }
      }
    },
    "/users/v2/send-route": {
      "post": {
        "summary": "Send route by email with login token",
        "operationId": "postUsersV2Sendroute",
        "description": "This endpoint causes an email to be sent to the specified address. When opened on mobile phone, the email contains the link to login into the application and open route search with given paramters.",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/SendRoutePayload"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "description": "Status Response (ok, rejected, error)",
            "schema": {
              "$ref": "#/definitions/StatusResponseSchema"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Request not fulfilled"
          }
        }
      }
    },
    "/users/v2/users": {
      "post": {
        "summary": "Register new user",
        "operationId": "postUsersV2Users",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/UsersPayload"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/UserSchema"
            },
            "description": "Successful user registration"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          },
          "409": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User already exists"
          }
        }
      }
    },
    "/verify/v1/email": {
      "post": {
        "summary": "Send verification e-mails",
        "operationId": "postVerifyV1Email",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model120"
            }
          }
        ],
        "tags": [
          "verify"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/verify/v1/phone": {
      "post": {
        "summary": "Send verification sms",
        "operationId": "postVerifyV1Phone",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model122"
            }
          }
        ],
        "tags": [
          "verify"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "put": {
        "summary": "Verify phone number with code sent via SMS",
        "operationId": "putVerifyV1Phone",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model168"
            }
          }
        ],
        "tags": [
          "verify"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/auth/v2/login/email": {
      "post": {
        "summary": "Request login email",
        "operationId": "postAuthV2LoginEmail",
        "description": "This endpoint causes welcome email to be sent to the specified address. When opened on mobile phone, the email contains the link to login into the application. The same email seeing ion desktop would reveal only the login PIN code.",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model123"
            }
          }
        ],
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/LoginResponseSchema"
            },
            "description": "response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not found"
          }
        }
      }
    },
    "/auth/v2/login/impersonate": {
      "post": {
        "summary": "Impersonate a user (super admin only)",
        "operationId": "postAuthV2LoginImpersonate",
        "description": "Creates an authenticated session for the specified user. Only users with isSuperAdmin=true can use this endpoint. Returns the same response format as the /login endpoint. This is useful for support/debugging scenarios.",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/ImpersonatePayload"
            }
          }
        ],
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ImpersonateResponseSchema"
            },
            "description": "Successful impersonation"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, requires super admin privileges"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/auth/v2/login/phone": {
      "post": {
        "summary": "Request login sms",
        "operationId": "postAuthV2LoginPhone",
        "description": "This endpoint causes welcome sms or call to be sent to the specified phone with login auth code.",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/EmailAuth"
            }
          }
        ],
        "tags": [
          "auth"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/LoginResponseSchema"
            },
            "description": "response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not found"
          }
        }
      }
    },
    "/bonusAccounts/v1/campaigns/add": {
      "post": {
        "summary": "Create campaign",
        "operationId": "postBonusaccountsV1CampaignsAdd",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/CampaignDataAdd"
            }
          }
        ],
        "tags": [
          "bonusAccounts"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/campaigns/v1/code/use": {
      "post": {
        "summary": "Use campaign codes and join groups",
        "operationId": "postCampaignsV1CodeUse",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/UseCampaignCode"
            }
          }
        ],
        "tags": [
          "campaigns"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/orders/v1/orders/batch": {
      "post": {
        "summary": "Create a batch of orders, with orders and errors lists as a response",
        "operationId": "postOrdersV1OrdersBatch",
        "parameters": [
          {
            "type": "string",
            "description": "Create for user id, or \"me\" for current user",
            "default": "me",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/OrderBatchCreationInput"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "The created orders and any errors from the batch",
            "schema": {
              "$ref": "#/definitions/OrdersCreateBatchResponse"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/orders/v1/orders/cancel": {
      "post": {
        "summary": "(superadmin) Cancel a batch of orders",
        "operationId": "postOrdersV1OrdersCancel",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/OrderIds"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model127"
            },
            "description": "Cancelled orders and errors"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/orders/v1/orders/refund": {
      "post": {
        "summary": "(superadmin) Refund a batch of orders",
        "operationId": "postOrdersV1OrdersRefund",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model129"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RefundBatchResponse"
            },
            "description": "Refunded orders"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/recover/v1/user/password": {
      "post": {
        "summary": "Send password recovery email",
        "operationId": "postRecoverV1UserPassword",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model131"
            }
          }
        ],
        "tags": [
          "recover"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/routestore/v1/routes/insert": {
      "post": {
        "summary": "Insert route to routestore for a user",
        "operationId": "postRoutestoreV1RoutesInsert",
        "description": "Update for a user different from currently logged one requires superadmin permissions",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/RoutesInsertRequestSchema"
            }
          }
        ],
        "tags": [
          "routestore"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/InsertedRouteSchema"
            },
            "description": "Routes response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/routing/v1/offer/release": {
      "post": {
        "summary": "Release product reservations",
        "operationId": "postRoutingV1OfferRelease",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/RouteOfferReservation"
            }
          }
        ],
        "tags": [
          "routing"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RouteOffer"
            },
            "description": "Refreshed route offer with non-reserved products"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request or offer info invalid"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          }
        }
      }
    },
    "/routing/v1/offer/reserve": {
      "post": {
        "summary": "Reserve products until purchase",
        "operationId": "postRoutingV1OfferReserve",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/RouteOfferReservation"
            }
          }
        ],
        "tags": [
          "routing"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RouteOffer"
            },
            "description": "Refreshed route offer with products reserved"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request or offer no longer valid, e.g. NoCapacityError"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          }
        }
      }
    },
    "/services/v1/events/batch": {
      "post": {
        "summary": "Create a batch of service events",
        "operationId": "postServicesV1EventsBatch",
        "parameters": [
          {
            "type": "string",
            "name": "serviceKey",
            "in": "query",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/BatchEventInput"
            }
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/BatchEventOutput"
            },
            "description": "The count of produced messages and any errors from the batch"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, requires correct event service key"
          }
        }
      }
    },
    "/bonusAccounts/v1/campaigns/{id}/update": {
      "post": {
        "summary": "Update campaign data",
        "operationId": "postBonusaccountsV1CampaignsIdUpdate",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/CampaignDataUpdates"
            }
          }
        ],
        "tags": [
          "bonusAccounts"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/orders/v1/miocarBookings/bookingActions/end": {
      "post": {
        "summary": "End miocar booking",
        "operationId": "postOrdersV1MiocarbookingsBookingactionsEnd",
        "parameters": [
          {
            "type": "string",
            "description": "User id, or \"me\" for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "type": "string",
            "name": "externalOrderId",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Booking ended",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/orders/v1/miocarBookings/bookingActions/lock": {
      "post": {
        "summary": "Lock miocar booking vehicle",
        "operationId": "postOrdersV1MiocarbookingsBookingactionsLock",
        "parameters": [
          {
            "type": "string",
            "description": "User id, or \"me\" for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "type": "string",
            "name": "externalOrderId",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Vehicle locked",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/orders/v1/miocarBookings/bookingActions/unlock": {
      "post": {
        "summary": "Unlock miocar booking vehicle",
        "operationId": "postOrdersV1MiocarbookingsBookingactionsUnlock",
        "parameters": [
          {
            "type": "string",
            "description": "User id, or \"me\" for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "user",
            "in": "query"
          },
          {
            "type": "string",
            "name": "externalOrderId",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Vehicle unlocked",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/orders/v1/orders/products/refund": {
      "post": {
        "summary": "(superadmin) Refund products from order",
        "operationId": "postOrdersV1OrdersProductsRefund",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/ProductRefundRequest"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ProductRefundResponse"
            },
            "description": "Refunded products"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/orders/v1/orders/{orderId}/activate": {
      "post": {
        "summary": "Activate all products in an order",
        "operationId": "postOrdersV1OrdersOrderidActivate",
        "description": "Only products in a 'pendingActivate' state will be activated.",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the order",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "orderId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Activation successful",
            "schema": {
              "$ref": "#/definitions/OrderDetails"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/share": {
      "post": {
        "summary": "Share trip (order) by token",
        "operationId": "postOrdersV1OrdersIdShare",
        "parameters": [
          {
            "type": "string",
            "description": "Id of order to share",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ShareOrderResponse"
            },
            "description": "Trip share information"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/refund": {
      "post": {
        "summary": "(superadmin) Refund an order",
        "operationId": "postOrdersV1OrdersIdRefund",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the order to refund",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RefundResponse"
            },
            "description": "Refund successful"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, requires superadmin permissions"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/cancel": {
      "post": {
        "summary": "Cancel order",
        "operationId": "postOrdersV1OrdersIdCancel",
        "parameters": [
          {
            "type": "string",
            "description": "Id of order to cancel",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "number",
            "description": "Indicates client acceptance of late cancellation charge amount",
            "default": 0,
            "name": "lateCancellation",
            "in": "query"
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/CancelOrderResponse"
            },
            "description": "The cancelled order"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/products/v1/products/get/batch": {
      "post": {
        "summary": "Get multiple products",
        "operationId": "postProductsV1ProductsGetBatch",
        "description": "Get a list of products by service and product id combo. Each input product id maps to one or multiple products with possibly different ids.",
        "parameters": [
          {
            "type": "string",
            "description": "Desired language of the response: fi (default), sv or en",
            "name": "lang",
            "in": "query"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/GetBatchProductPayload"
            }
          }
        ],
        "tags": [
          "products"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model142"
            },
            "description": "Success"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "No such service found"
          }
        }
      }
    },
    "/products/v1/services/{serviceId}/products": {
      "post": {
        "summary": "Service products",
        "operationId": "postProductsV1ServicesServiceidProducts",
        "description": "Products for a service. If service has dynamic pricing and no product id has been generated yet (e.g. depending on route), the data parameter must be defined.",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the service",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "serviceId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Desired language of the response: fi (default), sv or en",
            "name": "lang",
            "in": "query"
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/ProductListInput"
            }
          }
        ],
        "tags": [
          "products"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/ProductsResponse"
            },
            "description": "Success"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "No such service found"
          }
        }
      }
    },
    "/pushNotifications/v1/user/{userId}/send": {
      "post": {
        "summary": "(superadmin) Send push notification to user device",
        "operationId": "postPushnotificationsV1UserUseridSend",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the service",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/PushNotificationPayload"
            }
          }
        ],
        "tags": [
          "pushNotifications"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PushNotificationsSendSchema"
            },
            "description": "Push notifications send results"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          }
        }
      }
    },
    "/routestore/v1/routes/otp/etas": {
      "post": {
        "summary": "Get cached ETA data for OTP trips by GTFS route id from /routes/otp or /routes/otp/pattern.routeGtfsId. Returns trips in progress plus the next scheduled departure per direction when none is running.",
        "operationId": "postRoutestoreV1RoutesOtpEtas",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/OtpRouteEtaRequestSchema"
            }
          }
        ],
        "tags": [
          "routestore"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/OtpRouteEtaResponseSchema"
            },
            "description": "Route ETA response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/routing/v1/routes/{routingId}/events": {
      "post": {
        "summary": "Insert routing events",
        "operationId": "postRoutingV1RoutesRoutingidEvents",
        "description": "Insert events related to routes returned from routing service, for example to indicate selection of offer",
        "parameters": [
          {
            "type": "string",
            "description": "The routingId returned from routes request",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "routingId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/RouteEventSchema"
            }
          }
        ],
        "tags": [
          "routing"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RouteEventResponse"
            },
            "description": "Successful response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          }
        }
      }
    },
    "/routing/v1/service/area/list": {
      "post": {
        "summary": "List areas for services nearby",
        "operationId": "postRoutingV1ServiceAreaList",
        "description": "Searches for all active services with at least one of the operational areas not further than given radius away. Returns the list of all areas for matching services, even those areas that are far.",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/ServiceAreaListParams"
            }
          }
        ],
        "tags": [
          "routing"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/serviceAreaListResponse"
            },
            "description": "List service areas response"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/services/v1/products/offer/generate": {
      "post": {
        "summary": "Get offer for products",
        "operationId": "postServicesV1ProductsOfferGenerate",
        "description": "Get offer for products",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/GetBatchProductInput"
            }
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/GetBatchProductOutput"
            },
            "description": "Success"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "No such service found"
          }
        }
      }
    },
    "/services/v1/services/{id}/refreshExternalProducts": {
      "post": {
        "summary": "Refresh external 3rd party products of the service",
        "operationId": "postServicesV1ServicesIdRefreshexternalproducts",
        "parameters": [
          {
            "type": "string",
            "description": "Service identifier",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "services"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/users/v2/users/terms/accept": {
      "post": {
        "summary": "Accept terms and conditions",
        "operationId": "postUsersV2UsersTermsAccept",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model156"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/AcceptedTermsSchema"
            },
            "description": "List of accepted terms"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/terms/revoke": {
      "post": {
        "summary": "Revoke earlier acceptance of terms and conditions",
        "operationId": "postUsersV2UsersTermsRevoke",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model158"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/RevokedTermsSchema"
            },
            "description": "List of accepted terms"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request or no such terms"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{id}/token": {
      "post": {
        "summary": "Get a Keycloak OAuth2 token",
        "operationId": "postUsersV2UsersIdToken",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to search, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/users/v2/users/{userId}/password": {
      "post": {
        "summary": "Change user password",
        "operationId": "postUsersV2UsersUseridPassword",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to be updated, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/body"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/UserSchema"
            },
            "description": "Pass email"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{userId}/phoneNumbers": {
      "post": {
        "summary": "Add a new phone number for a user",
        "operationId": "postUsersV2UsersUseridPhonenumbers",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/payloadPhone"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PhoneBasicSchema"
            },
            "description": "Added phone details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          },
          "409": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Duplicate phone number"
          }
        }
      }
    },
    "/users/v2/users/{userId}/emails": {
      "post": {
        "summary": "Add a new email address for a user",
        "operationId": "postUsersV2UsersUseridEmails",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to be updated, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model159"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/AddEmailSchema"
            },
            "description": "Added email details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          },
          "409": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Email already in use"
          }
        }
      }
    },
    "/bonusAccounts/v1/campaigns/{id}/code/add": {
      "post": {
        "summary": "Add code for campaign",
        "operationId": "postBonusaccountsV1CampaignsIdCodeAdd",
        "parameters": [
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/CodeDataAdd"
            }
          }
        ],
        "tags": [
          "bonusAccounts"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/orders/v1/orders/{orderId}/products/cancel": {
      "post": {
        "summary": "(superadmin) Cancel a batch of products",
        "operationId": "postOrdersV1OrdersOrderidProductsCancel",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the order that contains the products",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "orderId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model163"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model165"
            },
            "description": "Cancelled products and errors"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/payment/confirm": {
      "post": {
        "summary": "Confirm payment of order after completing payment authentication. If authentication is not completed nor failed, this API will return the order with the pending actions.",
        "operationId": "postOrdersV1OrdersIdPaymentConfirm",
        "parameters": [
          {
            "type": "string",
            "description": "Id of wanted order",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/PaymentConfirmInput"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Confirmed order",
            "schema": {
              "$ref": "#/definitions/Order"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          }
        }
      }
    },
    "/orders/v1/orders/{id}/receipt/send": {
      "post": {
        "summary": "Send order receipt to customer email",
        "operationId": "postOrdersV1OrdersIdReceiptSend",
        "parameters": [
          {
            "type": "string",
            "description": "Order ID",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/ReceiptSendPayload"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/users/v2/users/{id}/login/miocarAccount": {
      "post": {
        "summary": "Get user miocar account login url",
        "operationId": "postUsersV2UsersIdLoginMiocaraccount",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Model166"
            },
            "description": "User details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{id}/token/refresh": {
      "post": {
        "summary": "Refresh a Keycloak OAuth2 token",
        "operationId": "postUsersV2UsersIdTokenRefresh",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model167"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "default": {
            "schema": {
              "type": "string"
            },
            "description": "Successful"
          }
        }
      }
    },
    "/orders/v1/orders/{orderId}/products/{productId}/message": {
      "post": {
        "summary": "Communication between user and external integration operations.",
        "operationId": "postOrdersV1OrdersOrderidProductsProductidMessage",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the order that contains the product",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "orderId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the product to activate",
            "name": "productId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/ProductMessageRequest"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "201": {
            "schema": {
              "$ref": "#/definitions/CommunicationWithOpsResponse"
            },
            "description": "Communication successful"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden"
          }
        }
      }
    },
    "/orders/v1/orders/{orderId}/products/{productId}/activate": {
      "post": {
        "summary": "Activate a bought product",
        "operationId": "postOrdersV1OrdersOrderidProductsProductidActivate",
        "description": "The product must be in a 'pendingActivate' state to be activated.",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the order that contains the product",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "orderId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the product to activate",
            "name": "productId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Activation successful",
            "schema": {
              "$ref": "#/definitions/OrderDetails"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden"
          }
        }
      }
    },
    "/orders/v1/orders/{orderId}/legs/{legId}/activate": {
      "post": {
        "summary": "Activate products bought from route",
        "operationId": "postOrdersV1OrdersOrderidLegsLegidActivate",
        "description": "The product must be in a 'pendingActivate' state to be activated.",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the order that contains the product",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "orderId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the leg to activate",
            "name": "legId",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "Activation successful",
            "schema": {
              "$ref": "#/definitions/OrderDetails"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden"
          }
        }
      }
    },
    "/groups/v1/groups/{groupId}/users/{userId}/info/set": {
      "post": {
        "summary": "Set required additional details for group",
        "operationId": "postGroupsV1GroupsGroupidUsersUseridInfoSet",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for request user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "groupId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/AdditionalDetailsPayload"
            }
          }
        ],
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/SetGroupInfoResponse"
            },
            "description": "groupId, userId, additionalDetails"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{id}/notificationPreference": {
      "put": {
        "summary": "Update user notification preference",
        "operationId": "putUsersV2UsersIdNotificationpreference",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to be updated, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model170"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/UserBasicSchema"
            },
            "description": "User details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{userId}/phoneNumbers/{id}": {
      "put": {
        "summary": "Update the properties of a phone number",
        "operationId": "putUsersV2UsersUseridPhonenumbersId",
        "description": "Only setting number as primary is supported",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the phone number",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model171"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PhoneSchema"
            },
            "description": "Updated phone details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      },
      "delete": {
        "summary": "Delete a phone number from a user",
        "operationId": "deleteUsersV2UsersUseridPhonenumbersId",
        "description": "Remove a phone number from a user account",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for request user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the phone number",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PhoneSchema"
            },
            "description": "Deleted phone details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/paymentAccounts/v1/accounts/{accountId}": {
      "delete": {
        "summary": "Delete payment account(s) and all methods",
        "operationId": "deletePaymentaccountsV1AccountsAccountid",
        "parameters": [
          {
            "type": "string",
            "description": "Account id to delete or `all`",
            "enum": [
              "all"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "accountId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "User whose payment accounts to delete, required if accountId is `all`",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "query",
            "required": true
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/PaymentAccountsDeletedSchema"
            },
            "description": "List of payment accounts"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "User not found"
          }
        }
      }
    },
    "/paymentAccounts/v1/methods/{id}": {
      "delete": {
        "summary": "Delete payment method",
        "operationId": "deletePaymentaccountsV1MethodsId",
        "parameters": [
          {
            "type": "string",
            "description": "Base64-encoded details of the payment method to be deleted",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "paymentAccounts"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/DeletedPaymentMethodSchema"
            },
            "description": "Responce for successfully deleted method"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request or method cannot be deleted"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/user/{id}": {
      "delete": {
        "summary": "Allow user to delete his profile",
        "operationId": "deleteUsersV2UserId",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user to delete",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Model172"
            }
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/DeletedUserSchema"
            },
            "description": "Deleted user details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/groups/v1/groups/{groupId}/users/{userId}": {
      "delete": {
        "summary": "Leave group (delete membership of user from group)",
        "operationId": "deleteGroupsV1GroupsGroupidUsersUserid",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for request user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "groupId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/Payload"
            }
          }
        ],
        "tags": [
          "groups"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/Membership"
            },
            "description": "groupId, userId and status"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{userId}/emails/{id}": {
      "delete": {
        "summary": "Delete an email from a user",
        "operationId": "deleteUsersV2UsersUseridEmailsId",
        "description": "Remove an email address from a user. Note that the primary email or last verified email of a user cannot be removed",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the email address",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/EmailSchema"
            },
            "description": "Deleted email details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request or an attempt to delete primary email"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/users/v2/users/{userId}/favouritePlaces/{id}": {
      "delete": {
        "summary": "Delete a favourite place from a user",
        "operationId": "deleteUsersV2UsersUseridFavouriteplacesId",
        "description": "Remove a favourite place from a user. Use this endpoint to unfavourite a place.",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the user, or 'me' for current user",
            "enum": [
              "me"
            ],
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "userId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the favourite place",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "tags": [
          "users"
        ],
        "responses": {
          "200": {
            "schema": {
              "$ref": "#/definitions/FavouritePlaceSchema"
            },
            "description": "Deleted favourite place details"
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden, actions for users other than the current user require superadmin permissions"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    },
    "/orders/v1/orders/{orderId}/products/{productId}": {
      "patch": {
        "summary": "Add additional details to a Kyyti product of the order",
        "operationId": "patchOrdersV1OrdersOrderidProductsProductid",
        "parameters": [
          {
            "type": "string",
            "description": "Id of the order that contains the product",
            "x-format": {
              "guid": {
                "version": "uuidv4"
              }
            },
            "name": "orderId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Id of the product to update",
            "name": "productId",
            "in": "path",
            "required": true
          },
          {
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/ProductPatchExtraInfo"
            }
          }
        ],
        "tags": [
          "orders"
        ],
        "responses": {
          "200": {
            "description": "The updated order",
            "schema": {
              "$ref": "#/definitions/OrderDetails"
            }
          },
          "400": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Malformed request"
          },
          "401": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Unauthorized, requires login"
          },
          "403": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Forbidden"
          },
          "404": {
            "schema": {
              "$ref": "#/definitions/Error"
            },
            "description": "Not Found"
          }
        }
      }
    }
  },
  "definitions": {
    "Location": {
      "type": "object",
      "description": "Location coordinates object",
      "example": {
        "lat": 60.17123,
        "lon": 24.94513
      },
      "properties": {
        "lat": {
          "type": "number",
          "description": "Latitude coordinate",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "description": "Longitude coordinate",
          "minimum": -180,
          "maximum": 180
        }
      },
      "required": [
        "lat",
        "lon"
      ]
    },
    "PlaceType": {
      "type": "string",
      "description": "Place type",
      "enum": [
        "address",
        "poi",
        "bikeRentalStation",
        "carRentalStation",
        "vehicle",
        "publicTransportStop",
        "kyytiPickupPoint",
        "unknown"
      ]
    },
    "ReverseGeocoderAddressSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name",
          "example": "Mikonkatu 15"
        },
        "city": {
          "type": "string",
          "description": "Place city",
          "example": "Helsinki"
        },
        "country": {
          "type": "string",
          "description": "Place country",
          "example": "FIN"
        },
        "location": {
          "$ref": "#/definitions/Location"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "title": {
          "type": "string",
          "description": "Place title, which is the same as name.",
          "example": "Mikonkatu 15"
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Consists of the postal code and city name.",
          "example": "00100 Helsinki"
        }
      },
      "required": [
        "name",
        "city",
        "country",
        "location",
        "type",
        "title",
        "subtitle"
      ]
    },
    "ExtraInfo": {
      "type": "object",
      "description": "Extra info or context that helps describing the issue"
    },
    "Cause": {
      "type": "object",
      "description": "Snapshot of the properties that are relevant to the issue. Shown only in development environment.",
      "example": {}
    },
    "Nested": {
      "type": "object",
      "description": "JSON object obtained from an internal sub-system. Shown only in development environment."
    },
    "Error": {
      "type": "object",
      "properties": {
        "status": {
          "type": "number",
          "description": "Batch action status code for this error",
          "example": 400
        },
        "statusCode": {
          "type": "number",
          "description": "Batch action status code for this error",
          "example": 400
        },
        "errorCode": {
          "type": "string",
          "description": "Error code",
          "example": "A02"
        },
        "code": {
          "type": "string",
          "description": "Error code",
          "example": "A02"
        },
        "errorName": {
          "type": "string",
          "description": "Error name",
          "example": "NotAuthenticatedError"
        },
        "name": {
          "type": "string",
          "description": "Error name",
          "example": "NotAuthenticatedError"
        },
        "extraInfo": {
          "$ref": "#/definitions/ExtraInfo"
        },
        "message": {
          "type": "string",
          "description": "Message indicating error reason",
          "example": "NotAuthenticatedError (A02): Missing cookie data"
        },
        "devMessage": {
          "type": "string",
          "description": "Developers oriented message indicating error reason. Shown only in development environment.",
          "example": "Missing cookie data"
        },
        "stack": {
          "type": "string",
          "description": "Stack segment with caught exception. Shown only in development environment.",
          "example": "NotAuthenticatedError: Missing cookie data\n    at Object..."
        },
        "cause": {
          "$ref": "#/definitions/Cause"
        },
        "nested": {
          "$ref": "#/definitions/Nested"
        }
      },
      "required": [
        "errorCode",
        "errorName",
        "extraInfo",
        "message"
      ]
    },
    "required": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "RequiredUserDetails": {
      "type": "object",
      "properties": {
        "required": {
          "$ref": "#/definitions/required"
        }
      }
    },
    "emailDomains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "allowedMethods": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "GroupDetails": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "name": {
          "type": "string"
        },
        "requiredUserDetails": {
          "$ref": "#/definitions/RequiredUserDetails"
        },
        "active": {
          "type": "boolean"
        },
        "visible": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "emailDomains": {
          "$ref": "#/definitions/emailDomains"
        },
        "allowedMethods": {
          "$ref": "#/definitions/allowedMethods"
        },
        "discountCampaignId": {
          "type": "string"
        }
      }
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/GroupDetails"
      }
    },
    "Groups": {
      "type": "object",
      "properties": {
        "groups": {
          "$ref": "#/definitions/groups"
        }
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "totalPageCount": {
          "type": "integer"
        },
        "pageSize": {
          "type": "integer"
        },
        "totalItems": {
          "type": "integer"
        },
        "page": {
          "type": "integer"
        }
      }
    },
    "status": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "type": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "payment": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "integer"
        },
        "currencyName": {
          "type": "string"
        },
        "currencySymbol": {
          "type": "string"
        },
        "distanceThreshold": {
          "type": "string"
        },
        "distanceDescription": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    },
    "journeyDetails": {
      "type": "object",
      "properties": {
        "pickUpDatetime": {
          "type": "string"
        },
        "dropOffDatetime": {
          "type": "string"
        },
        "distance": {
          "type": "string"
        },
        "distanceUnit": {
          "type": "string"
        },
        "duration": {
          "type": "string"
        },
        "fuelLevel": {
          "type": "string"
        },
        "fuelLevelUnit": {
          "type": "string"
        }
      }
    },
    "service": {
      "type": "object",
      "properties": {
        "externalServiceId": {
          "type": "integer"
        },
        "externalServiceName": {
          "type": "string"
        },
        "logoUrl": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/status"
        }
      }
    },
    "vehicleType": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "category": {
          "type": "string"
        }
      }
    },
    "scheme": {
      "type": "object"
    },
    "manufacturer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "scheme": {
          "$ref": "#/definitions/scheme"
        }
      }
    },
    "model": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "fullName": {
          "type": "string"
        },
        "vehicleType": {
          "$ref": "#/definitions/vehicleType"
        },
        "imageFilename": {
          "type": "string",
          "x-format": {
            "uri": true
          }
        },
        "manufacturer": {
          "$ref": "#/definitions/manufacturer"
        },
        "scheme": {
          "$ref": "#/definitions/scheme"
        }
      }
    },
    "address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "lineOne": {
          "type": "string"
        },
        "lineTwo": {
          "type": "string"
        },
        "lineThree": {
          "type": "string"
        },
        "lineFour": {
          "type": "string"
        },
        "locality": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "country": {
          "type": "string"
        }
      }
    },
    "images": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "station": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "longitude": {
          "type": "number"
        },
        "latitude": {
          "type": "number"
        },
        "contactNumber": {
          "type": "string"
        },
        "additionalInfo": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/status"
        },
        "address": {
          "$ref": "#/definitions/address"
        },
        "community": {
          "$ref": "#/definitions/scheme"
        },
        "timezone": {
          "type": "string"
        },
        "oneWayDropOff": {
          "type": "boolean"
        },
        "images": {
          "$ref": "#/definitions/images"
        },
        "taxesCount": {
          "type": "integer"
        },
        "surchargesCount": {
          "type": "integer"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "vehicleHardware": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "provider": {
          "type": "string"
        },
        "identifier": {
          "type": "string"
        },
        "hasRemoteLocking": {
          "type": "boolean"
        },
        "hasBluetoothLocking": {
          "type": "boolean"
        },
        "bleDeviceId": {
          "type": "string"
        },
        "vehicle": {
          "$ref": "#/definitions/scheme"
        },
        "community": {
          "$ref": "#/definitions/scheme"
        }
      }
    },
    "vitals": {
      "type": "object",
      "properties": {
        "fuelLevel": {
          "type": "integer"
        },
        "fuelLevelUnit": {
          "type": "string"
        },
        "odometer": {
          "type": "integer"
        },
        "distanceUnit": {
          "type": "string"
        },
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "vehicleInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "colour": {
          "type": "string"
        },
        "doors": {
          "type": "integer"
        },
        "fuelType": {
          "type": "string"
        },
        "transmission": {
          "type": "string"
        },
        "year": {
          "type": "integer"
        },
        "registrationPlate": {
          "type": "string"
        },
        "vehicleNumber": {
          "type": "string"
        },
        "fullName": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "imageFilename": {
          "type": "string"
        },
        "imageToDisplay": {
          "type": "string",
          "x-format": {
            "uri": true
          }
        },
        "model": {
          "$ref": "#/definitions/model"
        },
        "station": {
          "$ref": "#/definitions/station"
        },
        "vehicleHardware": {
          "$ref": "#/definitions/vehicleHardware"
        },
        "hasRemoteLocking": {
          "type": "boolean"
        },
        "lastServiceDate": {
          "type": "string"
        },
        "plannedInServiceDate": {
          "type": "string"
        },
        "plannedRetirementDate": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/status"
        },
        "vitals": {
          "$ref": "#/definitions/vitals"
        },
        "additionalInfo": {
          "type": "string"
        },
        "vehicleReferenceId": {
          "type": "string"
        },
        "tollPassNumber": {
          "type": "string"
        },
        "ownerName": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "stationPickUp": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "longitude": {
          "type": "number"
        },
        "latitude": {
          "type": "number"
        },
        "contactNumber": {
          "type": "string"
        },
        "additionalInfo": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/status"
        },
        "address": {
          "$ref": "#/definitions/address"
        },
        "timezone": {
          "type": "string"
        },
        "oneWayDropOff": {
          "type": "boolean"
        },
        "images": {
          "$ref": "#/definitions/images"
        },
        "taxesCount": {
          "type": "integer"
        },
        "surchargesCount": {
          "type": "integer"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "stationDropOff": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "longitude": {
          "type": "number"
        },
        "latitude": {
          "type": "number"
        },
        "contactNumber": {
          "type": "string"
        },
        "additionalInfo": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/status"
        },
        "address": {
          "$ref": "#/definitions/address"
        },
        "timezone": {
          "type": "string"
        },
        "oneWayDropOff": {
          "type": "boolean"
        },
        "images": {
          "$ref": "#/definitions/images"
        },
        "taxesCount": {
          "type": "integer"
        },
        "surchargesCount": {
          "type": "integer"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "Model1": {
      "type": "object",
      "properties": {
        "externalId": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/status"
        },
        "type": {
          "$ref": "#/definitions/type"
        },
        "createdBy": {
          "type": "string"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "duration": {
          "type": "string"
        },
        "isOneWay": {
          "type": "boolean"
        },
        "payment": {
          "$ref": "#/definitions/payment"
        },
        "journeyDetails": {
          "$ref": "#/definitions/journeyDetails"
        },
        "service": {
          "$ref": "#/definitions/service"
        },
        "vehicleInfo": {
          "$ref": "#/definitions/vehicleInfo"
        },
        "stationPickUp": {
          "$ref": "#/definitions/stationPickUp"
        },
        "stationDropOff": {
          "$ref": "#/definitions/stationDropOff"
        }
      }
    },
    "bookings": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Model1"
      }
    },
    "Model2": {
      "type": "object",
      "properties": {
        "meta": {
          "$ref": "#/definitions/meta"
        },
        "bookings": {
          "$ref": "#/definitions/bookings"
        }
      }
    },
    "Payment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Encrypted id of payment"
        },
        "skipped": {
          "type": "boolean"
        },
        "amount": {
          "type": "number",
          "description": "Gives the amount to be paid"
        },
        "status": {
          "type": "string",
          "description": "Gives whether payment is accepted or not"
        },
        "captured": {
          "type": "boolean"
        },
        "currency": {
          "type": "string",
          "description": "Gives currency to be paid in",
          "example": "eur"
        },
        "paymentEventId": {
          "type": "string",
          "description": "Identifier of payment",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "timestamp": {
          "type": "string",
          "description": "Gives time in ISO format when the payment is made"
        },
        "paymentOperatorType": {
          "type": "string",
          "description": "Payment operator type used",
          "example": "STRIPE"
        },
        "paymentMethodType": {
          "type": "string",
          "description": "Type of payment method",
          "example": "CREDIT_CARD"
        }
      }
    },
    "Client": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "example": "kyyti-app-asdf:fdsa"
        },
        "appId": {
          "type": "string",
          "example": "asdf"
        },
        "type": {
          "type": "string",
          "example": "kyyti-app"
        },
        "platform": {
          "type": "string",
          "example": "ios"
        },
        "rawPlatform": {
          "type": "string",
          "example": "iphone"
        },
        "version": {
          "type": "string",
          "example": "1.0.0"
        },
        "deviceId": {
          "type": "string",
          "example": "fdsa"
        },
        "deviceModel": {
          "type": "string",
          "example": "model"
        },
        "deviceManufacturer": {
          "type": "string",
          "example": "manu"
        },
        "organizationId": {
          "type": "string",
          "description": "Identifier of the tenant organization",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "name": {
          "type": "string",
          "example": "manu model (asdf)"
        },
        "acceptLanguage": {
          "type": "string",
          "example": "en-US"
        }
      }
    },
    "Organization": {
      "type": "object",
      "description": "Organizational details of service provider",
      "properties": {
        "id": {
          "type": "string",
          "description": "Organization unique identifier"
        },
        "name": {
          "type": "string",
          "description": "Organization name"
        },
        "displayName": {
          "type": "string",
          "description": "Organization human readable name for display"
        },
        "vatId": {
          "type": "string",
          "description": "Organization Vat ID"
        },
        "businessId": {
          "type": "string",
          "description": "Organization Business ID"
        }
      }
    },
    "Supplier": {
      "type": "object",
      "description": "Supplier details",
      "properties": {
        "name": {
          "type": "string",
          "description": "Supplier name"
        },
        "email": {
          "type": "string",
          "description": "Supplier contact email address",
          "x-format": {
            "email": true
          }
        },
        "url": {
          "type": "string",
          "description": "URL to the supplier homepage",
          "x-format": {
            "uri": true
          }
        },
        "vatId": {
          "type": "string",
          "description": "Supplier VAT ID"
        },
        "address": {
          "type": "string",
          "description": "Contact address of the supplier"
        }
      },
      "required": [
        "name"
      ]
    },
    "productType": {
      "type": "string",
      "description": "The product type of this service shop for determining client action when selected",
      "enum": [
        "ONDEMAND",
        "KYYTI",
        "TICKET"
      ]
    },
    "OrderServiceApiOperator": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "DEPRECATED, use service.productType"
        },
        "iconRef": {
          "type": "string",
          "description": "DEPRECATED, use service.apiOperatorIconRef"
        }
      },
      "required": [
        "type"
      ]
    },
    "OrderServiceApi": {
      "type": "object",
      "description": "Deprecated service api information",
      "properties": {
        "operator": {
          "$ref": "#/definitions/OrderServiceApiOperator"
        }
      },
      "required": [
        "operator"
      ]
    },
    "OrderService": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Service code"
        },
        "provider": {
          "$ref": "#/definitions/Organization"
        },
        "description": {
          "type": "string",
          "description": "Description of the service, displayed with name"
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of an icon",
          "example": "föli"
        },
        "supplier": {
          "$ref": "#/definitions/Supplier"
        },
        "locale": {
          "type": "string",
          "description": "Service locale string (BCP 47)",
          "example": "fi"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "productType": {
          "$ref": "#/definitions/productType"
        },
        "api": {
          "$ref": "#/definitions/OrderServiceApi"
        }
      },
      "required": [
        "supplier",
        "id",
        "name",
        "productType",
        "api"
      ]
    },
    "PaymentOperator": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "contactInfo": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "visible": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    },
    "PaymentMethodType": {
      "type": "string",
      "description": "Payment method type",
      "enum": [
        "CREDIT_CARD",
        "EXTERNAL_BONUS",
        "TUUP_FREE",
        "STRIPE_APPLE_PAY"
      ]
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 Currency code",
      "enum": [
        "EUR",
        "USD",
        "CHF",
        "JPY",
        "CFA"
      ]
    },
    "PaymentMethodForOrders": {
      "type": "object",
      "description": "A payment method that can be used for paying orders",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/PaymentMethodType"
        },
        "expiresAt": {
          "type": "string",
          "description": "Expiry time of the card as ISO string, not available for all methods",
          "example": "2018-08-30T00:00:00.000Z"
        },
        "default": {
          "type": "boolean"
        },
        "amount": {
          "type": "number",
          "description": "Amount of currency on payment method, e.g. amount of bonus left in a bonus account",
          "minimum": 0
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "deletable": {
          "type": "boolean"
        },
        "operatorName": {
          "type": "string",
          "description": "Payment operator name"
        },
        "accountId": {
          "type": "string",
          "description": "Account id, same as `id` above",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      }
    },
    "PaymentAccountDefault": {
      "type": "object",
      "description": "Details of payment account",
      "properties": {
        "userId": {
          "type": "string",
          "description": "Tuup user id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "methodId": {
          "type": "string",
          "description": "Payment method id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "accountId": {
          "type": "string",
          "description": "Account id, same as `id` above",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "createdAt": {
          "type": "string",
          "description": "Timestamp when the order is created (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Timestamp when the order data was modified (ISO 8601 datetime)"
        }
      }
    },
    "PaymentAccountSnapshot": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of account",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "name": {
          "type": "string",
          "description": "Friendly display name set by the user",
          "maxLength": 50
        },
        "loginIdentity": {
          "type": "string",
          "description": "Login identity for external operator, e.g. email",
          "maxLength": 100
        },
        "userId": {
          "type": "string",
          "description": "Tuup user id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "operatorId": {
          "type": "string",
          "description": "Payment operator id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "paymentMethod": {
          "$ref": "#/definitions/PaymentMethodForOrders"
        },
        "default": {
          "$ref": "#/definitions/PaymentAccountDefault"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the order is enabled"
        },
        "virtual": {
          "type": "boolean",
          "description": "Whether the order is virtual"
        },
        "paymentOperatorId": {
          "type": "string",
          "description": "Only accounts for this payment operator",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      }
    },
    "Model3": {
      "type": "string",
      "description": "The order status in tuup systems",
      "enum": [
        "received",
        "reserved",
        "paid",
        "pendingDelivery",
        "delivery",
        "completed",
        "cancelled",
        "ongoing"
      ]
    },
    "PriceWithVatRate": {
      "type": "object",
      "description": "Price breakdown with vat rate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        }
      }
    },
    "Simple charge/price": {
      "type": "object",
      "description": "Price per passenger",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted amount to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total amount as number"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        }
      }
    },
    "PassengerType": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific passenger type"
        },
        "name": {
          "type": "string",
          "description": "Display name of the passenger type",
          "example": "Adult"
        },
        "terms": {
          "type": "string",
          "description": "Conditions for the passenger to qualify for this passenger type",
          "example": "Children aged 11 years or less"
        },
        "quantity": {
          "type": "integer",
          "description": "Number of currently included passengers of this type"
        },
        "available": {
          "type": "integer",
          "description": "Number of available tickets for this passenger type"
        },
        "price": {
          "$ref": "#/definitions/Simple%20charge%2Fprice"
        }
      },
      "required": [
        "id",
        "name",
        "quantity"
      ]
    },
    "PassengerTypes": {
      "type": "array",
      "description": "Passenger types the product qualifies for",
      "items": {
        "$ref": "#/definitions/PassengerType"
      }
    },
    "Time": {
      "type": "object",
      "description": "Departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model4": {
      "type": "object",
      "description": "Arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "PlaceLocation": {
      "type": "object",
      "description": "Location coordinates object",
      "properties": {
        "lat": {
          "type": "number",
          "description": "Latitude coordinate",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "description": "Longitude coordinate",
          "minimum": -180,
          "maximum": 180
        }
      },
      "required": [
        "lat",
        "lon"
      ]
    },
    "PlaceCategory": {
      "type": "string",
      "description": "Place category",
      "enum": [
        "publicTransportStopBus",
        "publicTransportStopTram",
        "publicTransportStopMetro",
        "publicTransportStopTrain",
        "publicTransportStopFerry",
        "publicTransportStopUnknown",
        "hslCityBikeDock",
        "cityCarClubPickupPoint",
        "ecorentPickupPoint",
        "24RentalPickupPoint",
        "kyytiPickupPoint"
      ]
    },
    "categories": {
      "type": "array",
      "description": "List of place categories",
      "items": {
        "$ref": "#/definitions/PlaceCategory"
      }
    },
    "PlaceBasicSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        }
      },
      "required": [
        "location"
      ]
    },
    "Model5": {
      "type": "object",
      "description": "On-demand products only, optional: the origin the rider asked for. fromPlace is where the ride actually starts, which can differ (zone pickup point, edge of the service area). Not returned by the external API or in shared views.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        }
      },
      "required": [
        "location"
      ]
    },
    "Model6": {
      "type": "object",
      "description": "On-demand products only, optional: the destination the rider asked for. toPlace is where the ride actually ends, which can differ. Not returned by the external API or in shared views.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        }
      },
      "required": [
        "location"
      ]
    },
    "Model7": {
      "type": "object",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "availability": {
      "type": "object",
      "properties": {
        "interval": {
          "type": "string",
          "description": "Availability time interval"
        },
        "timezone": {
          "type": "string",
          "description": "Full timezone name"
        },
        "noMethodRequired": {
          "type": "boolean",
          "description": "Product can be purchased without payment methods"
        }
      }
    },
    "DynamicPriceWithVatRate": {
      "type": "object",
      "description": "Price of the product",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Model8": {
      "type": "object",
      "description": "Total price if bought",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "DynamicPrice": {
      "type": "object",
      "description": "Original price before applying credit if a credit was available",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "PriceCapProductIdList": {
      "type": "array",
      "description": "List of Product Ids to which the price cap applies",
      "items": {
        "type": "string",
        "description": "Product Id to which the price cap applies"
      }
    },
    "PriceCap": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "description": "Maximum amount charged within price cap validity time"
        },
        "validForHours": {
          "type": "number",
          "description": "The duration from first purchase within which the price cap applies"
        },
        "allowedProducts": {
          "$ref": "#/definitions/PriceCapProductIdList"
        }
      },
      "required": [
        "amount",
        "validForHours"
      ]
    },
    "Model9": {
      "type": "string",
      "description": "Product type",
      "enum": [
        "ONDEMAND",
        "KYYTI",
        "TICKET"
      ]
    },
    "Model10": {
      "type": "object",
      "description": "Optional supplier of the product",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the supplier"
        },
        "number": {
          "type": "string",
          "description": "Phone number of the supplier, with country code"
        },
        "email": {
          "type": "string",
          "description": "Email address of the supplier"
        },
        "vatId": {
          "type": "string",
          "description": "Vat Id of the supplier"
        }
      }
    },
    "Model11": {
      "type": "object",
      "description": "Simple charge if e.g. VAT does not apply",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted amount to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total amount as number"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        }
      }
    },
    "CancellationPolicy": {
      "type": "object",
      "description": "Describes when the product can be cancelled by a user",
      "properties": {
        "cancellable": {
          "type": "boolean",
          "description": "Whether this product can be cancelled for free"
        },
        "description": {
          "type": "string",
          "description": "Human readable explanation of policy to show with offer. Should explain how the cancellation is determined."
        },
        "purchaseGracePeriodSeconds": {
          "type": "integer",
          "description": "How long the grace period for cancellation after purchase is in seconds if any."
        },
        "deliveryGracePeriodSeconds": {
          "type": "integer",
          "description": "How long the grace period for cancellation after delivery starts is in seconds if any."
        },
        "untilActivation": {
          "type": "boolean",
          "description": "Product is cancellable until activation when true. Should be ignored when undefined or false."
        },
        "until": {
          "type": "string",
          "description": "Estimate of when the product becomes non-cancellable for free. What this is dependent on should be defined in the description. When undefined the cancellation is not time based (e.g. activatable products)"
        },
        "lateCancellationCharge": {
          "$ref": "#/definitions/Model11"
        },
        "dynamicCharge": {
          "type": "boolean",
          "description": "Whether the late cancellation charge is dynamic. If true, lateCancellationCharge field holds the maximum charge."
        }
      }
    },
    "Model12": {
      "type": "object",
      "description": "Price breakdown with vat rate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Supplement": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific product"
        },
        "name": {
          "type": "string",
          "description": "Display name of the product"
        },
        "caption": {
          "type": "string",
          "description": "Short description of the product to be displayed with name."
        },
        "quantity": {
          "type": "integer"
        },
        "description": {
          "type": "string",
          "description": "Possibly lengthy description of product"
        },
        "price": {
          "$ref": "#/definitions/Model12"
        }
      }
    },
    "ProductSupplements": {
      "type": "array",
      "description": "Priced product supplements",
      "items": {
        "$ref": "#/definitions/Supplement"
      }
    },
    "ZoneIdList": {
      "type": "array",
      "description": "List of zones this product is valid for travelling",
      "items": {
        "type": "string",
        "description": "Zone identifier"
      }
    },
    "Validity": {
      "type": "object",
      "properties": {
        "zones": {
          "$ref": "#/definitions/ZoneIdList"
        },
        "seconds": {
          "type": "integer",
          "description": "The validity duration of the product in seconds. Present if the product is valid for a set period, and not e.g. for a specific journey or item"
        },
        "displaySeconds": {
          "type": "integer",
          "description": "For how long to display the ticket after its validity is over, in seconds. If not present, considered to be zero."
        },
        "userActivate": {
          "type": "boolean",
          "description": "If true, the product is activatable by the user after purchase, and won't be activated automatically"
        },
        "activateSeconds": {
          "type": "integer",
          "description": "The duration for which the product is activatable after purchase. Should the product not be activated within this period, it will be considered used"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be activated (time-based/activatable products) or used (e.g. single line products)"
        },
        "description": {
          "type": "string",
          "description": "Textual description of validity, present when validity is not strictly time based, e.g. Product is valid for a specific journey"
        }
      }
    },
    "ProductParams": {
      "type": "array",
      "description": "List of allowed product parameters",
      "example": [
        "validityStarts:24h"
      ],
      "items": {
        "type": "string"
      }
    },
    "verification": {
      "type": "object",
      "properties": {
        "visual": {
          "type": "string",
          "description": "Product name"
        }
      }
    },
    "integrationExtraInfo": {
      "type": "object",
      "description": "Integration specific data related to the service"
    },
    "integrationChildrenIds": {
      "type": "array",
      "description": "List of children ticket IDs in case of 10 Ride ticket types",
      "items": {
        "type": "string"
      }
    },
    "Model13": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Ticket ID"
        },
        "active": {
          "type": "boolean",
          "description": "True if ticket is LIVE, else False"
        }
      }
    },
    "integrationTicketData": {
      "type": "array",
      "description": "List of individual tickets with their statuses",
      "items": {
        "$ref": "#/definitions/Model13"
      }
    },
    "ExternalDetails": {
      "type": "object",
      "properties": {
        "integrationType": {
          "type": "string",
          "description": "Type of external integration"
        },
        "integrationExtraInfo": {
          "$ref": "#/definitions/integrationExtraInfo"
        },
        "integrationProductId": {
          "type": "string",
          "description": "To be used if the integration needs to pass an external product id to the app for custom, integration-specific handling"
        },
        "integrationChildrenIds": {
          "$ref": "#/definitions/integrationChildrenIds"
        },
        "integrationTicketData": {
          "$ref": "#/definitions/integrationTicketData"
        }
      },
      "required": [
        "integrationType"
      ]
    },
    "Model14": {
      "type": "string",
      "enum": [
        "firstName",
        "lastName",
        "phoneNumber",
        "email"
      ]
    },
    "requiredDetails": {
      "type": "array",
      "description": "List of required fields to proceed a product. All fields in a list must be filled in User Account. Field validation is performed on Frontend side using this list.",
      "items": {
        "$ref": "#/definitions/Model14"
      }
    },
    "DisplayInfo": {
      "type": "object",
      "properties": {
        "disclaimer": {
          "type": "string",
          "description": "Product specific disclaimer by the service. If present, the UI should guarantee that user sees it before purchase."
        }
      }
    },
    "ServiceCharge": {
      "type": "object",
      "description": "Product-specific service charge",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the service charge",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "name": {
          "type": "string",
          "description": "Key of the service charge"
        },
        "price": {
          "$ref": "#/definitions/PriceWithVatRate"
        }
      }
    },
    "CommunicationWithOpsMessage": {
      "type": "object",
      "properties": {
        "actor": {
          "type": "string",
          "description": "Actor of the communication. Eg. user || driver || external operations"
        },
        "sender": {
          "type": "string",
          "description": "Id of sender",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "message": {
          "type": "string",
          "description": "Actual message"
        },
        "timestamp": {
          "type": "string",
          "description": "When the message was sent (ISO 8601 datetime)"
        }
      }
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/CommunicationWithOpsMessage"
      }
    },
    "CommunicationWithOpsResponse": {
      "type": "object",
      "properties": {
        "messages": {
          "$ref": "#/definitions/messages"
        }
      }
    },
    "ProductDelivery": {
      "type": "object",
      "description": "Delivery-specific details of the product",
      "properties": {
        "transportId": {
          "type": "string",
          "description": "A transport vehicle (e.g. Train, Car, Bus) identifier, optional"
        },
        "directContactNumber": {
          "type": "string",
          "description": "A phone number to the vehicle, optional"
        },
        "placeReserved": {
          "type": "string",
          "description": "A Seat/Place/Cabin identifier, optional"
        },
        "additionalInfo": {
          "type": "string",
          "description": "Additional delivery information provided by the user"
        },
        "additionalInfoEditable": {
          "type": "boolean",
          "description": "Additional delivery information can be edited by client"
        },
        "displayUntil": {
          "type": "string"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be used"
        },
        "usedCount": {
          "type": "integer",
          "description": "How many times the product has been used"
        },
        "fromTime": {
          "type": "string",
          "description": "Gives time from which ticket is valid. Deprecated, use product.fromTime instead"
        },
        "toTime": {
          "type": "string",
          "description": "Gives time until which ticket is valid. Deprecated, use product.toTime instead"
        },
        "timezone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        },
        "activateFromTime": {
          "type": "string",
          "description": "Gives time from which ticket can be activated"
        },
        "activateToTime": {
          "type": "string",
          "description": "Gives time until which ticket can be activated"
        },
        "status": {
          "type": "string",
          "description": "Status of the delivery"
        },
        "statusAt": {
          "type": "string",
          "description": "When the status was updated"
        }
      }
    },
    "OrderProduct": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific product"
        },
        "serviceId": {
          "type": "string",
          "description": "Id of the service the product is from",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "iconRef": {
          "type": "string",
          "description": "Reference to supplier icon"
        },
        "name": {
          "type": "string",
          "description": "Display name of the product"
        },
        "quantity": {
          "type": "integer",
          "description": "Number of tickets/passengers product qualifies for"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be used"
        },
        "available": {
          "type": "integer",
          "description": "Max number of passengers available for this product"
        },
        "passengers": {
          "$ref": "#/definitions/PassengerTypes"
        },
        "caption": {
          "type": "string",
          "description": "Short description of the product to be displayed with name. Functionality change coming soon."
        },
        "subtitle": {
          "type": "string",
          "description": "A short version of product description"
        },
        "description": {
          "type": "string",
          "description": "Possibly lengthy description of product"
        },
        "fromPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "toPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "requestedFromPlace": {
          "$ref": "#/definitions/Model5"
        },
        "requestedToPlace": {
          "$ref": "#/definitions/Model6"
        },
        "fromTime": {
          "$ref": "#/definitions/Model7"
        },
        "toTime": {
          "$ref": "#/definitions/Model7"
        },
        "availability": {
          "$ref": "#/definitions/availability"
        },
        "price": {
          "$ref": "#/definitions/DynamicPriceWithVatRate"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model8"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/DynamicPrice"
        },
        "priceCap": {
          "$ref": "#/definitions/PriceCap"
        },
        "productType": {
          "$ref": "#/definitions/Model9"
        },
        "supplier": {
          "$ref": "#/definitions/Model10"
        },
        "cancellationPolicy": {
          "$ref": "#/definitions/CancellationPolicy"
        },
        "supplements": {
          "$ref": "#/definitions/ProductSupplements"
        },
        "validity": {
          "$ref": "#/definitions/Validity"
        },
        "params": {
          "$ref": "#/definitions/ProductParams"
        },
        "reservable": {
          "type": "boolean",
          "description": "True if this product is available for reservation in offer"
        },
        "expiresAt": {
          "type": "string",
          "description": "Time when reservation expires if this product has been reserved"
        },
        "verification": {
          "$ref": "#/definitions/verification"
        },
        "displayName": {
          "type": "string",
          "description": "Ticket name for displaying on the App"
        },
        "externalDetails": {
          "$ref": "#/definitions/ExternalDetails"
        },
        "requiredDetails": {
          "$ref": "#/definitions/requiredDetails"
        },
        "displayInfo": {
          "$ref": "#/definitions/DisplayInfo"
        },
        "serviceCharge": {
          "$ref": "#/definitions/ServiceCharge"
        },
        "messages": {
          "$ref": "#/definitions/CommunicationWithOpsResponse"
        },
        "service": {
          "$ref": "#/definitions/OrderService"
        },
        "delivery": {
          "$ref": "#/definitions/ProductDelivery"
        }
      },
      "required": [
        "id",
        "price",
        "totalPrice",
        "productType",
        "service"
      ]
    },
    "OrderProducts": {
      "type": "array",
      "description": "products in the order",
      "items": {
        "$ref": "#/definitions/OrderProduct"
      }
    },
    "TripMetadata": {
      "type": "object",
      "description": "Trip specific metadata containing fields such as trip purpose. Exact metadata is specific to tenant organization requirements",
      "properties": {
        "tripPurpose": {
          "type": "string",
          "description": "Purpose of the trip"
        }
      }
    },
    "Order": {
      "type": "object",
      "description": "An order, containing user id, order info and service and payment info snapshots",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of order",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "groupId": {
          "type": "string"
        },
        "routeId": {
          "type": "string"
        },
        "payment": {
          "$ref": "#/definitions/Payment"
        },
        "client": {
          "$ref": "#/definitions/Client"
        },
        "userId": {
          "type": "string",
          "description": "Tuup user id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "service": {
          "$ref": "#/definitions/OrderService"
        },
        "paymentOperator": {
          "$ref": "#/definitions/PaymentOperator"
        },
        "paymentAccount": {
          "$ref": "#/definitions/PaymentAccountSnapshot"
        },
        "status": {
          "$ref": "#/definitions/Model3"
        },
        "price": {
          "$ref": "#/definitions/PriceWithVatRate"
        },
        "products": {
          "$ref": "#/definitions/OrderProducts"
        },
        "metadata": {
          "$ref": "#/definitions/TripMetadata"
        },
        "isShareable": {
          "type": "boolean",
          "description": "Wheter the order can be be shared to others"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "service"
      ]
    },
    "OrderList": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Order"
      }
    },
    "RecentOrderList": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Order"
      }
    },
    "ListOrdersResponse": {
      "type": "object",
      "description": "Orders response",
      "properties": {
        "orders": {
          "$ref": "#/definitions/OrderList"
        },
        "recentOrders": {
          "$ref": "#/definitions/RecentOrderList"
        },
        "timestamp": {
          "type": "integer",
          "description": "Server timestamp in seconds since the Unix Epoch"
        }
      }
    },
    "defaultAccountProperties": {
      "type": "object",
      "description": "Collection of properties for default account",
      "properties": {
        "userId": {
          "type": "string",
          "description": "Tuup user id, same as `userid` above",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "accountId": {
          "type": "string",
          "description": "Account id, same as `id` above",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "methodId": {
          "type": "string",
          "description": "Payment method id"
        },
        "createdAt": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601 datetime), same as `createdAt` above"
        },
        "updatedAt": {
          "type": "string",
          "description": "Account last update timestamp (ISO 8601 datetime), same as `updatedAt` above"
        }
      },
      "required": [
        "userId",
        "accountId",
        "methodId",
        "createdAt",
        "updatedAt"
      ]
    },
    "Model15": {
      "type": "string",
      "description": "Payment method type",
      "enum": [
        "CREDIT_CARD"
      ]
    },
    "paymentMethodCard": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Base64-encoded details the deleted payment method"
        },
        "name": {
          "type": "string",
          "description": "Text description shown by the client",
          "example": "Visa ****4242, 8/2019"
        },
        "type": {
          "$ref": "#/definitions/Model15"
        },
        "deletable": {
          "type": "boolean",
          "description": "Whether the payment method can be deleted"
        },
        "accountId": {
          "type": "string",
          "description": "Id of the payment account",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "expiresAt": {
          "type": "string",
          "description": "Payment method expiration timestamp (ISO 8601 datetime)",
          "example": "2019-09-01T00:00:00.000Z"
        },
        "default": {
          "type": "boolean",
          "description": "Whether the payment method is to be used as default. Only one method can be default, all other methods should have it `false`."
        },
        "operatorName": {
          "type": "string",
          "description": "Operator name"
        }
      },
      "required": [
        "id",
        "name",
        "type",
        "deletable",
        "accountId",
        "expiresAt",
        "default",
        "operatorName"
      ]
    },
    "paymentMethods": {
      "type": "array",
      "description": "List of payment methods configured in the account. Shown if `listMethods` in request is set to true.",
      "items": {
        "$ref": "#/definitions/paymentMethodCard"
      }
    },
    "paymentAccountProperties": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Account id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "userId": {
          "type": "string",
          "description": "Tuup user id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "paymentOperatorId": {
          "type": "string",
          "description": "Payment operator id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "loginIdentity": {
          "type": "string",
          "description": "Login identity for external operator, e.g. email or login name"
        },
        "virtual": {
          "type": "boolean",
          "description": "Whether the account is virtual"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the account is active"
        },
        "name": {
          "type": "string",
          "example": "Stripe virtual account"
        },
        "createdAt": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Account last update timestamp (ISO 8601 datetime)"
        },
        "default": {
          "$ref": "#/definitions/defaultAccountProperties"
        },
        "paymentMethods": {
          "$ref": "#/definitions/paymentMethods"
        }
      },
      "required": [
        "id",
        "userId",
        "paymentOperatorId",
        "loginIdentity",
        "virtual",
        "enabled",
        "name",
        "createdAt",
        "updatedAt",
        "default"
      ]
    },
    "accounts": {
      "type": "array",
      "description": "List of accounts",
      "items": {
        "$ref": "#/definitions/paymentAccountProperties"
      }
    },
    "PaymentAccountsSchema": {
      "type": "object",
      "properties": {
        "accounts": {
          "$ref": "#/definitions/accounts"
        }
      },
      "required": [
        "accounts"
      ]
    },
    "PaymentOperatorArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/PaymentOperator"
      }
    },
    "BikeRentalStation": {
      "type": "object",
      "description": "Bike rental station details",
      "properties": {
        "bikesAvailable": {
          "type": "integer",
          "description": "Number of bikes currently available at the station",
          "minimum": 0
        },
        "bikeCapacity": {
          "type": "integer",
          "description": "Maximum number of bikes available at the station",
          "minimum": 0
        }
      },
      "required": [
        "bikesAvailable",
        "bikeCapacity"
      ]
    },
    "Model16": {
      "type": "string",
      "enum": [
        "petrol",
        "diesel"
      ]
    },
    "fuelTypes": {
      "type": "array",
      "description": "Vehicle fuel types",
      "items": {
        "$ref": "#/definitions/Model16"
      }
    },
    "transmissionType": {
      "type": "string",
      "description": "Vehicle transmission type",
      "enum": [
        "manual",
        "automatic"
      ]
    },
    "price": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "description": "Price currency",
          "example": "EUR"
        },
        "perKm": {
          "type": "number",
          "description": "Price per kilometer",
          "minimum": 0
        },
        "perDay": {
          "type": "number",
          "description": "Price per day",
          "minimum": 0
        },
        "perHour": {
          "type": "number",
          "description": "Price per hour",
          "minimum": 0
        }
      },
      "required": [
        "currency",
        "perKm",
        "perDay",
        "perHour"
      ]
    },
    "Model17": {
      "type": "array",
      "description": "Images of the vehicle",
      "items": {
        "type": "string"
      }
    },
    "VehicleSchema": {
      "type": "object",
      "description": "Vehicle details",
      "properties": {
        "available": {
          "type": "boolean",
          "description": "Is the vehicle available"
        },
        "fuelTypes": {
          "$ref": "#/definitions/fuelTypes"
        },
        "brand": {
          "type": "string",
          "description": "Vehicle brand"
        },
        "model": {
          "type": "string",
          "description": "Vehicle model"
        },
        "year": {
          "type": "number",
          "description": "Vehicle manufacturing year"
        },
        "chassisType": {
          "type": "string",
          "description": "Vehicle chassis type"
        },
        "transmissionType": {
          "$ref": "#/definitions/transmissionType"
        },
        "price": {
          "$ref": "#/definitions/price"
        },
        "images": {
          "$ref": "#/definitions/Model17"
        }
      },
      "required": [
        "available",
        "fuelTypes",
        "brand",
        "model",
        "year"
      ]
    },
    "NearbyPlaceSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        },
        "iconRef": {
          "type": "string",
          "description": "Name of an icon",
          "example": "airport"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color. For example the background color of a map marker.",
          "example": "#df5444",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "bikeRentalStation": {
          "$ref": "#/definitions/BikeRentalStation"
        },
        "vehicle": {
          "$ref": "#/definitions/VehicleSchema"
        }
      },
      "required": [
        "location"
      ]
    },
    "PlacesArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/NearbyPlaceSchema"
      }
    },
    "PlacesResponse": {
      "type": "object",
      "description": "Places response",
      "properties": {
        "places": {
          "$ref": "#/definitions/PlacesArray"
        }
      }
    },
    "SearchPlaceSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "categories": {
          "$ref": "#/definitions/categories"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        }
      },
      "required": [
        "location",
        "title",
        "subtitle"
      ]
    },
    "AddressArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/SearchPlaceSchema"
      }
    },
    "SearchResponse": {
      "type": "object",
      "description": "Search response",
      "properties": {
        "search": {
          "$ref": "#/definitions/AddressArray"
        }
      }
    },
    "category": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/PlaceCategory"
      }
    },
    "Model18": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number",
          "description": "Latitude coordinate",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "description": "Longitude coordinate",
          "minimum": -180,
          "maximum": 180
        }
      },
      "required": [
        "lat",
        "lon"
      ]
    },
    "TravelMode": {
      "type": "string",
      "description": "Travel mode",
      "enum": [
        "bus",
        "tram",
        "rail",
        "subway",
        "ferry",
        "airplane",
        "walk",
        "bicycle",
        "bicycle_rent",
        "citybike",
        "car",
        "taxi",
        "unknown"
      ]
    },
    "StopTime": {
      "type": "object",
      "description": "Stop time object",
      "properties": {
        "stopId": {
          "type": "string",
          "description": "Unique id of stop"
        },
        "lineId": {
          "type": "string",
          "description": "Unique id of public transport line"
        },
        "lineCode": {
          "type": "string",
          "description": "Line human readable code, e.g. 7A"
        },
        "heading": {
          "type": "string",
          "description": "Line destination, name on the front plate"
        },
        "cancelled": {
          "type": "boolean",
          "description": "Is this stop departure cancelled"
        },
        "time": {
          "type": "string",
          "description": "Stop time. Either real-time or expected (timetable) time, depending on the `isRealTime` attribute. (ISO 8601 datetime)"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected (timetable) stop time. Might differ from time when `isRealTime` is true. (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Flag indicating whether the stop time is based on real-time prediction or timetable data"
        },
        "travelMode": {
          "$ref": "#/definitions/TravelMode"
        }
      }
    },
    "times": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/StopTime"
      }
    },
    "Stop": {
      "type": "object",
      "description": "Stop object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique id of stop or station"
        },
        "code": {
          "type": "string",
          "description": "Stop human readable code."
        },
        "name": {
          "type": "string",
          "description": "Stop name"
        },
        "address": {
          "type": "string",
          "description": "Stop address"
        },
        "city": {
          "type": "string",
          "description": "Stop city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "category": {
          "$ref": "#/definitions/category"
        },
        "location": {
          "$ref": "#/definitions/Model18"
        },
        "times": {
          "$ref": "#/definitions/times"
        }
      },
      "required": [
        "id",
        "name",
        "location"
      ]
    },
    "StopsArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Stop"
      }
    },
    "StopsResponse": {
      "type": "object",
      "description": "Stops response",
      "properties": {
        "places": {
          "$ref": "#/definitions/StopsArray"
        }
      }
    },
    "Model19": {
      "type": "string",
      "enum": [
        "boolean"
      ]
    },
    "MobilityOptionBoolean": {
      "type": "object",
      "description": "Mobility option with boolean default",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the mobility option"
        },
        "localizedLabel": {
          "type": "string",
          "description": "Localized label of the mobility option"
        },
        "type": {
          "$ref": "#/definitions/Model19"
        },
        "default": {
          "type": "boolean",
          "description": "Should this option be enabled by default"
        }
      }
    },
    "mobilityOptions": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/MobilityOptionBoolean"
      }
    },
    "MobilityOptionArray": {
      "type": "object",
      "properties": {
        "mobilityOptions": {
          "$ref": "#/definitions/mobilityOptions"
        }
      }
    },
    "Model20": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Organization unique identifier"
        },
        "name": {
          "type": "string",
          "description": "Organization name"
        },
        "displayName": {
          "type": "string",
          "description": "Organization human readable name for display"
        },
        "vatId": {
          "type": "string",
          "description": "Organization Vat ID"
        },
        "businessId": {
          "type": "string",
          "description": "Organization Business ID"
        }
      }
    },
    "Organizations": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Model20"
      }
    },
    "OrganizationArray": {
      "type": "object",
      "properties": {
        "organizations": {
          "$ref": "#/definitions/Organizations"
        },
        "total": {
          "type": "integer",
          "description": "The total number of organizations for pagination"
        }
      }
    },
    "BasicTerms": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "URL of terms to refer",
          "x-format": {
            "uri": true
          }
        },
        "version": {
          "type": "string",
          "description": "Version of terms to refer"
        }
      },
      "required": [
        "url",
        "version"
      ]
    },
    "RequiredTerms": {
      "type": "array",
      "description": "Terms for purchasable services in route if any exist",
      "items": {
        "$ref": "#/definitions/BasicTerms"
      }
    },
    "DisplayData": {
      "type": "object",
      "description": "Display data for the service"
    },
    "Model21": {
      "type": "string",
      "description": "Product type",
      "enum": [
        "ONDEMAND",
        "KYYTI",
        "TICKET"
      ]
    },
    "Model22": {
      "type": "string",
      "enum": [
        "firstName",
        "lastName",
        "phoneNumber",
        "email"
      ]
    },
    "Model23": {
      "type": "array",
      "description": "List of required fields to proceed a product. All fields in a list must be filled in User Account. Field validation is performed on Frontend side using this list.",
      "items": {
        "$ref": "#/definitions/Model22"
      }
    },
    "Product": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific product"
        },
        "serviceId": {
          "type": "string",
          "description": "Id of the service the product is from",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "iconRef": {
          "type": "string",
          "description": "Reference to supplier icon"
        },
        "name": {
          "type": "string",
          "description": "Display name of the product"
        },
        "quantity": {
          "type": "integer",
          "description": "Number of tickets/passengers product qualifies for"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be used"
        },
        "available": {
          "type": "integer",
          "description": "Max number of passengers available for this product"
        },
        "passengers": {
          "$ref": "#/definitions/PassengerTypes"
        },
        "caption": {
          "type": "string",
          "description": "Short description of the product to be displayed with name. Functionality change coming soon."
        },
        "subtitle": {
          "type": "string",
          "description": "A short version of product description"
        },
        "description": {
          "type": "string",
          "description": "Possibly lengthy description of product"
        },
        "fromPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "toPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "requestedFromPlace": {
          "$ref": "#/definitions/Model5"
        },
        "requestedToPlace": {
          "$ref": "#/definitions/Model6"
        },
        "fromTime": {
          "$ref": "#/definitions/Model7"
        },
        "toTime": {
          "$ref": "#/definitions/Model7"
        },
        "availability": {
          "$ref": "#/definitions/availability"
        },
        "price": {
          "$ref": "#/definitions/DynamicPriceWithVatRate"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model8"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/DynamicPrice"
        },
        "priceCap": {
          "$ref": "#/definitions/PriceCap"
        },
        "productType": {
          "$ref": "#/definitions/Model21"
        },
        "supplier": {
          "$ref": "#/definitions/Model10"
        },
        "cancellationPolicy": {
          "$ref": "#/definitions/CancellationPolicy"
        },
        "supplements": {
          "$ref": "#/definitions/ProductSupplements"
        },
        "validity": {
          "$ref": "#/definitions/Validity"
        },
        "params": {
          "$ref": "#/definitions/ProductParams"
        },
        "reservable": {
          "type": "boolean",
          "description": "True if this product is available for reservation in offer"
        },
        "expiresAt": {
          "type": "string",
          "description": "Time when reservation expires if this product has been reserved"
        },
        "verification": {
          "$ref": "#/definitions/verification"
        },
        "displayName": {
          "type": "string",
          "description": "Ticket name for displaying on the App"
        },
        "externalDetails": {
          "$ref": "#/definitions/ExternalDetails"
        },
        "requiredDetails": {
          "$ref": "#/definitions/Model23"
        },
        "displayInfo": {
          "$ref": "#/definitions/DisplayInfo"
        },
        "serviceCharge": {
          "$ref": "#/definitions/ServiceCharge"
        },
        "messages": {
          "$ref": "#/definitions/CommunicationWithOpsResponse"
        }
      },
      "required": [
        "id",
        "price",
        "totalPrice",
        "productType"
      ]
    },
    "ServiceProducts": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Product"
      }
    },
    "Zone": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific zone inside the service",
          "example": "A"
        },
        "name": {
          "type": "string",
          "description": "Display name of the zone",
          "example": "A"
        },
        "description": {
          "type": "string",
          "description": "Description of the zone area",
          "example": "City center"
        },
        "color": {
          "type": "string",
          "description": "Main color of the zone",
          "example": "#eba885"
        },
        "backgroundColor": {
          "type": "string",
          "description": "Secondary color of the zone",
          "example": "#fff"
        }
      }
    },
    "Zones": {
      "type": "array",
      "description": "List of zones for this service",
      "items": {
        "$ref": "#/definitions/Zone"
      }
    },
    "ProductFetchError": {
      "type": "object"
    },
    "params": {
      "type": "object",
      "properties": {
        "iconRef": {
          "type": "string",
          "description": "Reference name of an icon",
          "example": "superbus"
        }
      },
      "required": [
        "iconRef"
      ]
    },
    "Model24": {
      "type": "object",
      "description": "Service-specific service charge",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the service charge",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "name": {
          "type": "string",
          "description": "Key of the service charge"
        },
        "price": {
          "$ref": "#/definitions/PriceWithVatRate"
        }
      }
    },
    "Service": {
      "type": "object",
      "description": "Service details",
      "properties": {
        "code": {
          "type": "string",
          "description": "Service code"
        },
        "provider": {
          "$ref": "#/definitions/Organization"
        },
        "description": {
          "type": "string",
          "description": "Description of the service, displayed with name"
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of an icon",
          "example": "föli"
        },
        "supplier": {
          "$ref": "#/definitions/Supplier"
        },
        "locale": {
          "type": "string",
          "description": "Service locale string (BCP 47)",
          "example": "fi"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "productType": {
          "$ref": "#/definitions/productType"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "enabled": {
          "type": "boolean"
        },
        "visible": {
          "type": "boolean"
        },
        "displayData": {
          "$ref": "#/definitions/DisplayData"
        },
        "products": {
          "$ref": "#/definitions/ServiceProducts"
        },
        "zones": {
          "$ref": "#/definitions/Zones"
        },
        "productsError": {
          "$ref": "#/definitions/ProductFetchError"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "params": {
          "$ref": "#/definitions/params"
        },
        "serviceCharge": {
          "$ref": "#/definitions/Model24"
        },
        "stationToStation": {
          "type": "boolean",
          "description": "True if station-to-station tickets with direction but without departure time are supported"
        }
      },
      "required": [
        "supplier",
        "id",
        "name",
        "productType"
      ]
    },
    "services": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Service"
      }
    },
    "ServiceArray": {
      "type": "object",
      "properties": {
        "services": {
          "$ref": "#/definitions/services"
        }
      }
    },
    "agency": {
      "type": "object",
      "description": "Full agency object for the route",
      "properties": {
        "gtfsId": {
          "type": "string",
          "description": "Agency GTFS identifier"
        },
        "name": {
          "type": "string",
          "description": "Agency name"
        },
        "url": {
          "type": "string",
          "description": "Agency URL",
          "x-format": {
            "uri": true
          }
        },
        "timezone": {
          "type": "string",
          "description": "Agency timezone"
        },
        "lang": {
          "type": "string",
          "description": "Agency language"
        },
        "phone": {
          "type": "string",
          "description": "Agency phone number"
        },
        "fareUrl": {
          "type": "string",
          "description": "Agency fare URL",
          "x-format": {
            "uri": true
          }
        }
      },
      "required": [
        "gtfsId",
        "name"
      ]
    },
    "mode": {
      "type": "string",
      "description": "Transportation mode",
      "enum": [
        "BUS",
        "RAIL",
        "TRAM",
        "SUBWAY",
        "FERRY",
        "BICYCLE_RENT"
      ]
    },
    "patternGeometry": {
      "type": "object",
      "properties": {
        "length": {
          "type": "number",
          "description": "Length of the route pattern"
        },
        "points": {
          "type": "string",
          "description": "Polyline-encoded geometry points"
        }
      },
      "required": [
        "length",
        "points"
      ]
    },
    "Model25": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Pattern code (e.g., stanrta:30:1:01)"
        },
        "directionId": {
          "type": "integer",
          "description": "Direction ID",
          "enum": [
            0,
            1
          ]
        },
        "headsign": {
          "type": "string",
          "description": "Vehicle headsign used by trips of this pattern, e.g. \"Downtown\""
        },
        "name": {
          "type": "string",
          "description": "Pattern name, either the route name or a destination/origin description"
        },
        "semanticHash": {
          "type": "string",
          "description": "Semantic hash of the pattern"
        },
        "patternGeometry": {
          "$ref": "#/definitions/patternGeometry"
        }
      },
      "required": [
        "code",
        "directionId",
        "semanticHash",
        "patternGeometry"
      ]
    },
    "patterns": {
      "type": "array",
      "description": "Array of route patterns",
      "items": {
        "$ref": "#/definitions/Model25"
      }
    },
    "Model26": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Stop name"
        },
        "direction": {
          "type": "string",
          "description": "Stop direction label"
        },
        "code": {
          "type": "string",
          "description": "Public stop code"
        },
        "gtfsId": {
          "type": "string",
          "description": "Stop GTFS identifier"
        },
        "vehicleMode": {
          "type": "string",
          "description": "Transportation mode serving the stop"
        },
        "lon": {
          "type": "number",
          "description": "Stop longitude",
          "minimum": -180,
          "maximum": 180
        },
        "lat": {
          "type": "number",
          "description": "Stop latitude",
          "minimum": -90,
          "maximum": 90
        }
      },
      "required": [
        "name",
        "gtfsId",
        "lon",
        "lat"
      ]
    },
    "stops": {
      "type": "array",
      "description": "Array of route stops",
      "items": {
        "$ref": "#/definitions/Model26"
      }
    },
    "Model27": {
      "type": "object",
      "properties": {
        "gtfsId": {
          "type": "string",
          "description": "GTFS identifier"
        },
        "shortName": {
          "type": "string",
          "description": "Short route name/number"
        },
        "longName": {
          "type": "string",
          "description": "Long route name"
        },
        "color": {
          "type": "string",
          "description": "Route color in hexadecimal format"
        },
        "agency": {
          "$ref": "#/definitions/agency"
        },
        "agencyName": {
          "type": "string",
          "description": "Legacy agency name field"
        },
        "mode": {
          "$ref": "#/definitions/mode"
        },
        "patterns": {
          "$ref": "#/definitions/patterns"
        },
        "stops": {
          "$ref": "#/definitions/stops"
        },
        "cachedAt": {
          "type": "string",
          "description": "ISO 8601 timestamp of when cached",
          "x-format": {
            "isoDate": true
          }
        }
      },
      "required": [
        "gtfsId",
        "shortName",
        "longName",
        "mode",
        "patterns",
        "stops",
        "cachedAt"
      ]
    },
    "Model28": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Model27"
      }
    },
    "DurationRange": {
      "type": "object",
      "description": "Duration time-range for the route",
      "properties": {
        "min": {
          "type": "integer",
          "description": "Minimal estimate on route duration in seconds",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "max": {
          "type": "integer",
          "description": "Maximal estimate on route duration in seconds",
          "minimum": 0
        }
      },
      "required": [
        "min",
        "max"
      ]
    },
    "Model29": {
      "type": "string",
      "description": "Product type",
      "enum": [
        "ONDEMAND",
        "KYYTI",
        "TICKET"
      ]
    },
    "Model30": {
      "type": "string",
      "enum": [
        "firstName",
        "lastName",
        "phoneNumber",
        "email"
      ]
    },
    "Model31": {
      "type": "array",
      "description": "List of required fields to proceed a product. All fields in a list must be filled in User Account. Field validation is performed on Frontend side using this list.",
      "items": {
        "$ref": "#/definitions/Model30"
      }
    },
    "Model32": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific product"
        },
        "serviceId": {
          "type": "string",
          "description": "Id of the service the product is from",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "iconRef": {
          "type": "string",
          "description": "Reference to supplier icon"
        },
        "name": {
          "type": "string",
          "description": "Display name of the product"
        },
        "quantity": {
          "type": "integer",
          "description": "Number of tickets/passengers product qualifies for"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be used"
        },
        "available": {
          "type": "integer",
          "description": "Max number of passengers available for this product"
        },
        "passengers": {
          "$ref": "#/definitions/PassengerTypes"
        },
        "caption": {
          "type": "string",
          "description": "Short description of the product to be displayed with name. Functionality change coming soon."
        },
        "subtitle": {
          "type": "string",
          "description": "A short version of product description"
        },
        "description": {
          "type": "string",
          "description": "Possibly lengthy description of product"
        },
        "fromPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "toPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "requestedFromPlace": {
          "$ref": "#/definitions/Model5"
        },
        "requestedToPlace": {
          "$ref": "#/definitions/Model6"
        },
        "fromTime": {
          "$ref": "#/definitions/Model7"
        },
        "toTime": {
          "$ref": "#/definitions/Model7"
        },
        "availability": {
          "$ref": "#/definitions/availability"
        },
        "price": {
          "$ref": "#/definitions/DynamicPriceWithVatRate"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model8"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/DynamicPrice"
        },
        "priceCap": {
          "$ref": "#/definitions/PriceCap"
        },
        "productType": {
          "$ref": "#/definitions/Model29"
        },
        "supplier": {
          "$ref": "#/definitions/Model10"
        },
        "cancellationPolicy": {
          "$ref": "#/definitions/CancellationPolicy"
        },
        "supplements": {
          "$ref": "#/definitions/ProductSupplements"
        },
        "validity": {
          "$ref": "#/definitions/Validity"
        },
        "params": {
          "$ref": "#/definitions/ProductParams"
        },
        "reservable": {
          "type": "boolean",
          "description": "True if this product is available for reservation in offer"
        },
        "expiresAt": {
          "type": "string",
          "description": "Time when reservation expires if this product has been reserved"
        },
        "verification": {
          "$ref": "#/definitions/verification"
        },
        "displayName": {
          "type": "string",
          "description": "Ticket name for displaying on the App"
        },
        "externalDetails": {
          "$ref": "#/definitions/ExternalDetails"
        },
        "requiredDetails": {
          "$ref": "#/definitions/Model31"
        },
        "displayInfo": {
          "$ref": "#/definitions/DisplayInfo"
        },
        "serviceCharge": {
          "$ref": "#/definitions/ServiceCharge"
        },
        "messages": {
          "$ref": "#/definitions/CommunicationWithOpsResponse"
        }
      },
      "required": [
        "id",
        "price",
        "totalPrice",
        "productType"
      ]
    },
    "RouteOfferProductLegs": {
      "type": "array",
      "description": "Which legs this product is needed for and is valid for",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "RouteOfferAlternativeProducts": {
      "type": "array",
      "description": "Other products also valid for the same journey, but with e.g. different passenger type",
      "items": {
        "$ref": "#/definitions/Product"
      }
    },
    "RouteOfferProduct": {
      "type": "object",
      "properties": {
        "product": {
          "$ref": "#/definitions/Model32"
        },
        "service": {
          "$ref": "#/definitions/Service"
        },
        "validityStarts": {
          "type": "string",
          "description": "Public transport ticket should be valid for onboarding from this moment"
        },
        "count": {
          "type": "integer",
          "description": "Count of products that should be bought to accomodate passenger count",
          "minimum": 1
        },
        "legs": {
          "$ref": "#/definitions/RouteOfferProductLegs"
        },
        "alternativeProducts": {
          "$ref": "#/definitions/RouteOfferAlternativeProducts"
        }
      },
      "required": [
        "product",
        "service"
      ]
    },
    "RouteOfferProducts": {
      "type": "array",
      "description": "The product and service data of products offered for this route",
      "items": {
        "$ref": "#/definitions/RouteOfferProduct"
      }
    },
    "RouteOfferServiceChargeServices": {
      "type": "array",
      "description": "Fee is charged if any of the included services are bought in order",
      "items": {
        "type": "string"
      }
    },
    "RouteOfferServiceCharge": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Key of the service charge"
        },
        "services": {
          "$ref": "#/definitions/RouteOfferServiceChargeServices"
        },
        "price": {
          "$ref": "#/definitions/PriceWithVatRate"
        }
      }
    },
    "RouteOfferServiceCharges": {
      "type": "array",
      "description": "Service charges added when buying products from the indicated services",
      "items": {
        "$ref": "#/definitions/RouteOfferServiceCharge"
      }
    },
    "Model33": {
      "type": "object",
      "description": "Cumulative price for all products of the offer including service charges",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted amount to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total amount as number"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        }
      }
    },
    "Model34": {
      "type": "object",
      "description": "Cumulative price for all products of the offer including service charges without rebates",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted amount to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total amount as number"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        }
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Error"
      }
    },
    "RouteOffer": {
      "type": "object",
      "properties": {
        "products": {
          "$ref": "#/definitions/RouteOfferProducts"
        },
        "serviceCharges": {
          "$ref": "#/definitions/RouteOfferServiceCharges"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model33"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model34"
        },
        "errors": {
          "$ref": "#/definitions/errors"
        }
      },
      "required": [
        "products"
      ]
    },
    "PreferredUnitSystem": {
      "type": "string",
      "description": "Which metric unit system is in use",
      "default": "metric",
      "enum": [
        "metric",
        "imperial"
      ]
    },
    "RouteSource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique route source id"
        },
        "name": {
          "type": "string",
          "description": "Route source name that can be used to show a string to user",
          "example": "otpWalttiLahtiPublicTransport"
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the leg icon"
        },
        "displayAllRoutes": {
          "type": "boolean",
          "description": "Whether all the routes should be displayed by default"
        },
        "preferredUnitSystem": {
          "$ref": "#/definitions/PreferredUnitSystem"
        }
      },
      "required": [
        "name",
        "displayAllRoutes",
        "preferredUnitSystem"
      ]
    },
    "RouteRequestStartLocation": {
      "type": "object",
      "description": "Route start details",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        }
      },
      "required": [
        "location"
      ]
    },
    "RouteRequestEndLocation": {
      "type": "object",
      "description": "Route destination details",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        }
      },
      "required": [
        "location"
      ]
    },
    "timeType": {
      "type": "string",
      "description": "Whether desired route scheduling time is specified for departure or arrival",
      "default": "departure",
      "enum": [
        "departure",
        "arrival"
      ]
    },
    "sortTimeType": {
      "type": "string",
      "description": "Should public transport routes be sorted by departure or arrival time",
      "default": "departure",
      "enum": [
        "departure",
        "arrival"
      ]
    },
    "RouteRequestPassengers": {
      "type": "object",
      "description": "Passengers properties. Currently supports only passenger count.",
      "properties": {
        "count": {
          "type": "integer",
          "description": "Number of passengers",
          "default": 1,
          "minimum": 1,
          "maximum": 100
        }
      }
    },
    "MobilityOption": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of mobility option"
        },
        "count": {
          "type": "integer",
          "description": "Quantity of this mobility option",
          "default": 0,
          "minimum": 0
        }
      },
      "required": [
        "id"
      ]
    },
    "MobilityOptions": {
      "type": "array",
      "description": "List of mobility options that should be taken into account",
      "items": {
        "$ref": "#/definitions/MobilityOption"
      }
    },
    "RouteRequestExtraInfo": {
      "type": "object",
      "description": "Additional special requirements",
      "properties": {
        "extraLuggageCount": {
          "type": "integer",
          "description": "Number of extra luggage items on top of one bag per passenger, which is already included",
          "default": 0,
          "minimum": 0,
          "maximum": 100
        },
        "mobilityOptions": {
          "$ref": "#/definitions/MobilityOptions"
        }
      }
    },
    "RouteRequestInfo": {
      "type": "object",
      "description": "Route request details without specifying the travel mode",
      "properties": {
        "start": {
          "$ref": "#/definitions/RouteRequestStartLocation"
        },
        "end": {
          "$ref": "#/definitions/RouteRequestEndLocation"
        },
        "time": {
          "type": "string",
          "description": "Desired route scheduling time (ISO 8601)"
        },
        "timeType": {
          "$ref": "#/definitions/timeType"
        },
        "sortTimeType": {
          "$ref": "#/definitions/sortTimeType"
        },
        "passengers": {
          "$ref": "#/definitions/RouteRequestPassengers"
        },
        "extraInfo": {
          "$ref": "#/definitions/RouteRequestExtraInfo"
        }
      },
      "required": [
        "start"
      ]
    },
    "Model35": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model36": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "MainMode": {
      "type": "string",
      "description": "Main route mode",
      "enum": [
        "walk",
        "bicycle",
        "car",
        "publicTransport",
        "kyyti",
        "onDemand"
      ]
    },
    "LegsRoute": {
      "type": "array",
      "description": "List of route legs",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "Model37": {
      "type": "string",
      "description": "Message type",
      "enum": [
        "info",
        "advertisement",
        "alert"
      ]
    },
    "Message": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/Model37"
        },
        "title": {
          "type": "string",
          "description": "Short title of message"
        },
        "message": {
          "type": "string",
          "description": "Message text"
        }
      },
      "required": [
        "type",
        "title",
        "message"
      ]
    },
    "Model38": {
      "type": "array",
      "description": "Messages for end user",
      "items": {
        "$ref": "#/definitions/Message"
      }
    },
    "Model39": {
      "type": "object",
      "description": "Price details of the route",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Model40": {
      "type": "object",
      "description": "Price details of the route before rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "FetchedRouteSchema": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "departureTime": {
          "$ref": "#/definitions/Model35"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model36"
        },
        "mainMode": {
          "$ref": "#/definitions/MainMode"
        },
        "legs": {
          "$ref": "#/definitions/LegsRoute"
        },
        "messages": {
          "$ref": "#/definitions/Model38"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model39"
        },
        "routingId": {
          "type": "string",
          "description": "Identifier for the routing response"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model40"
        },
        "id": {
          "type": "string",
          "description": "Route id in the storage",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs",
        "id"
      ]
    },
    "notificationPreference": {
      "type": "string",
      "description": "User preferred notification mode",
      "enum": [
        "sms",
        "email",
        "pushNotification",
        "phone",
        "none"
      ]
    },
    "Model41": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "UserPropertiesSchema": {
      "type": "object",
      "description": "User extra properties",
      "properties": {
        "notificationPreference": {
          "$ref": "#/definitions/notificationPreference"
        },
        "mobilityOptions": {
          "$ref": "#/definitions/Model41"
        }
      }
    },
    "EmailSchema": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Email address",
          "x-format": {
            "email": true
          }
        },
        "verifiedAt": {
          "type": "string",
          "description": "Timestamp of email verification (ISO 8601 datetime)"
        },
        "primary": {
          "type": "boolean",
          "description": "Marks the email address used for login last"
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "id": {
          "type": "string",
          "description": "Email id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "createdAt": {
          "type": "string",
          "description": "Timestamp when the email address was added to user account (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Timestamp when the email address was modified (ISO 8601 datetime)"
        },
        "tenantOrganizationId": {
          "type": "string",
          "description": "The organization id of the tenant this user belongs to"
        }
      },
      "required": [
        "email",
        "verifiedAt",
        "primary",
        "userId",
        "id",
        "createdAt",
        "updatedAt"
      ]
    },
    "emails": {
      "type": "array",
      "description": "List of email addresses and their properties",
      "items": {
        "$ref": "#/definitions/EmailSchema"
      }
    },
    "PhoneSchema": {
      "type": "object",
      "properties": {
        "phoneNumber": {
          "type": "string",
          "description": "Mobile phone number"
        },
        "primary": {
          "type": "boolean",
          "description": "Marks the primary phone number"
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "id": {
          "type": "string",
          "description": "Phone number id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "verifiedAt": {
          "type": "string",
          "description": "Timestamp of phone number verification (ISO 8601 datetime)"
        },
        "createdAt": {
          "type": "string",
          "description": "Timestamp when the phone number was added to user account (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Timestamp when the phone number was modified (ISO 8601 datetime)"
        }
      },
      "required": [
        "phoneNumber",
        "primary",
        "userId",
        "id",
        "verifiedAt",
        "createdAt",
        "updatedAt"
      ]
    },
    "phoneNumbers": {
      "type": "array",
      "description": "List of mobile phone numbers and their properties",
      "items": {
        "$ref": "#/definitions/PhoneSchema"
      }
    },
    "UserSchema": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "allowMarketing": {
          "type": "boolean",
          "description": "Whether to allow marketing emails"
        },
        "id": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "properties": {
          "$ref": "#/definitions/UserPropertiesSchema"
        },
        "isSuperAdmin": {
          "type": "boolean",
          "description": "Whether the user account has admin rights"
        },
        "tenantOrganizationId": {
          "type": "string",
          "description": "The organization id of the tenant this user belongs to"
        },
        "createdAt": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Account last update timestamp (ISO 8601 datetime)"
        },
        "emails": {
          "$ref": "#/definitions/emails"
        },
        "phoneNumbers": {
          "$ref": "#/definitions/phoneNumbers"
        }
      },
      "required": [
        "firstName",
        "lastName",
        "allowMarketing",
        "id",
        "isSuperAdmin",
        "createdAt",
        "updatedAt",
        "emails"
      ]
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/UserSchema"
      }
    },
    "ListUsersSchema": {
      "type": "object",
      "description": "List of users",
      "properties": {
        "users": {
          "$ref": "#/definitions/users"
        }
      },
      "required": [
        "users"
      ]
    },
    "PhoneNumbers": {
      "type": "array",
      "description": "List of mobile phone numbers and their properties",
      "items": {
        "$ref": "#/definitions/PhoneSchema"
      }
    },
    "Model42": {
      "type": "array",
      "description": "List of obligatory properties",
      "items": {
        "type": "string",
        "description": "Property name"
      }
    },
    "requiredUserDetails": {
      "type": "object",
      "description": "Collection of required details",
      "properties": {
        "required": {
          "$ref": "#/definitions/Model42"
        }
      }
    },
    "Model43": {
      "type": "array",
      "description": "List of domains the email address needs to satisfy",
      "items": {
        "type": "string",
        "description": "Email domain",
        "x-format": {
          "hostname": true
        }
      }
    },
    "Model44": {
      "type": "string",
      "description": "Payment method textual code",
      "enum": [
        "STRIPE_ALIPAY",
        "STRIPE_APPLE_PAY",
        "STRIPE_GOOGLE_PAY",
        "TUUP_FREE"
      ]
    },
    "Model45": {
      "type": "array",
      "description": "List of allowed payment methods",
      "items": {
        "$ref": "#/definitions/Model44"
      }
    },
    "membershipStatus": {
      "type": "string",
      "description": "Current status of the group membership",
      "enum": [
        "pending",
        "active"
      ]
    },
    "GroupAdditionalDetails": {
      "type": "object",
      "description": "Collection of group-specific key-value pairs used as additional properties"
    },
    "GroupSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Group id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "name": {
          "type": "string",
          "description": "Group name"
        },
        "requiredUserDetails": {
          "$ref": "#/definitions/requiredUserDetails"
        },
        "active": {
          "type": "boolean",
          "description": "Marks if group membership is active"
        },
        "visible": {
          "type": "boolean",
          "description": "Marks if group membership should be visible in the client or hidden"
        },
        "createdAt": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Account last update timestamp (ISO 8601 datetime)"
        },
        "emailDomains": {
          "$ref": "#/definitions/Model43"
        },
        "allowedMethods": {
          "$ref": "#/definitions/Model45"
        },
        "discountCampaignId": {
          "type": "string",
          "description": "Id of the campaign available for that group members only",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "membershipStatus": {
          "$ref": "#/definitions/membershipStatus"
        },
        "additionalDetails": {
          "$ref": "#/definitions/GroupAdditionalDetails"
        }
      },
      "required": [
        "id",
        "name",
        "active",
        "visible",
        "createdAt",
        "updatedAt",
        "emailDomains",
        "allowedMethods",
        "discountCampaignId",
        "membershipStatus",
        "additionalDetails"
      ]
    },
    "Model46": {
      "type": "array",
      "description": "List of groups and their properties",
      "items": {
        "$ref": "#/definitions/GroupSchema"
      }
    },
    "verb": {
      "type": "string",
      "description": "Action verb",
      "enum": [
        "accept"
      ]
    },
    "AcceptedTermsWithVerb": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "URL of terms to refer",
          "x-format": {
            "uri": true
          }
        },
        "version": {
          "type": "string",
          "description": "Version of terms to refer"
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "verb": {
          "$ref": "#/definitions/verb"
        },
        "acceptedAt": {
          "type": "string",
          "description": "Timestamp of acceptance (ISO 8601 datetime)"
        }
      },
      "required": [
        "url",
        "version",
        "userId",
        "verb",
        "acceptedAt"
      ]
    },
    "AcceptedTerms": {
      "type": "array",
      "description": "List of currently accepted terms",
      "items": {
        "$ref": "#/definitions/AcceptedTermsWithVerb"
      }
    },
    "IdTokenSchema": {
      "type": "object",
      "properties": {
        "aud": {
          "type": "string",
          "description": "Token audience"
        },
        "token": {
          "type": "string",
          "description": "Token value"
        }
      }
    },
    "idTokens": {
      "type": "array",
      "description": "OpenId format jwt token",
      "items": {
        "$ref": "#/definitions/IdTokenSchema"
      }
    },
    "UserDetailsSchema": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "allowMarketing": {
          "type": "boolean",
          "description": "Whether to allow marketing emails"
        },
        "id": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "properties": {
          "$ref": "#/definitions/UserPropertiesSchema"
        },
        "isSuperAdmin": {
          "type": "boolean",
          "description": "Whether the user account has admin rights"
        },
        "tenantOrganizationId": {
          "type": "string",
          "description": "The organization id of the tenant this user belongs to"
        },
        "createdAt": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Account last update timestamp (ISO 8601 datetime)"
        },
        "emails": {
          "$ref": "#/definitions/emails"
        },
        "phoneNumbers": {
          "$ref": "#/definitions/PhoneNumbers"
        },
        "groups": {
          "$ref": "#/definitions/Model46"
        },
        "terms": {
          "$ref": "#/definitions/AcceptedTerms"
        },
        "idTokens": {
          "$ref": "#/definitions/idTokens"
        }
      },
      "required": [
        "firstName",
        "lastName",
        "allowMarketing",
        "id",
        "isSuperAdmin",
        "createdAt",
        "updatedAt",
        "emails",
        "phoneNumbers",
        "groups",
        "terms"
      ]
    },
    "members": {
      "type": "array",
      "description": "Group members with membershipStatus/additionalDetails",
      "items": {
        "type": "string"
      }
    },
    "ListMembersResponse": {
      "type": "object",
      "properties": {
        "group": {
          "$ref": "#/definitions/GroupDetails"
        },
        "members": {
          "$ref": "#/definitions/members"
        }
      }
    },
    "ReceiptObject": {
      "type": "object",
      "properties": {
        "html": {
          "type": "string"
        }
      }
    },
    "Model47": {
      "type": "string",
      "description": "The order status in tuup systems",
      "enum": [
        "received",
        "reserved",
        "paid",
        "pendingDelivery",
        "delivery",
        "completed",
        "cancelled",
        "ongoing"
      ]
    },
    "Model48": {
      "type": "string",
      "description": "Product type",
      "enum": [
        "ONDEMAND",
        "KYYTI",
        "TICKET"
      ]
    },
    "Model49": {
      "type": "string",
      "enum": [
        "firstName",
        "lastName",
        "phoneNumber",
        "email"
      ]
    },
    "Model50": {
      "type": "array",
      "description": "List of required fields to proceed a product. All fields in a list must be filled in User Account. Field validation is performed on Frontend side using this list.",
      "items": {
        "$ref": "#/definitions/Model49"
      }
    },
    "CancellationReasonType": {
      "type": "string",
      "description": "The reason for product cancellation",
      "enum": [
        "user",
        "transportNotAvailable",
        "operational",
        "noshow"
      ]
    },
    "ProductCancellationReason": {
      "type": "object",
      "description": "Describes why the order product was cancelled",
      "properties": {
        "reason": {
          "$ref": "#/definitions/CancellationReasonType"
        },
        "title": {
          "type": "string",
          "description": "Localized title text for cancellation reason"
        },
        "body": {
          "type": "string",
          "description": "Localized body text for cancellation reason"
        }
      },
      "required": [
        "reason",
        "title"
      ]
    },
    "VerificationMethod": {
      "type": "string",
      "description": "Product access verification method, e.g. whether to create an image or show text",
      "enum": [
        "QR_CODE",
        "AZTEC_CODE",
        "VISUAL",
        "HTML",
        "TEXT",
        "NONE_UNTIL_ONGOING"
      ]
    },
    "ProductVerification": {
      "type": "object",
      "properties": {
        "method": {
          "$ref": "#/definitions/VerificationMethod"
        },
        "visual": {
          "type": "string"
        },
        "data": {
          "type": "string",
          "description": "Data to use for creating/showing the access verification"
        },
        "pngData": {
          "type": "string",
          "description": "Base64 PNG image data if applicable to the verification method, e.g. QR_CODE or AZTEC_CODE image"
        },
        "expiresAt": {
          "type": "string",
          "description": "When the verification data expires. Must be refreshed before (ISO 8601 datetime)"
        },
        "refreshAt": {
          "type": "string",
          "description": "When the the verification data should be refreshed, if not present (ISO 8601 datetime)"
        },
        "timestamp": {
          "type": "string",
          "description": "When the verification data was created (ISO 8601 datetime)"
        },
        "html": {
          "type": "string",
          "description": "HTML template for the bought ticket"
        }
      },
      "required": [
        "method"
      ]
    },
    "Verification": {
      "type": "object",
      "properties": {
        "method": {
          "$ref": "#/definitions/VerificationMethod"
        },
        "visual": {
          "type": "string"
        },
        "data": {
          "type": "string",
          "description": "Data to use for creating/showing the access verification"
        },
        "pngData": {
          "type": "string",
          "description": "Base64 PNG image data if applicable to the verification method, e.g. QR_CODE or AZTEC_CODE image"
        },
        "expiresAt": {
          "type": "string",
          "description": "When the verification data expires. Must be refreshed before (ISO 8601 datetime)"
        },
        "refreshAt": {
          "type": "string",
          "description": "When the the verification data should be refreshed, if not present (ISO 8601 datetime)"
        },
        "timestamp": {
          "type": "string",
          "description": "When the verification data was created (ISO 8601 datetime)"
        },
        "html": {
          "type": "string",
          "description": "HTML template for the bought ticket"
        }
      },
      "required": [
        "method"
      ]
    },
    "VerificationsArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Verification"
      }
    },
    "ProductDeliveryInfo": {
      "type": "object",
      "properties": {
        "transportId": {
          "type": "string",
          "description": "A transport vehicle (e.g. Train, Car, Bus) identifier, optional"
        },
        "directContactNumber": {
          "type": "string",
          "description": "A phone number to the vehicle, optional"
        },
        "placeReserved": {
          "type": "string",
          "description": "A Seat/Place/Cabin identifier, optional"
        },
        "additionalInfo": {
          "type": "string",
          "description": "Additional delivery information provided by the user"
        },
        "additionalInfoEditable": {
          "type": "boolean",
          "description": "Additional delivery information can be edited by client"
        },
        "displayUntil": {
          "type": "string"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be used"
        },
        "usedCount": {
          "type": "integer",
          "description": "How many times the product has been used"
        },
        "fromTime": {
          "type": "string",
          "description": "Gives time from which ticket is valid. Deprecated, use product.fromTime instead"
        },
        "toTime": {
          "type": "string",
          "description": "Gives time until which ticket is valid. Deprecated, use product.toTime instead"
        },
        "timezone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        },
        "activateFromTime": {
          "type": "string",
          "description": "Gives time from which ticket can be activated"
        },
        "activateToTime": {
          "type": "string",
          "description": "Gives time until which ticket can be activated"
        },
        "status": {
          "type": "string",
          "description": "Status of the delivery"
        },
        "statusAt": {
          "type": "string",
          "description": "When the status was updated"
        }
      }
    },
    "ProductDeliveryDetails": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific product"
        },
        "serviceId": {
          "type": "string",
          "description": "Id of the service the product is from",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "iconRef": {
          "type": "string",
          "description": "Reference to supplier icon"
        },
        "name": {
          "type": "string",
          "description": "Display name of the product"
        },
        "quantity": {
          "type": "integer",
          "description": "Number of tickets/passengers product qualifies for"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be used"
        },
        "available": {
          "type": "integer",
          "description": "Max number of passengers available for this product"
        },
        "passengers": {
          "$ref": "#/definitions/PassengerTypes"
        },
        "caption": {
          "type": "string",
          "description": "Short description of the product to be displayed with name. Functionality change coming soon."
        },
        "subtitle": {
          "type": "string",
          "description": "A short version of product description"
        },
        "description": {
          "type": "string",
          "description": "Possibly lengthy description of product"
        },
        "fromPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "toPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "requestedFromPlace": {
          "$ref": "#/definitions/Model5"
        },
        "requestedToPlace": {
          "$ref": "#/definitions/Model6"
        },
        "fromTime": {
          "$ref": "#/definitions/Model7"
        },
        "toTime": {
          "$ref": "#/definitions/Model7"
        },
        "availability": {
          "$ref": "#/definitions/availability"
        },
        "price": {
          "$ref": "#/definitions/DynamicPriceWithVatRate"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model8"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/DynamicPrice"
        },
        "priceCap": {
          "$ref": "#/definitions/PriceCap"
        },
        "productType": {
          "$ref": "#/definitions/Model48"
        },
        "supplier": {
          "$ref": "#/definitions/Model10"
        },
        "cancellationPolicy": {
          "$ref": "#/definitions/CancellationPolicy"
        },
        "supplements": {
          "$ref": "#/definitions/ProductSupplements"
        },
        "validity": {
          "$ref": "#/definitions/Validity"
        },
        "params": {
          "$ref": "#/definitions/ProductParams"
        },
        "reservable": {
          "type": "boolean",
          "description": "True if this product is available for reservation in offer"
        },
        "expiresAt": {
          "type": "string",
          "description": "Time when reservation expires if this product has been reserved"
        },
        "displayName": {
          "type": "string",
          "description": "Ticket name for displaying on the App"
        },
        "externalDetails": {
          "$ref": "#/definitions/ExternalDetails"
        },
        "requiredDetails": {
          "$ref": "#/definitions/Model50"
        },
        "displayInfo": {
          "$ref": "#/definitions/DisplayInfo"
        },
        "serviceCharge": {
          "$ref": "#/definitions/ServiceCharge"
        },
        "messages": {
          "$ref": "#/definitions/CommunicationWithOpsResponse"
        },
        "service": {
          "$ref": "#/definitions/OrderService"
        },
        "cancellation": {
          "$ref": "#/definitions/ProductCancellationReason"
        },
        "verification": {
          "$ref": "#/definitions/ProductVerification"
        },
        "verifications": {
          "$ref": "#/definitions/VerificationsArray"
        },
        "delivery": {
          "$ref": "#/definitions/ProductDeliveryInfo"
        }
      },
      "required": [
        "id",
        "price",
        "totalPrice",
        "productType",
        "service"
      ]
    },
    "ProductDeliveryDetailsArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ProductDeliveryDetails"
      }
    },
    "SellerInfo": {
      "type": "object"
    },
    "OrderDetails": {
      "type": "object",
      "description": "An order, containing user id, order info and service and payment info snapshots",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of order",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "groupId": {
          "type": "string"
        },
        "routeId": {
          "type": "string"
        },
        "payment": {
          "$ref": "#/definitions/Payment"
        },
        "client": {
          "$ref": "#/definitions/Client"
        },
        "userId": {
          "type": "string",
          "description": "Tuup user id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "service": {
          "$ref": "#/definitions/OrderService"
        },
        "paymentOperator": {
          "$ref": "#/definitions/PaymentOperator"
        },
        "paymentAccount": {
          "$ref": "#/definitions/PaymentAccountSnapshot"
        },
        "status": {
          "$ref": "#/definitions/Model47"
        },
        "price": {
          "$ref": "#/definitions/PriceWithVatRate"
        },
        "metadata": {
          "$ref": "#/definitions/TripMetadata"
        },
        "isShareable": {
          "type": "boolean",
          "description": "Wheter the order can be be shared to others"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "products": {
          "$ref": "#/definitions/ProductDeliveryDetailsArray"
        },
        "seller": {
          "$ref": "#/definitions/SellerInfo"
        }
      },
      "required": [
        "id",
        "service"
      ]
    },
    "Model51": {
      "type": "string",
      "description": "Type of action to perform, e.g. creditcardverify",
      "enum": [
        "creditcardverify",
        "smsverify",
        "emailverify"
      ]
    },
    "action": {
      "type": "string",
      "description": "The action to perform if possible, e.g. webform. If third party action, e.g. smsverify, then not present",
      "enum": [
        "webform"
      ]
    },
    "PendingAction": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/Model51"
        },
        "action": {
          "$ref": "#/definitions/action"
        },
        "url": {
          "type": "string",
          "description": "URL if action requires one, e.g. url of webform to show"
        },
        "id": {
          "type": "string",
          "description": "Verification id if the action requires one, can be used to check verification status of method"
        }
      }
    },
    "PendingActions": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/PendingAction"
      }
    },
    "PaymentMethodStatusSchema": {
      "type": "object",
      "description": "Payment account status, contains possibly required actions that are still pending",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "pendingActions": {
          "$ref": "#/definitions/PendingActions"
        }
      },
      "required": [
        "type"
      ]
    },
    "PaymentMethods": {
      "type": "array",
      "description": "List of payment methods configured in the user account",
      "items": {
        "$ref": "#/definitions/paymentMethodCard"
      }
    },
    "Model52": {
      "type": "string",
      "description": "Client method type",
      "enum": [
        "STRIPE_ALIPAY",
        "STRIPE_APPLE_PAY",
        "STRIPE_GOOGLE_PAY"
      ]
    },
    "allowedClientMethod": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/Model52"
        },
        "default": {
          "type": "boolean",
          "description": "Whether the client method is to be used as default"
        }
      },
      "required": [
        "type",
        "default"
      ]
    },
    "AllowedClientMethods": {
      "type": "array",
      "description": "List of methods allowed to the client based on the mobile platform and application version details provided in the request header",
      "items": {
        "$ref": "#/definitions/allowedClientMethod"
      }
    },
    "PaymentMethodsSchema": {
      "type": "object",
      "properties": {
        "methods": {
          "$ref": "#/definitions/PaymentMethods"
        },
        "allowedClientMethods": {
          "$ref": "#/definitions/AllowedClientMethods"
        }
      },
      "required": [
        "methods",
        "allowedClientMethods"
      ]
    },
    "DeviceSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Device registeration id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "deviceName": {
          "type": "string"
        },
        "registrationToken": {
          "type": "string"
        },
        "deviceId": {
          "type": "string"
        },
        "payloadVersion": {
          "type": "number"
        },
        "appId": {
          "type": "string"
        },
        "headers": {
          "$ref": "#/definitions/scheme"
        },
        "createdAt": {
          "type": "string",
          "description": "Timestamp when the device was registered to user account (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Timestamp when the registeration data was modified (ISO 8601 datetime)"
        }
      }
    },
    "device": {
      "type": "array",
      "description": "List of registered devices and their properties",
      "items": {
        "$ref": "#/definitions/DeviceSchema"
      }
    },
    "DevicesSchema": {
      "type": "object",
      "properties": {
        "device": {
          "$ref": "#/definitions/device"
        }
      },
      "required": [
        "device"
      ]
    },
    "Model53": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Model27"
      }
    },
    "stop": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "gtfsId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "lat": {
          "type": "number",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        }
      },
      "required": [
        "id",
        "gtfsId",
        "name",
        "lat",
        "lon"
      ]
    },
    "stopRelationship": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "description": "Stop relationship status"
        },
        "stop": {
          "$ref": "#/definitions/stop"
        }
      },
      "required": [
        "status",
        "stop"
      ]
    },
    "Model54": {
      "type": "object",
      "properties": {
        "vehicleId": {
          "type": "string",
          "description": "Vehicle ID"
        },
        "heading": {
          "type": "number",
          "description": "Heading in degrees",
          "minimum": 0,
          "maximum": 360
        },
        "label": {
          "type": "string",
          "description": "Vehicle label/name"
        },
        "lat": {
          "type": "number",
          "description": "Latitude",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "description": "Longitude",
          "minimum": -180,
          "maximum": 180
        },
        "speed": {
          "type": "number",
          "description": "Speed in m/s",
          "minimum": 0
        },
        "lastUpdated": {
          "type": "number",
          "description": "Unix timestamp of last update"
        },
        "stopRelationship": {
          "$ref": "#/definitions/stopRelationship"
        }
      },
      "required": [
        "vehicleId",
        "heading",
        "label",
        "lat",
        "lon",
        "speed",
        "lastUpdated"
      ]
    },
    "vehiclePositions": {
      "type": "array",
      "description": "Array of vehicle positions",
      "items": {
        "$ref": "#/definitions/Model54"
      }
    },
    "Model55": {
      "type": "object",
      "properties": {
        "alertCause": {
          "type": "string",
          "description": "Cause of alert"
        },
        "alertDescriptionText": {
          "type": "string",
          "description": "Alert description"
        },
        "alertHeaderText": {
          "type": "string",
          "description": "Alert header"
        },
        "alertSeverityLevel": {
          "type": "string",
          "description": "Severity level"
        },
        "effectiveStartDate": {
          "type": "number",
          "description": "Unix timestamp of start"
        },
        "effectiveEndDate": {
          "type": "number",
          "description": "Unix timestamp of end"
        }
      },
      "required": [
        "alertCause",
        "alertDescriptionText",
        "alertHeaderText",
        "alertSeverityLevel",
        "effectiveStartDate",
        "effectiveEndDate"
      ]
    },
    "alerts": {
      "type": "array",
      "description": "Array of alerts",
      "items": {
        "$ref": "#/definitions/Model55"
      }
    },
    "Model56": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Pattern ID"
        },
        "code": {
          "type": "string",
          "description": "Pattern code"
        },
        "directionId": {
          "type": "integer",
          "description": "Direction ID"
        },
        "headsign": {
          "type": "string",
          "description": "Vehicle headsign used by trips of this pattern, e.g. \"Downtown\""
        },
        "name": {
          "type": "string",
          "description": "Pattern name, either the route name or a destination/origin description"
        },
        "routeGtfsId": {
          "type": "string",
          "description": "Parent route GTFS identifier to use as routeIds input for /routes/otp/etas"
        },
        "semanticHash": {
          "type": "string",
          "description": "Semantic hash"
        },
        "vehiclePositions": {
          "$ref": "#/definitions/vehiclePositions"
        },
        "alerts": {
          "$ref": "#/definitions/alerts"
        },
        "cachedAt": {
          "type": "string",
          "description": "ISO 8601 timestamp of when cached",
          "x-format": {
            "isoDate": true
          }
        }
      },
      "required": [
        "id",
        "code",
        "semanticHash",
        "vehiclePositions",
        "alerts",
        "cachedAt"
      ]
    },
    "UserShortSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "email": {
          "type": "string",
          "description": "Email address",
          "x-format": {
            "email": true
          }
        },
        "tenantOrganizationId": {
          "type": "string",
          "description": "The organization id of the tenant this user belongs to"
        }
      },
      "required": [
        "id",
        "firstName",
        "email"
      ]
    },
    "terms": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/AcceptedTermsWithVerb"
      }
    },
    "TermsSchema": {
      "type": "object",
      "properties": {
        "terms": {
          "$ref": "#/definitions/terms"
        }
      },
      "required": [
        "terms"
      ]
    },
    "Model57": {
      "type": "object",
      "properties": {
        "externalUserId": {
          "type": "string",
          "description": "User id in miocar"
        },
        "email": {
          "type": "string",
          "description": "User email"
        },
        "displayName": {
          "type": "string",
          "description": "User display name"
        }
      }
    },
    "Model58": {
      "type": "object",
      "description": "Favourite place",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        }
      },
      "required": [
        "location"
      ]
    },
    "FavouritePlaceSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Favourite place id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "place": {
          "$ref": "#/definitions/Model58"
        },
        "createdAt": {
          "type": "string",
          "description": "Timestamp when the favourite place address was added to user account (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Timestamp when the favourite place address was modified (ISO 8601 datetime)"
        }
      },
      "required": [
        "id",
        "userId",
        "place",
        "createdAt",
        "updatedAt"
      ]
    },
    "favouritePlaces": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/FavouritePlaceSchema"
      }
    },
    "ListFavouritePlacesSchema": {
      "type": "object",
      "description": "List of users",
      "properties": {
        "favouritePlaces": {
          "$ref": "#/definitions/favouritePlaces"
        }
      },
      "required": [
        "favouritePlaces"
      ]
    },
    "ProductLocation": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        },
        "gpsTimestamp": {
          "type": "string"
        }
      }
    },
    "ProductRealtimeDetails": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "location": {
          "$ref": "#/definitions/ProductLocation"
        }
      }
    },
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ProductRealtimeDetails"
      }
    },
    "RealtimeDetails": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "products": {
          "$ref": "#/definitions/products"
        }
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "FeedbackMessage": {
      "type": "object",
      "properties": {
        "contactEmail": {
          "type": "string",
          "x-format": {
            "email": true
          }
        },
        "message": {
          "type": "string"
        },
        "tags": {
          "$ref": "#/definitions/tags"
        }
      },
      "required": [
        "message"
      ]
    },
    "paymentMethod": {
      "type": "object",
      "properties": {
        "tokenId": {
          "type": "string",
          "description": "Single-use payment token id to use for the order payment"
        },
        "type": {
          "type": "string",
          "description": "Type of the single-use token"
        }
      },
      "required": [
        "tokenId",
        "type"
      ]
    },
    "ProductParamOrIdArray": {
      "type": "array",
      "description": "Array of product param objects or id strings",
      "items": {
        "type": "string"
      }
    },
    "ListOfTermsToAccept": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/BasicTerms"
      }
    },
    "OrderCreationInput": {
      "type": "object",
      "description": "Info to create an order",
      "properties": {
        "serviceId": {
          "type": "string",
          "description": "Id of the service the order is made to, required if not set in products array",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "paymentMethodId": {
          "type": "string",
          "description": "Id of a saved customer payment method to use"
        },
        "paymentMethod": {
          "$ref": "#/definitions/paymentMethod"
        },
        "returnUrl": {
          "type": "string",
          "description": "If payment requires authentication, use custom 3DSecure auth",
          "x-format": {
            "uri": true
          }
        },
        "products": {
          "$ref": "#/definitions/ProductParamOrIdArray"
        },
        "metadata": {
          "$ref": "#/definitions/TripMetadata"
        },
        "routeId": {
          "type": "string",
          "description": "Id of route to link this order to, if applicable"
        },
        "acceptTerms": {
          "$ref": "#/definitions/ListOfTermsToAccept"
        }
      },
      "required": [
        "products"
      ]
    },
    "extraInfo": {
      "type": "object",
      "description": "Extra info may contain the order created before error encountered",
      "properties": {
        "order": {
          "$ref": "#/definitions/Order"
        }
      }
    },
    "CreateOrderError": {
      "type": "object",
      "description": "Error encountered during order processing, possibly linked to a created order with an id",
      "properties": {
        "status": {
          "type": "number",
          "description": "Batch action status code for this error",
          "example": 400
        },
        "statusCode": {
          "type": "number",
          "description": "Batch action status code for this error",
          "example": 400
        },
        "errorCode": {
          "type": "string",
          "description": "Error code",
          "example": "A02"
        },
        "code": {
          "type": "string",
          "description": "Error code",
          "example": "A02"
        },
        "errorName": {
          "type": "string",
          "description": "Error name",
          "example": "NotAuthenticatedError"
        },
        "name": {
          "type": "string",
          "description": "Error name",
          "example": "NotAuthenticatedError"
        },
        "message": {
          "type": "string",
          "description": "Message indicating error reason",
          "example": "NotAuthenticatedError (A02): Missing cookie data"
        },
        "devMessage": {
          "type": "string",
          "description": "Developers oriented message indicating error reason. Shown only in development environment.",
          "example": "Missing cookie data"
        },
        "stack": {
          "type": "string",
          "description": "Stack segment with caught exception. Shown only in development environment.",
          "example": "NotAuthenticatedError: Missing cookie data\n    at Object..."
        },
        "cause": {
          "$ref": "#/definitions/Cause"
        },
        "nested": {
          "$ref": "#/definitions/Nested"
        },
        "extraInfo": {
          "$ref": "#/definitions/extraInfo"
        }
      },
      "required": [
        "errorCode",
        "errorName",
        "message"
      ]
    },
    "PaymentMethod": {
      "type": "object",
      "properties": {
        "tokenId": {
          "type": "string",
          "description": "Single-use payment token id that will be used for the order payment"
        },
        "type": {
          "type": "string",
          "description": "Type of the single-use token"
        }
      },
      "required": [
        "tokenId",
        "type"
      ]
    },
    "Model59": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        }
      },
      "required": [
        "amount",
        "currency"
      ]
    },
    "PaymentIntentCreation": {
      "type": "object",
      "description": "Create a payment intent & pass back client secret for Native Payments in Stripe",
      "properties": {
        "paymentMethod": {
          "$ref": "#/definitions/PaymentMethod"
        },
        "product": {
          "$ref": "#/definitions/Model59"
        }
      }
    },
    "Stripe verify action": {
      "type": "object",
      "properties": {
        "clientSecret": {
          "type": "string",
          "description": "Stripe SetupIntent client_secret"
        }
      }
    },
    "pendingActions": {
      "type": "array",
      "description": "List of actions",
      "items": {
        "$ref": "#/definitions/Stripe%20verify%20action"
      }
    },
    "Model60": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Encrypted id of payment intent"
        },
        "amount": {
          "type": "number",
          "description": "Gives the amount to be paid"
        },
        "status": {
          "type": "string",
          "description": "Gives whether payment is accepted or not"
        },
        "captured": {
          "type": "boolean"
        },
        "currency": {
          "type": "string",
          "description": "Gives currency to be paid in",
          "example": "eur"
        },
        "timestamp": {
          "type": "string",
          "description": "Gives time in ISO format when the payment is made"
        },
        "paymentOperatorType": {
          "type": "string",
          "description": "Payment operator type used",
          "example": "STRIPE"
        },
        "pendingActions": {
          "$ref": "#/definitions/pendingActions"
        }
      },
      "required": [
        "pendingActions"
      ]
    },
    "UserId": {
      "type": "string",
      "description": "Id of the user to register method for, or 'me' for request user",
      "enum": [
        "me"
      ],
      "x-format": {
        "guid": {
          "version": "uuidv4"
        }
      }
    },
    "Model61": {
      "type": "string",
      "description": "Payment method type. Can only be \"CREDIT_CARD\".",
      "enum": [
        "CREDIT_CARD"
      ]
    },
    "NewPaymentMethod": {
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/definitions/UserId"
        },
        "type": {
          "$ref": "#/definitions/Model61"
        },
        "operator": {
          "type": "string",
          "description": "Name of the operator, e.g. \"Stripe\""
        },
        "token": {
          "type": "string",
          "description": "Optional token to provide for registering method"
        },
        "paymentMethodId": {
          "type": "string",
          "description": "Optional, existing payment method id for registering method"
        }
      },
      "required": [
        "user",
        "type"
      ]
    },
    "Model62": {
      "type": "string",
      "description": "Status of successful payment method addition",
      "enum": [
        "ok",
        "pendingAction"
      ]
    },
    "Model63": {
      "type": "string",
      "description": "Required verification type",
      "enum": [
        "creditcardverify"
      ]
    },
    "Model64": {
      "type": "string",
      "description": "Method of verification",
      "enum": [
        "webform"
      ]
    },
    "creditCardVerifyAction": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/Model63"
        },
        "action": {
          "$ref": "#/definitions/Model64"
        },
        "url": {
          "type": "string",
          "description": "URL to proceed with verification",
          "x-format": {
            "uri": true
          }
        },
        "id": {
          "type": "string",
          "description": "Verification id that can be used to check verification status of method"
        }
      },
      "required": [
        "type",
        "action",
        "url",
        "id"
      ]
    },
    "Model65": {
      "type": "array",
      "description": "List of actions",
      "items": {
        "$ref": "#/definitions/creditCardVerifyAction"
      }
    },
    "NewPaymentMethodSchema": {
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/definitions/Model62"
        },
        "pendingActions": {
          "$ref": "#/definitions/Model65"
        }
      },
      "required": [
        "status",
        "pendingActions"
      ]
    },
    "DeviceRegistrationPayload": {
      "type": "object",
      "properties": {
        "deviceId": {
          "type": "string"
        },
        "deviceName": {
          "type": "string"
        },
        "registrationToken": {
          "type": "string"
        },
        "payloadVersion": {
          "type": "integer"
        },
        "isDebug": {
          "type": "boolean"
        }
      }
    },
    "RoutesRequestSchema": {
      "type": "object",
      "properties": {
        "start": {
          "$ref": "#/definitions/RouteRequestStartLocation"
        },
        "end": {
          "$ref": "#/definitions/RouteRequestEndLocation"
        },
        "time": {
          "type": "string",
          "description": "Desired route scheduling time (ISO 8601)"
        },
        "timeType": {
          "$ref": "#/definitions/timeType"
        },
        "sortTimeType": {
          "$ref": "#/definitions/sortTimeType"
        },
        "passengers": {
          "$ref": "#/definitions/RouteRequestPassengers"
        },
        "extraInfo": {
          "$ref": "#/definitions/RouteRequestExtraInfo"
        },
        "walkSpeed": {
          "type": "number",
          "description": "Walking speed (m/s)",
          "default": 1.2,
          "minimum": 0.1,
          "maximum": 20
        },
        "via": {
          "type": "string",
          "description": "Text representation of the coordinates that the route should go through",
          "example": "61.441,23.859|61.262,23.246"
        },
        "walkReluctance": {
          "type": "number",
          "description": "A multiplier how many minutes of walking equals to minutes in transit when scoring routes"
        },
        "minimizeWalking": {
          "type": "boolean",
          "description": "Adjust walk reluctance and other tuning parameters automatically to optimize routes for less walking"
        },
        "routeModes": {
          "type": "string",
          "description": "List of route modes and their travel modes. Response object contains property with array of routes for each requested route mode.",
          "example": "publicTransport:bus,tram|bicycle:citybike|walk"
        }
      },
      "required": [
        "start",
        "routeModes"
      ]
    },
    "Model66": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model67": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "mainMode": {
      "type": "string",
      "description": "Main route mode",
      "enum": [
        "bicycle"
      ]
    },
    "Model68": {
      "type": "object",
      "description": "Duration time-range for the leg",
      "properties": {
        "min": {
          "type": "integer",
          "description": "Minimal estimate on leg duration in seconds",
          "minimum": 0
        },
        "max": {
          "type": "integer",
          "description": "Maximal estimate on leg duration in seconds",
          "minimum": 0
        }
      },
      "required": [
        "min",
        "max"
      ]
    },
    "RelativeDirection": {
      "type": "string",
      "description": "The relative direction of this step",
      "enum": [
        "DEPART",
        "HARD_LEFT",
        "LEFT",
        "SLIGHTLY_LEFT",
        "CONTINUE",
        "SLIGHTLY_RIGHT",
        "RIGHT",
        "HARD_RIGHT",
        "CIRCLE_CLOCKWISE",
        "CIRCLE_COUNTERCLOCKWISE",
        "ELEVATOR",
        "UTURN_LEFT",
        "UTURN_RIGHT"
      ]
    },
    "AbsoluteDirection": {
      "type": "string",
      "description": "The absolute direction of this step",
      "enum": [
        "NORTH",
        "NORTHEAST",
        "EAST",
        "SOUTHEAST",
        "SOUTH",
        "SOUTHWEST",
        "WEST",
        "NORTHWEST"
      ]
    },
    "Model69": {
      "type": "object",
      "description": "The location of start of the step",
      "properties": {
        "lat": {
          "type": "number",
          "description": "Latitude coordinate",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "description": "Longitude coordinate",
          "minimum": -180,
          "maximum": 180
        }
      },
      "required": [
        "lat",
        "lon"
      ]
    },
    "WalkStep": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "The distance in meters that this step takes",
          "example": 63.15
        },
        "relativeDirection": {
          "$ref": "#/definitions/RelativeDirection"
        },
        "absoluteDirection": {
          "$ref": "#/definitions/AbsoluteDirection"
        },
        "streetName": {
          "type": "string",
          "description": "The name of the street",
          "example": "Broadway"
        },
        "exit": {
          "type": "string",
          "description": "When exiting a highway or traffic circle, the exit name/number",
          "example": "3"
        },
        "stayOn": {
          "type": "boolean",
          "description": "Indicates whether or not a street changes direction at an intersection"
        },
        "area": {
          "type": "boolean",
          "description": "This step is an open area, such as a plaza or train platform, and thus the directions should say something like \"cross\""
        },
        "bogusName": {
          "type": "boolean",
          "description": "The name of this street was generated by the system, so we should only display it once, and generally just display right/left directions"
        },
        "location": {
          "$ref": "#/definitions/Model69"
        }
      },
      "required": [
        "distance",
        "relativeDirection",
        "absoluteDirection",
        "streetName",
        "exit",
        "stayOn",
        "area",
        "bogusName",
        "location"
      ]
    },
    "WalkSteps": {
      "type": "array",
      "description": "A series of turn by turn instructions used for walking, biking and driving",
      "items": {
        "$ref": "#/definitions/WalkStep"
      }
    },
    "Model70": {
      "type": "object",
      "description": "Leg start time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model71": {
      "type": "object",
      "description": "Leg end time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "TravelModeBicycle": {
      "type": "string",
      "description": "Travel mode of the bicycle leg",
      "enum": [
        "bicycle",
        "citybike"
      ]
    },
    "PlacesBicycle": {
      "type": "array",
      "description": "List of places involved into that leg",
      "minItems": 2,
      "items": {
        "$ref": "#/definitions/PlaceBasicSchema"
      }
    },
    "LegBicycle": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Leg name which is the `travelMode` localised per request header `Accept-language`. Default locale is `en`."
        },
        "infoMessage": {
          "type": "string",
          "description": "Additional information on the service provider, which is localized per request header `Accept-language`. Default locale is `en`.",
          "example": "Operated by Superbus"
        },
        "distance": {
          "type": "number",
          "description": "Leg distance in meters",
          "minimum": 0
        },
        "duration": {
          "$ref": "#/definitions/Model68"
        },
        "shape": {
          "type": "string",
          "description": "Polyline encoded list of geoPoints describing the leg shape",
          "x-alternatives": [
            {
              "type": "string",
              "description": "Polyline encoded list of geoPoints describing the leg shape"
            },
            {
              "$ref": "#/x-alt-definitions/Shape"
            }
          ]
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the leg icon",
          "example": "car"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color of the leg",
          "example": "#df5444",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "steps": {
          "$ref": "#/definitions/WalkSteps"
        },
        "id": {
          "type": "string",
          "description": "Kyyti leg id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "departureTime": {
          "$ref": "#/definitions/Model70"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model71"
        },
        "travelMode": {
          "$ref": "#/definitions/TravelModeBicycle"
        },
        "places": {
          "$ref": "#/definitions/PlacesBicycle"
        }
      },
      "required": [
        "distance",
        "duration",
        "departureTime",
        "arrivalTime",
        "travelMode"
      ]
    },
    "LegsBicycle": {
      "type": "array",
      "description": "List of route legs",
      "x-constraint": {
        "length": 1
      },
      "items": {
        "$ref": "#/definitions/LegBicycle"
      }
    },
    "RouteBicycle": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "cacheId": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "description": "Kyyti leg id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "departureTime": {
          "$ref": "#/definitions/Model66"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model67"
        },
        "mainMode": {
          "$ref": "#/definitions/mainMode"
        },
        "legs": {
          "$ref": "#/definitions/LegsBicycle"
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs"
      ]
    },
    "bicycle": {
      "type": "array",
      "description": "Routes using a bicycle",
      "items": {
        "$ref": "#/definitions/RouteBicycle"
      }
    },
    "Model72": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model73": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model74": {
      "type": "string",
      "description": "Main route mode",
      "enum": [
        "car"
      ]
    },
    "Model75": {
      "type": "object",
      "description": "Leg start time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model76": {
      "type": "object",
      "description": "Leg end time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "TravelModeCar": {
      "type": "string",
      "description": "Travel mode of the car leg",
      "enum": [
        "car",
        "taxi"
      ]
    },
    "PlacesCar": {
      "type": "array",
      "description": "List of places involved into that leg",
      "minItems": 2,
      "items": {
        "$ref": "#/definitions/PlaceBasicSchema"
      }
    },
    "LegCar": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Leg name which is the `travelMode` localised per request header `Accept-language`. Default locale is `en`."
        },
        "infoMessage": {
          "type": "string",
          "description": "Additional information on the service provider, which is localized per request header `Accept-language`. Default locale is `en`.",
          "example": "Operated by Superbus"
        },
        "distance": {
          "type": "number",
          "description": "Leg distance in meters",
          "minimum": 0
        },
        "duration": {
          "$ref": "#/definitions/Model68"
        },
        "shape": {
          "type": "string",
          "description": "Polyline encoded list of geoPoints describing the leg shape",
          "x-alternatives": [
            {
              "type": "string",
              "description": "Polyline encoded list of geoPoints describing the leg shape"
            },
            {
              "$ref": "#/x-alt-definitions/Shape"
            }
          ]
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the leg icon",
          "example": "car"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color of the leg",
          "example": "#df5444",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "steps": {
          "$ref": "#/definitions/WalkSteps"
        },
        "departureTime": {
          "$ref": "#/definitions/Model75"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model76"
        },
        "travelMode": {
          "$ref": "#/definitions/TravelModeCar"
        },
        "places": {
          "$ref": "#/definitions/PlacesCar"
        }
      },
      "required": [
        "distance",
        "duration",
        "departureTime",
        "arrivalTime",
        "travelMode"
      ]
    },
    "LegsCar": {
      "type": "array",
      "description": "List of route legs",
      "x-constraint": {
        "length": 1
      },
      "items": {
        "$ref": "#/definitions/LegCar"
      }
    },
    "RouteCar": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "departureTime": {
          "$ref": "#/definitions/Model72"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model73"
        },
        "mainMode": {
          "$ref": "#/definitions/Model74"
        },
        "legs": {
          "$ref": "#/definitions/LegsCar"
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs"
      ]
    },
    "car": {
      "type": "array",
      "description": "Route using a private car",
      "items": {
        "$ref": "#/definitions/RouteCar"
      }
    },
    "Model77": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model78": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model79": {
      "type": "string",
      "description": "Main route mode",
      "enum": [
        "kyyti"
      ]
    },
    "Model80": {
      "type": "object",
      "description": "Leg start time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model81": {
      "type": "object",
      "description": "Leg end time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "ServiceBasic": {
      "type": "object",
      "description": "Service details",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the service",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "name": {
          "type": "string",
          "description": "Service display name",
          "example": "Föli"
        },
        "code": {
          "type": "string",
          "description": "Service code"
        },
        "provider": {
          "$ref": "#/definitions/Organization"
        },
        "description": {
          "type": "string",
          "description": "Description of the service, displayed with name"
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of an icon",
          "example": "föli"
        },
        "supplier": {
          "$ref": "#/definitions/Supplier"
        },
        "locale": {
          "type": "string",
          "description": "Service locale string (BCP 47)",
          "example": "fi"
        }
      },
      "required": [
        "supplier"
      ]
    },
    "travelMode": {
      "type": "string",
      "description": "Travel mode of the kyyti leg",
      "enum": [
        "express",
        "flex",
        "smart",
        "taksi02"
      ]
    },
    "Model82": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model83": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "PlaceKyytiSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        },
        "departureTime": {
          "$ref": "#/definitions/Model82"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model83"
        },
        "iconRef": {
          "type": "string",
          "description": "Name of an icon",
          "example": "airport"
        }
      },
      "required": [
        "location"
      ]
    },
    "PlacesKyytiNotWalk": {
      "type": "array",
      "description": "List of places involved into that leg",
      "minItems": 2,
      "items": {
        "$ref": "#/definitions/PlaceKyytiSchema"
      }
    },
    "RequiredProduct": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Product ID string. Format can vary depending on particular product.",
          "example": "1470;MTU4NDg3NDc=;MzgzNjQ5Mw==;1;MDgvMDUvMjAxOQ=="
        }
      },
      "required": [
        "id"
      ]
    },
    "RequiredProducts": {
      "type": "array",
      "description": "List of products required for the leg",
      "items": {
        "$ref": "#/definitions/RequiredProduct"
      }
    },
    "Model84": {
      "type": "object",
      "description": "Price details before rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Model85": {
      "type": "object",
      "description": "Price details after rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "LegKyytiNotWalk": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Leg name which is the `travelMode` localised per request header `Accept-language`. Default locale is `en`."
        },
        "infoMessage": {
          "type": "string",
          "description": "Additional information on the service provider, which is localized per request header `Accept-language`. Default locale is `en`.",
          "example": "Operated by Superbus"
        },
        "distance": {
          "type": "number",
          "description": "Leg distance in meters",
          "minimum": 0
        },
        "duration": {
          "$ref": "#/definitions/Model68"
        },
        "shape": {
          "type": "string",
          "description": "Polyline encoded list of geoPoints describing the leg shape",
          "x-alternatives": [
            {
              "type": "string",
              "description": "Polyline encoded list of geoPoints describing the leg shape"
            },
            {
              "$ref": "#/x-alt-definitions/Shape"
            }
          ]
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the leg icon",
          "example": "car"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color of the leg",
          "example": "#df5444",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "steps": {
          "$ref": "#/definitions/WalkSteps"
        },
        "departureTime": {
          "$ref": "#/definitions/Model80"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model81"
        },
        "service": {
          "$ref": "#/definitions/ServiceBasic"
        },
        "price": {
          "$ref": "#/definitions/Model12"
        },
        "travelMode": {
          "$ref": "#/definitions/travelMode"
        },
        "id": {
          "type": "string",
          "description": "Kyyti leg id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "places": {
          "$ref": "#/definitions/PlacesKyytiNotWalk"
        },
        "requiredProducts": {
          "$ref": "#/definitions/RequiredProducts"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model84"
        },
        "discountedPrice": {
          "$ref": "#/definitions/Model85"
        }
      },
      "required": [
        "distance",
        "duration",
        "departureTime",
        "arrivalTime",
        "travelMode"
      ]
    },
    "LegsKyyti": {
      "type": "array",
      "description": "List of route legs",
      "minItems": 1,
      "items": {
        "$ref": "#/definitions/LegKyytiNotWalk"
      }
    },
    "Model86": {
      "type": "array",
      "description": "Messages for end user",
      "minItems": 0,
      "items": {
        "$ref": "#/definitions/Message"
      }
    },
    "Model87": {
      "type": "object",
      "description": "Price details of the route",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Model88": {
      "type": "object",
      "description": "Price details before rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "RouteKyyti": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "departureTime": {
          "$ref": "#/definitions/Model77"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model78"
        },
        "mainMode": {
          "$ref": "#/definitions/Model79"
        },
        "legs": {
          "$ref": "#/definitions/LegsKyyti"
        },
        "messages": {
          "$ref": "#/definitions/Model86"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model87"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model88"
        },
        "cacheId": {
          "type": "string",
          "description": "Route cache id",
          "example": "rc:d1061677-d056-41ec-aa83-809043f8189e",
          "pattern": "^rc:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs",
        "messages",
        "totalPrice",
        "cacheId"
      ]
    },
    "kyyti": {
      "type": "array",
      "description": "Routes using a Kyyti service",
      "items": {
        "$ref": "#/definitions/RouteKyyti"
      }
    },
    "Model89": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model90": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model91": {
      "type": "string",
      "description": "Main route mode",
      "enum": [
        "onDemand"
      ]
    },
    "Model92": {
      "type": "object",
      "description": "Leg start time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model93": {
      "type": "object",
      "description": "Leg end time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model94": {
      "type": "string",
      "description": "Travel mode of the on-demand leg",
      "enum": [
        "onDemand"
      ]
    },
    "Model95": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model96": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "PlaceOnDemandSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        },
        "departureTime": {
          "$ref": "#/definitions/Model95"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model96"
        },
        "iconRef": {
          "type": "string",
          "description": "Name of an icon",
          "example": "airport"
        }
      },
      "required": [
        "location"
      ]
    },
    "PlacesOnDemandNotWalk": {
      "type": "array",
      "description": "List of places involved into that leg",
      "minItems": 2,
      "items": {
        "$ref": "#/definitions/PlaceOnDemandSchema"
      }
    },
    "Model97": {
      "type": "object",
      "description": "Price details before rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Model98": {
      "type": "object",
      "description": "Price details after rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "BookingRule": {
      "type": "object",
      "description": "Collection of the details on terms of booking and boarding for the service",
      "properties": {
        "message": {
          "type": "string",
          "description": "This message for the user when booking a demand responsive pickup/drop-off. It is meant to provide minimal information on the actions the user must take in order to utilize the service."
        },
        "phoneNumber": {
          "type": "string",
          "description": "Phone number in international format with leading \"+\" the user must call to utilise the service"
        },
        "infoUrl": {
          "type": "string",
          "description": "URL providing additional information with terms for booking and boarding"
        },
        "bookingUrl": {
          "type": "string",
          "description": "URL to web interface or app for user to book the trip according to booking rule"
        }
      }
    },
    "LegOnDemandNotWalk": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Leg name which is the `travelMode` localised per request header `Accept-language`. Default locale is `en`."
        },
        "infoMessage": {
          "type": "string",
          "description": "Additional information on the service provider, which is localized per request header `Accept-language`. Default locale is `en`.",
          "example": "Operated by Superbus"
        },
        "distance": {
          "type": "number",
          "description": "Leg distance in meters",
          "minimum": 0
        },
        "duration": {
          "$ref": "#/definitions/Model68"
        },
        "shape": {
          "type": "string",
          "description": "Polyline encoded list of geoPoints describing the leg shape",
          "x-alternatives": [
            {
              "type": "string",
              "description": "Polyline encoded list of geoPoints describing the leg shape"
            },
            {
              "$ref": "#/x-alt-definitions/Shape"
            }
          ]
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the leg icon",
          "example": "car"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color of the leg",
          "example": "#df5444",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "steps": {
          "$ref": "#/definitions/WalkSteps"
        },
        "departureTime": {
          "$ref": "#/definitions/Model92"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model93"
        },
        "service": {
          "$ref": "#/definitions/ServiceBasic"
        },
        "price": {
          "$ref": "#/definitions/Model12"
        },
        "travelMode": {
          "$ref": "#/definitions/Model94"
        },
        "id": {
          "type": "string",
          "description": "On-demand leg id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "places": {
          "$ref": "#/definitions/PlacesOnDemandNotWalk"
        },
        "requiredProducts": {
          "$ref": "#/definitions/RequiredProducts"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model97"
        },
        "discountedPrice": {
          "$ref": "#/definitions/Model98"
        },
        "bookingRule": {
          "$ref": "#/definitions/BookingRule"
        }
      },
      "required": [
        "distance",
        "duration",
        "departureTime",
        "arrivalTime",
        "travelMode"
      ]
    },
    "LegsOnDemand": {
      "type": "array",
      "description": "List of route legs",
      "minItems": 1,
      "items": {
        "$ref": "#/definitions/LegOnDemandNotWalk"
      }
    },
    "Messages": {
      "type": "array",
      "description": "Messages for end user",
      "minItems": 0,
      "items": {
        "$ref": "#/definitions/Message"
      }
    },
    "Model99": {
      "type": "object",
      "description": "Price details of the route",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Model100": {
      "type": "object",
      "description": "Price details before rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "SuggestedActions": {
      "type": "array",
      "description": "Next steps in priority order, open set (ignore unknown values)",
      "items": {
        "type": "string"
      }
    },
    "Params": {
      "type": "object",
      "description": "Values behind the message, camelCase keys and string values"
    },
    "BookingFailure": {
      "type": "object",
      "description": "Why the requested time was not available when this route is an offered alternative",
      "properties": {
        "Reason": {
          "type": "string",
          "description": "Stable machine code for the failure, open set (new values may appear)",
          "example": "VEHICLES_FULL"
        },
        "Category": {
          "type": "string",
          "description": "Closed set: AVAILABILITY, SERVICE_HOURS, BOOKING_WINDOW, SERVICE_AREA, RESTRICTION, CONFLICT, ELIGIBILITY, SYSTEM",
          "example": "AVAILABILITY"
        },
        "Title": {
          "type": "string",
          "description": "Short rider-facing headline, plain text"
        },
        "Message": {
          "type": "string",
          "description": "Rider-facing explanation, plain text"
        },
        "UserCanResolve": {
          "type": "boolean",
          "description": "Rider can fix it by changing the request"
        },
        "Retryable": {
          "type": "boolean",
          "description": "The same request may succeed later"
        },
        "RetryAfterSeconds": {
          "type": "integer",
          "description": "Wait before retrying"
        },
        "SuggestedActions": {
          "$ref": "#/definitions/SuggestedActions"
        },
        "AlternativesOffered": {
          "type": "boolean",
          "description": "Other times are offered instead"
        },
        "Params": {
          "$ref": "#/definitions/Params"
        },
        "TraceId": {
          "type": "string",
          "description": "Support reference matching the MDR server log"
        }
      }
    },
    "RouteMetadata": {
      "type": "object",
      "description": "Optional extra information about the route",
      "properties": {
        "bookingFailure": {
          "$ref": "#/definitions/BookingFailure"
        }
      }
    },
    "RouteOnDemand": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "departureTime": {
          "$ref": "#/definitions/Model89"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model90"
        },
        "mainMode": {
          "$ref": "#/definitions/Model91"
        },
        "legs": {
          "$ref": "#/definitions/LegsOnDemand"
        },
        "messages": {
          "$ref": "#/definitions/Messages"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model99"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model100"
        },
        "metadata": {
          "$ref": "#/definitions/RouteMetadata"
        },
        "cacheId": {
          "type": "string",
          "description": "Route cache id",
          "example": "rc:d1061677-d056-41ec-aa83-809043f8189e",
          "pattern": "^rc:[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs",
        "messages",
        "totalPrice",
        "cacheId"
      ]
    },
    "onDemand": {
      "type": "array",
      "description": "Routes using an on-demand service",
      "items": {
        "$ref": "#/definitions/RouteOnDemand"
      }
    },
    "Model101": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model102": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model103": {
      "type": "string",
      "description": "Main route mode",
      "enum": [
        "publicTransport"
      ]
    },
    "Model104": {
      "type": "object",
      "description": "Leg start time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model105": {
      "type": "object",
      "description": "Leg end time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "TravelModePublicTransportNotWalk": {
      "type": "string",
      "description": "Travel mode of the public transport leg",
      "enum": [
        "airplane",
        "bus",
        "ferry",
        "rail",
        "subway",
        "tram"
      ]
    },
    "PlacesPublicTransportNotWalk": {
      "type": "array",
      "description": "List of places involved into that leg",
      "minItems": 2,
      "items": {
        "$ref": "#/definitions/PlaceBasicSchema"
      }
    },
    "Model106": {
      "type": "string",
      "description": "Travel mode of the line, which is the same as the one of the leg",
      "enum": [
        "tram",
        "rail",
        "bus"
      ]
    },
    "Line": {
      "type": "object",
      "description": "Public-transport line details",
      "properties": {
        "code": {
          "type": "string",
          "description": "Short identifier of the tram route",
          "example": "7A"
        },
        "name": {
          "type": "string",
          "description": "Full route name",
          "example": "Senaatintori - Töölö - Pasila - Senaatintori"
        },
        "gtfsId": {
          "type": "string",
          "description": "Full GTFS identifier of the line",
          "example": "feed:id"
        },
        "travelMode": {
          "$ref": "#/definitions/Model106"
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the line icon",
          "example": "tram"
        }
      },
      "required": [
        "travelMode"
      ]
    },
    "Model107": {
      "type": "array",
      "description": "List of service zones",
      "items": {
        "type": "string",
        "description": "Zone name",
        "example": "A"
      }
    },
    "LegPublicTransportNotWalk": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Leg name which is the `travelMode` localised per request header `Accept-language`. Default locale is `en`."
        },
        "infoMessage": {
          "type": "string",
          "description": "Additional information on the service provider, which is localized per request header `Accept-language`. Default locale is `en`.",
          "example": "Operated by Superbus"
        },
        "distance": {
          "type": "number",
          "description": "Leg distance in meters",
          "minimum": 0
        },
        "duration": {
          "$ref": "#/definitions/Model68"
        },
        "shape": {
          "type": "string",
          "description": "Polyline encoded list of geoPoints describing the leg shape",
          "x-alternatives": [
            {
              "type": "string",
              "description": "Polyline encoded list of geoPoints describing the leg shape"
            },
            {
              "$ref": "#/x-alt-definitions/Shape"
            }
          ]
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the leg icon",
          "example": "car"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color of the leg",
          "example": "#df5444",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "steps": {
          "$ref": "#/definitions/WalkSteps"
        },
        "id": {
          "type": "string",
          "description": "Kyyti leg id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "departureTime": {
          "$ref": "#/definitions/Model104"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model105"
        },
        "service": {
          "$ref": "#/definitions/ServiceBasic"
        },
        "price": {
          "$ref": "#/definitions/Model12"
        },
        "travelMode": {
          "$ref": "#/definitions/TravelModePublicTransportNotWalk"
        },
        "places": {
          "$ref": "#/definitions/PlacesPublicTransportNotWalk"
        },
        "headingTo": {
          "type": "string",
          "description": "Head sign of the vehicle or the route destination",
          "example": "Vaala"
        },
        "tripGtfsId": {
          "type": "string",
          "description": "Trip's GTFS identifier",
          "example": "feed:id"
        },
        "line": {
          "$ref": "#/definitions/Line"
        },
        "requiredProducts": {
          "$ref": "#/definitions/RequiredProducts"
        },
        "zones": {
          "$ref": "#/definitions/Model107"
        },
        "bookingRule": {
          "$ref": "#/definitions/BookingRule"
        }
      },
      "required": [
        "distance",
        "duration",
        "departureTime",
        "arrivalTime",
        "travelMode"
      ]
    },
    "LegsPublicTransport": {
      "type": "array",
      "description": "List of route legs",
      "minItems": 1,
      "items": {
        "$ref": "#/definitions/LegPublicTransportNotWalk"
      }
    },
    "Model108": {
      "type": "object",
      "description": "Price details of the route",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "Model109": {
      "type": "object",
      "description": "Price details before rebate",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        },
        "vatRate": {
          "type": "number",
          "description": "Value added tax rate (percentage)"
        },
        "terms": {
          "type": "string",
          "description": "Optional URL of terms for this products pricing",
          "x-format": {
            "uri": true
          }
        },
        "calculatedAt": {
          "type": "string",
          "description": "In case of dynamic pricing, the calculation time of the price in ISO 8601 format"
        }
      }
    },
    "RoutePublicTransport": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "departureTime": {
          "$ref": "#/definitions/Model101"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model102"
        },
        "cacheId": {
          "type": "string"
        },
        "mainMode": {
          "$ref": "#/definitions/Model103"
        },
        "legs": {
          "$ref": "#/definitions/LegsPublicTransport"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model108"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model109"
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs"
      ]
    },
    "publicTransport": {
      "type": "array",
      "description": "Routes using public transport",
      "items": {
        "$ref": "#/definitions/RoutePublicTransport"
      }
    },
    "Model110": {
      "type": "object",
      "description": "Route departure time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model111": {
      "type": "object",
      "description": "Route arrival time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model112": {
      "type": "string",
      "description": "Main route mode",
      "enum": [
        "walk"
      ]
    },
    "Model113": {
      "type": "object",
      "description": "Leg start time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "Model114": {
      "type": "object",
      "description": "Leg end time",
      "properties": {
        "time": {
          "type": "string",
          "description": "Absolute timestamp (ISO 8601 datetime)"
        },
        "isRealTime": {
          "type": "boolean",
          "description": "Whether the value in `time` is based on real-time data or time schedule"
        },
        "expectedTime": {
          "type": "string",
          "description": "The expected stop time (ISO 8601 datetime). Might differ from `time` when `isRealTime` is true."
        },
        "toleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "toleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range can extend in seconds",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceBefore": {
          "type": "integer",
          "description": "How much earlier from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceBefore`",
          "minimum": 0,
          "maximum": 3600
        },
        "initialToleranceAfter": {
          "type": "integer",
          "description": "How much later from the `time` the range could originally extend in seconds, before any lock-related override was applied to `toleranceAfter`",
          "minimum": 0,
          "maximum": 3600
        },
        "timeZone": {
          "type": "string",
          "description": "Full timezone name",
          "example": "Europe/Helsinki"
        }
      },
      "required": [
        "time"
      ]
    },
    "TravelModeWalk": {
      "type": "string",
      "description": "Travel mode of the walk leg",
      "enum": [
        "walk"
      ]
    },
    "PlacesWalk": {
      "type": "array",
      "description": "List of places involved into that leg",
      "minItems": 2,
      "items": {
        "$ref": "#/definitions/PlaceBasicSchema"
      }
    },
    "LegWalk": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Leg name which is the `travelMode` localised per request header `Accept-language`. Default locale is `en`."
        },
        "infoMessage": {
          "type": "string",
          "description": "Additional information on the service provider, which is localized per request header `Accept-language`. Default locale is `en`.",
          "example": "Operated by Superbus"
        },
        "distance": {
          "type": "number",
          "description": "Leg distance in meters",
          "minimum": 0
        },
        "duration": {
          "$ref": "#/definitions/Model68"
        },
        "shape": {
          "type": "string",
          "description": "Polyline encoded list of geoPoints describing the leg shape",
          "x-alternatives": [
            {
              "type": "string",
              "description": "Polyline encoded list of geoPoints describing the leg shape"
            },
            {
              "$ref": "#/x-alt-definitions/Shape"
            }
          ]
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the leg icon",
          "example": "car"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color of the leg",
          "example": "#df5444",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "steps": {
          "$ref": "#/definitions/WalkSteps"
        },
        "departureTime": {
          "$ref": "#/definitions/Model113"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model114"
        },
        "travelMode": {
          "$ref": "#/definitions/TravelModeWalk"
        },
        "places": {
          "$ref": "#/definitions/PlacesWalk"
        }
      },
      "required": [
        "distance",
        "duration",
        "departureTime",
        "arrivalTime",
        "travelMode"
      ]
    },
    "LegsWalk": {
      "type": "array",
      "description": "List of route legs",
      "x-constraint": {
        "length": 1
      },
      "items": {
        "$ref": "#/definitions/LegWalk"
      }
    },
    "RouteWalk": {
      "type": "object",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "departureTime": {
          "$ref": "#/definitions/Model110"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model111"
        },
        "mainMode": {
          "$ref": "#/definitions/Model112"
        },
        "legs": {
          "$ref": "#/definitions/LegsWalk"
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs"
      ]
    },
    "walk": {
      "type": "array",
      "description": "Route by walking",
      "items": {
        "$ref": "#/definitions/RouteWalk"
      }
    },
    "Routes": {
      "type": "object",
      "description": "Collection of different route alternatives and their individual properties",
      "properties": {
        "bicycle": {
          "$ref": "#/definitions/bicycle"
        },
        "car": {
          "$ref": "#/definitions/car"
        },
        "kyyti": {
          "$ref": "#/definitions/kyyti"
        },
        "onDemand": {
          "$ref": "#/definitions/onDemand"
        },
        "publicTransport": {
          "$ref": "#/definitions/publicTransport"
        },
        "walk": {
          "$ref": "#/definitions/walk"
        }
      }
    },
    "Model115": {
      "type": "string",
      "description": "Which distance unit system to use",
      "default": "metric",
      "enum": [
        "metric",
        "imperial"
      ]
    },
    "RoutesOptions": {
      "type": "object",
      "description": "Basic properties of the returned routes",
      "properties": {
        "displayAllRoutes": {
          "type": "boolean",
          "description": "Whether all the routes should be displayed by default"
        },
        "preferredUnitSystem": {
          "$ref": "#/definitions/Model115"
        }
      },
      "required": [
        "displayAllRoutes"
      ]
    },
    "Model116": {
      "type": "string",
      "description": "Travel mode causing an error",
      "enum": [
        "onDemand",
        "express",
        "flex",
        "smart",
        "walk",
        "bicycle",
        "citybike",
        "airplane",
        "bus",
        "ferry",
        "rail",
        "subway",
        "tram",
        "car",
        "taxi"
      ]
    },
    "Model117": {
      "type": "string",
      "description": "Whether suggested route time is specified for departure or arrival",
      "enum": [
        "departure",
        "arrival"
      ]
    },
    "SuggestedTime": {
      "type": "object",
      "description": "Alternative suggestion",
      "properties": {
        "time": {
          "type": "string",
          "description": "Routing time (ISO 8601)"
        },
        "timeType": {
          "$ref": "#/definitions/Model117"
        }
      },
      "required": [
        "time"
      ]
    },
    "SuggestedTimes": {
      "type": "array",
      "description": "List of alternative suggestions",
      "items": {
        "$ref": "#/definitions/SuggestedTime"
      }
    },
    "Model118": {
      "type": "object",
      "description": "Why the on-demand source could not offer a route, when it provides a reason",
      "properties": {
        "Reason": {
          "type": "string",
          "description": "Stable machine code for the failure, open set (new values may appear)",
          "example": "VEHICLES_FULL"
        },
        "Category": {
          "type": "string",
          "description": "Closed set: AVAILABILITY, SERVICE_HOURS, BOOKING_WINDOW, SERVICE_AREA, RESTRICTION, CONFLICT, ELIGIBILITY, SYSTEM",
          "example": "AVAILABILITY"
        },
        "Title": {
          "type": "string",
          "description": "Short rider-facing headline, plain text"
        },
        "Message": {
          "type": "string",
          "description": "Rider-facing explanation, plain text"
        },
        "UserCanResolve": {
          "type": "boolean",
          "description": "Rider can fix it by changing the request"
        },
        "Retryable": {
          "type": "boolean",
          "description": "The same request may succeed later"
        },
        "RetryAfterSeconds": {
          "type": "integer",
          "description": "Wait before retrying"
        },
        "SuggestedActions": {
          "$ref": "#/definitions/SuggestedActions"
        },
        "AlternativesOffered": {
          "type": "boolean",
          "description": "Other times are offered instead"
        },
        "Params": {
          "$ref": "#/definitions/Params"
        },
        "TraceId": {
          "type": "string",
          "description": "Support reference matching the MDR server log"
        }
      }
    },
    "ErrorExtraInfo": {
      "type": "object",
      "description": "Extra info or context that helps describing the issue",
      "properties": {
        "source": {
          "type": "string",
          "description": "Name of the service that returned the error",
          "example": "Kyyti Helsinki"
        },
        "routeMode": {
          "type": "string",
          "description": "Mode of the route that returned the error",
          "example": "kyyti"
        },
        "minPreparationTimeMs": {
          "type": "integer",
          "description": "Configured minumum preparation time in milliseconds",
          "example": 300000
        },
        "preparationTimeMs": {
          "type": "integer",
          "description": "Used preparation time in milliseconds",
          "example": -77312
        },
        "travelMode": {
          "$ref": "#/definitions/Model116"
        },
        "earliestDepartureTime": {
          "type": "string",
          "description": "Timestamp of the earliest departure (ISO 8601 datetime)"
        },
        "departureTime": {
          "type": "string",
          "description": "Timestamp of the departure (ISO 8601 datetime)"
        },
        "currentTime": {
          "type": "string",
          "description": "Timestamp of the current time (ISO 8601 datetime)"
        },
        "suggestedTimes": {
          "$ref": "#/definitions/SuggestedTimes"
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the service icon"
        },
        "bookingFailure": {
          "$ref": "#/definitions/Model118"
        }
      }
    },
    "RoutesError": {
      "type": "object",
      "properties": {
        "extraInfo": {
          "$ref": "#/definitions/ErrorExtraInfo"
        },
        "cause": {
          "$ref": "#/definitions/Cause"
        },
        "nested": {
          "$ref": "#/definitions/Nested"
        },
        "businessError": {
          "type": "boolean",
          "description": "Error categorization whether the error consequences affect business",
          "example": false
        },
        "responseMessage": {
          "type": "string",
          "description": "Message summarizing the error"
        },
        "status": {
          "type": "integer",
          "description": "HTTP response code returned by the service",
          "example": 500,
          "minimum": 400,
          "maximum": 511
        },
        "code": {
          "type": "string",
          "description": "Error code",
          "example": "E25"
        },
        "name": {
          "type": "string",
          "description": "Error name",
          "example": "RequestError"
        },
        "message": {
          "type": "string",
          "description": "Message indicating error reason",
          "example": "[axios.error.request] Error during request: timeout of 20000ms exceeded"
        },
        "stack": {
          "type": "string",
          "description": "Stack segment with caught exception. Shown only in development environment.",
          "example": "RequestError: [axios.error.request] Error during request: timeout of 20000ms exceeded..."
        }
      },
      "required": [
        "extraInfo",
        "cause",
        "nested",
        "businessError",
        "responseMessage",
        "code",
        "name",
        "message"
      ]
    },
    "Errors": {
      "type": "array",
      "description": "List of errors faced during route search",
      "items": {
        "$ref": "#/definitions/RoutesError"
      }
    },
    "RoutesSchema": {
      "type": "object",
      "properties": {
        "routingId": {
          "type": "string",
          "description": "Identifier for the whole routing response"
        },
        "routes": {
          "$ref": "#/definitions/Routes"
        },
        "options": {
          "$ref": "#/definitions/RoutesOptions"
        },
        "errors": {
          "$ref": "#/definitions/Errors"
        }
      },
      "required": [
        "routes",
        "options"
      ]
    },
    "EventInput": {
      "type": "object"
    },
    "NumberSchema": {
      "type": "object",
      "description": "Numeric schema",
      "properties": {
        "produced": {
          "type": "number"
        }
      }
    },
    "SendRoutePayload": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Target email address",
          "x-format": {
            "email": true
          }
        },
        "from": {
          "type": "string",
          "description": "Start address inside a string"
        },
        "to": {
          "type": "string",
          "description": "Destination address inside a string"
        },
        "startTime": {
          "type": "number",
          "description": "Departure time as the number of milliseconds since 1970"
        }
      },
      "required": [
        "email",
        "from",
        "to",
        "startTime"
      ]
    },
    "Model119": {
      "type": "string",
      "description": "Status",
      "enum": [
        "ok",
        "rejected"
      ]
    },
    "StatusResponseSchema": {
      "type": "object",
      "description": "Status response",
      "properties": {
        "status": {
          "$ref": "#/definitions/Model119"
        }
      }
    },
    "UsersPayload": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Email address to be used for login",
          "x-format": {
            "email": true
          }
        },
        "emailToken": {
          "type": "string",
          "description": "Optional, when registration is triggered via login link sent to email"
        },
        "authCode": {
          "type": "string",
          "description": "Optional, when registration is triggered via login link sent to email"
        },
        "password": {
          "type": "string",
          "description": "Login password"
        },
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "phoneNumber": {
          "type": "string",
          "description": "Mobile phone number"
        },
        "phoneLogin": {
          "type": "boolean",
          "description": "Mobile phone number login",
          "default": false
        },
        "allowMarketing": {
          "type": "boolean",
          "description": "Whether to allow marketing emails",
          "default": true
        }
      },
      "required": [
        "email"
      ]
    },
    "userId": {
      "type": "string",
      "default": "me",
      "enum": [
        "me"
      ],
      "x-format": {
        "guid": {
          "version": "uuidv4"
        }
      }
    },
    "Model120": {
      "type": "object",
      "properties": {
        "userId": {
          "$ref": "#/definitions/userId"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "Model121": {
      "type": "string",
      "description": "Mode of communication",
      "enum": [
        "phone",
        "sms"
      ]
    },
    "Model122": {
      "type": "object",
      "properties": {
        "userId": {
          "$ref": "#/definitions/userId"
        },
        "phoneNumber": {
          "type": "string"
        },
        "mode": {
          "$ref": "#/definitions/Model121"
        }
      },
      "required": [
        "mode"
      ]
    },
    "Model123": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Email address used as login user id",
          "x-format": {
            "email": true
          }
        },
        "webRequest": {
          "type": "boolean",
          "description": "Is the token request coming from the web or from the app"
        },
        "at": {
          "type": "string",
          "description": "Location text string, which is comma-separated pair of latitude and longitude",
          "example": "60.17052,24.94099"
        }
      },
      "required": [
        "email"
      ]
    },
    "StatusOK": {
      "type": "string",
      "description": "Confirmation of the operation execution",
      "enum": [
        "ok"
      ]
    },
    "LoginResponseSchema": {
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/definitions/StatusOK"
        },
        "nonce": {
          "type": "string",
          "description": "Nonce for login request",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "status",
        "nonce"
      ]
    },
    "ImpersonatePayload": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "description": "UUID of the user to impersonate",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "userId"
      ]
    },
    "message": {
      "type": "string",
      "description": "Success message",
      "enum": [
        "logged in"
      ]
    },
    "ImpersonateResponseSchema": {
      "type": "object",
      "properties": {
        "message": {
          "$ref": "#/definitions/message"
        },
        "loggedIn": {
          "type": "boolean",
          "description": "Login status",
          "enum": [
            true
          ]
        },
        "token": {
          "type": "string",
          "description": "Session token for the impersonated user"
        }
      },
      "required": [
        "message",
        "loggedIn",
        "token"
      ]
    },
    "Model124": {
      "type": "string",
      "description": "Mode of communication",
      "enum": [
        "phone",
        "sms"
      ]
    },
    "EmailAuth": {
      "type": "object",
      "properties": {
        "phoneNumber": {
          "type": "string",
          "description": "Email address used as login user id"
        },
        "mode": {
          "$ref": "#/definitions/Model124"
        },
        "webRequest": {
          "type": "boolean",
          "description": "Is the token request coming from the web or from the app"
        },
        "at": {
          "type": "string",
          "description": "Location text string, which is comma-separated pair of latitude and longitude",
          "example": "60.17052,24.94099"
        }
      },
      "required": [
        "phoneNumber",
        "mode"
      ]
    },
    "allowedServices": {
      "type": "array",
      "items": {
        "type": "string",
        "x-format": {
          "guid": {
            "version": "uuidv4"
          }
        }
      }
    },
    "AmountDiscountType": {
      "type": "string",
      "description": "Bonus type",
      "enum": [
        "amount",
        "discount"
      ]
    },
    "productDiscountBlacklist": {
      "type": "array",
      "description": "Configuration to disable credits processing when using campaign for payment",
      "items": {
        "type": "string"
      }
    },
    "CampaignDataSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Campaign name"
        },
        "notes": {
          "type": "string",
          "description": "Internal notes for campaign"
        },
        "formattingTemplate": {
          "type": "string",
          "description": "Used to display campaign value, e.g. \"Discount: {{value}}\""
        },
        "allowedServices": {
          "$ref": "#/definitions/allowedServices"
        },
        "type": {
          "$ref": "#/definitions/AmountDiscountType"
        },
        "amount": {
          "type": "number",
          "description": "Amount if type is amount"
        },
        "discount": {
          "type": "number",
          "description": "Discount percentage, e.g. 50"
        },
        "currency": {
          "type": "string",
          "description": "Currency code, e.g. EUR"
        },
        "validUntil": {
          "type": "string",
          "description": "ISO 8601 time format, e.g. 2050-12-12T23:59:59Z"
        },
        "productDiscountBlacklist": {
          "$ref": "#/definitions/productDiscountBlacklist"
        },
        "allowExceptionalCharges": {
          "type": "boolean",
          "description": "Credit line can be used for e.g. client no-show charges"
        },
        "minPurchase": {
          "type": "number",
          "description": "Minimum value the bonus is used on"
        },
        "maxPurchase": {
          "type": "number",
          "description": "Maximum value the bonus is used on"
        },
        "minPayment": {
          "type": "number",
          "description": "Minimum payment"
        }
      },
      "required": [
        "allowedServices",
        "type",
        "currency"
      ]
    },
    "CodeDataSchema": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Campaign code"
        },
        "limitTotal": {
          "type": "number",
          "description": "Can be used x times total, 0 for unlimited"
        },
        "limitPerUser": {
          "type": "number",
          "description": "Can be used x times per user, 0 for unlimited"
        },
        "validUntil": {
          "type": "string",
          "description": "ISO 8601 time format, e.g. 2050-12-12T23:59:59Z"
        }
      }
    },
    "CampaignDataAdd": {
      "type": "object",
      "properties": {
        "campaignData": {
          "$ref": "#/definitions/CampaignDataSchema"
        },
        "codeData": {
          "$ref": "#/definitions/CodeDataSchema"
        },
        "groupId": {
          "type": "string",
          "description": "Optional groupId to add campaign to group discount campaigns",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      }
    },
    "Model125": {
      "type": "string",
      "enum": [
        "me"
      ],
      "x-format": {
        "guid": {
          "version": "uuidv4"
        }
      }
    },
    "UseCampaignCode": {
      "type": "object",
      "properties": {
        "userId": {
          "$ref": "#/definitions/Model125"
        },
        "campaignCode": {
          "type": "string"
        }
      },
      "required": [
        "campaignCode"
      ]
    },
    "OrderCreateInput": {
      "type": "object",
      "description": "Info to create an order",
      "properties": {
        "serviceId": {
          "type": "string",
          "description": "Id of the service the order is made to, required if not set in products array",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "paymentMethodId": {
          "type": "string",
          "description": "Id of a saved customer payment method to use"
        },
        "paymentMethod": {
          "$ref": "#/definitions/paymentMethod"
        },
        "returnUrl": {
          "type": "string",
          "description": "If payment requires authentication, use custom 3DSecure auth",
          "x-format": {
            "uri": true
          }
        },
        "products": {
          "$ref": "#/definitions/ProductParamOrIdArray"
        },
        "metadata": {
          "$ref": "#/definitions/TripMetadata"
        },
        "routeId": {
          "type": "string",
          "description": "Id of route to link this order to, if applicable"
        }
      },
      "required": [
        "products"
      ]
    },
    "OrderCreationArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/OrderCreateInput"
      }
    },
    "OrderBatchCreationInput": {
      "type": "object",
      "properties": {
        "orders": {
          "$ref": "#/definitions/OrderCreationArray"
        },
        "routeId": {
          "type": "string",
          "description": "Id of route to link orders to, if applicable"
        },
        "acceptTerms": {
          "$ref": "#/definitions/ListOfTermsToAccept"
        }
      }
    },
    "CreatedOrders": {
      "type": "array",
      "description": "Created orders",
      "items": {
        "$ref": "#/definitions/Order"
      }
    },
    "BatchErrorExtraInfo": {
      "type": "object",
      "description": "Extra info may contain linked order with id",
      "properties": {
        "orderId": {
          "type": "string",
          "description": "Identifier of an order",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      }
    },
    "CreateBatchError": {
      "type": "object",
      "description": "Error encountered during batch order processing, possibly linked to a created order with an id",
      "properties": {
        "status": {
          "type": "number",
          "description": "Batch action status code for this error",
          "example": 400
        },
        "statusCode": {
          "type": "number",
          "description": "Batch action status code for this error",
          "example": 400
        },
        "errorCode": {
          "type": "string",
          "description": "Error code",
          "example": "A02"
        },
        "code": {
          "type": "string",
          "description": "Error code",
          "example": "A02"
        },
        "errorName": {
          "type": "string",
          "description": "Error name",
          "example": "NotAuthenticatedError"
        },
        "name": {
          "type": "string",
          "description": "Error name",
          "example": "NotAuthenticatedError"
        },
        "message": {
          "type": "string",
          "description": "Message indicating error reason",
          "example": "NotAuthenticatedError (A02): Missing cookie data"
        },
        "devMessage": {
          "type": "string",
          "description": "Developers oriented message indicating error reason. Shown only in development environment.",
          "example": "Missing cookie data"
        },
        "stack": {
          "type": "string",
          "description": "Stack segment with caught exception. Shown only in development environment.",
          "example": "NotAuthenticatedError: Missing cookie data\n    at Object..."
        },
        "cause": {
          "$ref": "#/definitions/Cause"
        },
        "nested": {
          "$ref": "#/definitions/Nested"
        },
        "extraInfo": {
          "$ref": "#/definitions/BatchErrorExtraInfo"
        }
      },
      "required": [
        "errorCode",
        "errorName",
        "message"
      ]
    },
    "OrderErrors": {
      "type": "array",
      "description": "Errors encountered during processing",
      "items": {
        "$ref": "#/definitions/CreateBatchError"
      }
    },
    "OrdersCreateBatchResponse": {
      "type": "object",
      "description": "Orders response for batch creation, with possible errors",
      "properties": {
        "orders": {
          "$ref": "#/definitions/CreatedOrders"
        },
        "errors": {
          "$ref": "#/definitions/OrderErrors"
        }
      }
    },
    "ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "type": "string",
        "description": "Id of order to refund",
        "x-format": {
          "guid": {
            "version": "uuidv4"
          }
        }
      }
    },
    "OrderIds": {
      "type": "object",
      "properties": {
        "ids": {
          "$ref": "#/definitions/ids"
        }
      }
    },
    "CancelOrderResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of cancelled order",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      }
    },
    "CancelBatchResponse": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/CancelOrderResponse"
      }
    },
    "Model126": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "Model127": {
      "type": "object",
      "properties": {
        "cancelled": {
          "$ref": "#/definitions/CancelBatchResponse"
        },
        "errors": {
          "$ref": "#/definitions/Model126"
        }
      }
    },
    "Model128": {
      "type": "array",
      "minItems": 1,
      "maxItems": 30,
      "items": {
        "type": "string",
        "description": "Id of order to refund",
        "x-format": {
          "guid": {
            "version": "uuidv4"
          }
        }
      }
    },
    "Model129": {
      "type": "object",
      "properties": {
        "ids": {
          "$ref": "#/definitions/Model128"
        }
      }
    },
    "RefundResponse": {
      "type": "object",
      "properties": {
        "order": {
          "$ref": "#/definitions/Order"
        },
        "refunded": {
          "type": "boolean",
          "enum": [
            true
          ]
        },
        "amount": {
          "type": "number",
          "description": "Amount refunded"
        }
      }
    },
    "RefundBatchResponse": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/RefundResponse"
      }
    },
    "Model130": {
      "type": "object"
    },
    "Model131": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "x-format": {
            "email": true
          }
        }
      },
      "required": [
        "email"
      ]
    },
    "user": {
      "type": "string",
      "description": "User id or `me` for currently logged user",
      "default": "me",
      "enum": [
        "me"
      ],
      "x-format": {
        "guid": {
          "version": "uuidv4"
        }
      }
    },
    "Route": {
      "type": "object",
      "description": "Kyyti route object. Yes, whole object."
    },
    "RoutesInsertRequestSchema": {
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/definitions/user"
        },
        "route": {
          "$ref": "#/definitions/Route"
        }
      },
      "required": [
        "route"
      ]
    },
    "Model132": {
      "type": "array",
      "description": "Messages for end user",
      "items": {
        "$ref": "#/definitions/Message"
      }
    },
    "Model133": {
      "type": "object",
      "description": "Route info from request without `cacheId",
      "properties": {
        "distance": {
          "type": "number",
          "description": "Route distance in meters",
          "x-constraint": {
            "sign": "positive"
          }
        },
        "duration": {
          "$ref": "#/definitions/DurationRange"
        },
        "offer": {
          "$ref": "#/definitions/RouteOffer"
        },
        "source": {
          "$ref": "#/definitions/RouteSource"
        },
        "totalPollution": {
          "type": "number",
          "description": "Route CO2 pollution in grams",
          "minimum": 0
        },
        "request": {
          "$ref": "#/definitions/RouteRequestInfo"
        },
        "requiredTerms": {
          "$ref": "#/definitions/RequiredTerms"
        },
        "preferred": {
          "type": "boolean",
          "description": "Whether the route should be marked as preferred and came on top of the list when should to the user"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "Priority sorting index when listing the routes to the user",
          "minimum": 0
        },
        "departureTime": {
          "$ref": "#/definitions/Model35"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model36"
        },
        "mainMode": {
          "$ref": "#/definitions/MainMode"
        },
        "legs": {
          "$ref": "#/definitions/LegsRoute"
        },
        "messages": {
          "$ref": "#/definitions/Model132"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model39"
        },
        "routingId": {
          "type": "string",
          "description": "Identifier for the routing response"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/Model40"
        },
        "id": {
          "type": "string",
          "description": "Route id in the storage",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "distance",
        "request",
        "sortingIndex",
        "departureTime",
        "arrivalTime",
        "mainMode",
        "legs",
        "id"
      ]
    },
    "InsertedRouteSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Route id in the storage",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "cacheId": {
          "type": "string",
          "description": "Cache id extracted from the route info",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "route": {
          "$ref": "#/definitions/Model133"
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "id",
        "cacheId"
      ]
    },
    "Model134": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Passenger type id"
        },
        "quantity": {
          "type": "integer",
          "description": "Number of currently included passengers of this type"
        }
      },
      "required": [
        "id",
        "quantity"
      ]
    },
    "PassengerTypeArray": {
      "type": "array",
      "description": "Array of passenger types and quantities per each type",
      "items": {
        "$ref": "#/definitions/Model134"
      }
    },
    "Model135": {
      "type": "object",
      "properties": {
        "serviceId": {
          "type": "string",
          "description": "Id of the service the product comes from",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "id": {
          "type": "string",
          "description": "Id of the product"
        },
        "passengers": {
          "$ref": "#/definitions/PassengerTypeArray"
        },
        "validityStarts": {
          "type": "string",
          "description": "Public transport ticket will be valid for onboarding from this moment"
        },
        "count": {
          "type": "integer",
          "description": "Order to purchase will contain this many copies of the product",
          "minimum": 1,
          "maximum": 50
        }
      },
      "required": [
        "serviceId",
        "id"
      ]
    },
    "ProductCreationArray": {
      "type": "array",
      "description": "Array of product objects",
      "minItems": 1,
      "items": {
        "$ref": "#/definitions/Model135"
      }
    },
    "RouteOfferReservation": {
      "type": "object",
      "properties": {
        "routeId": {
          "type": "string",
          "description": "Id of route to link these products to, if applicable"
        },
        "products": {
          "$ref": "#/definitions/ProductCreationArray"
        }
      },
      "required": [
        "products"
      ]
    },
    "Events": {
      "type": "object"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Events"
      }
    },
    "BatchEventInput": {
      "type": "object",
      "properties": {
        "events": {
          "$ref": "#/definitions/events"
        }
      }
    },
    "BatchEventOutput": {
      "type": "object",
      "properties": {
        "produced": {
          "type": "number"
        },
        "errors": {
          "$ref": "#/definitions/errors"
        }
      }
    },
    "codeIds": {
      "type": "array",
      "description": "New code ids",
      "items": {
        "type": "string"
      }
    },
    "Model136": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Campaign name"
        },
        "notes": {
          "type": "string",
          "description": "Internal notes for campaign"
        },
        "formattingTemplate": {
          "type": "string",
          "description": "Used to display campaign value, e.g. \"Discount: {{value}}\""
        },
        "allowedServices": {
          "$ref": "#/definitions/allowedServices"
        },
        "type": {
          "$ref": "#/definitions/AmountDiscountType"
        },
        "amount": {
          "type": "number",
          "description": "Amount if type is amount"
        },
        "discount": {
          "type": "number",
          "description": "Discount percentage, e.g. 50"
        },
        "currency": {
          "type": "string",
          "description": "Currency code, e.g. EUR"
        },
        "validUntil": {
          "type": "string",
          "description": "ISO 8601 time format, e.g. 2050-12-12T23:59:59Z"
        },
        "productDiscountBlacklist": {
          "$ref": "#/definitions/productDiscountBlacklist"
        },
        "allowExceptionalCharges": {
          "type": "boolean",
          "description": "Credit line can be used for e.g. client no-show charges"
        },
        "minPurchase": {
          "type": "number",
          "description": "Minimum value the bonus is used on"
        },
        "maxPurchase": {
          "type": "number",
          "description": "Maximum value the bonus is used on"
        },
        "minPayment": {
          "type": "number",
          "description": "Minimum payment"
        },
        "codeIds": {
          "$ref": "#/definitions/codeIds"
        }
      },
      "required": [
        "allowedServices",
        "type",
        "currency"
      ]
    },
    "CampaignDataUpdates": {
      "type": "object",
      "properties": {
        "campaignData": {
          "$ref": "#/definitions/Model136"
        }
      }
    },
    "Model137": {
      "type": "string",
      "description": "User identifier, UUIDv4",
      "enum": [
        "me"
      ],
      "x-format": {
        "guid": {
          "version": "uuidv4"
        }
      }
    },
    "FeedbackDataScore": {
      "type": "object",
      "description": "Feedback data, e.g. score",
      "properties": {
        "score": {
          "type": "number",
          "description": "Feedback score, -1, 0 and 1 are valid",
          "enum": [
            -1,
            0,
            1
          ]
        }
      },
      "required": [
        "score"
      ]
    },
    "FeedbackData": {
      "type": "object",
      "properties": {
        "userId": {
          "$ref": "#/definitions/Model137"
        },
        "orderId": {
          "type": "string",
          "description": "Order identifier, UUIDv4",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "data": {
          "$ref": "#/definitions/FeedbackDataScore"
        }
      },
      "required": [
        "userId",
        "orderId",
        "data"
      ]
    },
    "Model138": {
      "type": "string",
      "description": "Id of the user, or 'me' for request user",
      "enum": [
        "me"
      ],
      "x-format": {
        "guid": {
          "version": "uuidv4"
        }
      }
    },
    "UserIdPayload": {
      "type": "object",
      "properties": {
        "userId": {
          "$ref": "#/definitions/Model138"
        }
      },
      "required": [
        "userId"
      ]
    },
    "Membership": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "groupId": {
          "type": "string",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "status": {
          "type": "string"
        }
      }
    },
    "Product refund request": {
      "type": "object",
      "properties": {
        "orderProductsIdx": {
          "type": "integer",
          "description": "Index of order product to refund"
        },
        "description": {
          "type": "string",
          "description": "Description for refund, e.g. reason"
        }
      },
      "required": [
        "orderProductsIdx",
        "description"
      ]
    },
    "productRefunds": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Product%20refund%20request"
      }
    },
    "ProductRefundRequest": {
      "type": "object",
      "properties": {
        "orderId": {
          "type": "string",
          "description": "Order id for refunding products",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "productRefunds": {
          "$ref": "#/definitions/productRefunds"
        }
      },
      "required": [
        "orderId",
        "productRefunds"
      ]
    },
    "ProductRefundResponse": {
      "type": "object",
      "properties": {
        "order": {
          "$ref": "#/definitions/Order"
        }
      }
    },
    "ShareOrderResponse": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "URL to access the trip by token without login",
          "x-format": {
            "uri": true
          }
        }
      }
    },
    "GetBatchProductInputProduct": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the product"
        },
        "serviceId": {
          "type": "string",
          "description": "Id of the service",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "serviceId"
      ]
    },
    "GetBatchProductInputArray": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/GetBatchProductInputProduct"
      }
    },
    "GetBatchProductPayload": {
      "type": "object",
      "properties": {
        "products": {
          "$ref": "#/definitions/GetBatchProductInputArray"
        }
      }
    },
    "Model139": {
      "type": "string",
      "description": "Product type",
      "enum": [
        "ONDEMAND",
        "KYYTI",
        "TICKET"
      ]
    },
    "Model140": {
      "type": "string",
      "enum": [
        "firstName",
        "lastName",
        "phoneNumber",
        "email"
      ]
    },
    "Model141": {
      "type": "array",
      "description": "List of required fields to proceed a product. All fields in a list must be filled in User Account. Field validation is performed on Frontend side using this list.",
      "items": {
        "$ref": "#/definitions/Model140"
      }
    },
    "BatchProduct": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier representing a specific product"
        },
        "serviceId": {
          "type": "string",
          "description": "Id of the service the product is from",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "iconRef": {
          "type": "string",
          "description": "Reference to supplier icon"
        },
        "name": {
          "type": "string",
          "description": "Display name of the product"
        },
        "quantity": {
          "type": "integer",
          "description": "Number of tickets/passengers product qualifies for"
        },
        "maxUseCount": {
          "type": "integer",
          "description": "How many times the product can be used"
        },
        "available": {
          "type": "integer",
          "description": "Max number of passengers available for this product"
        },
        "passengers": {
          "$ref": "#/definitions/PassengerTypes"
        },
        "caption": {
          "type": "string",
          "description": "Short description of the product to be displayed with name. Functionality change coming soon."
        },
        "subtitle": {
          "type": "string",
          "description": "A short version of product description"
        },
        "description": {
          "type": "string",
          "description": "Possibly lengthy description of product"
        },
        "fromPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "toPlace": {
          "$ref": "#/definitions/PlaceBasicSchema"
        },
        "requestedFromPlace": {
          "$ref": "#/definitions/Model5"
        },
        "requestedToPlace": {
          "$ref": "#/definitions/Model6"
        },
        "fromTime": {
          "$ref": "#/definitions/Model7"
        },
        "toTime": {
          "$ref": "#/definitions/Model7"
        },
        "availability": {
          "$ref": "#/definitions/availability"
        },
        "price": {
          "$ref": "#/definitions/DynamicPriceWithVatRate"
        },
        "totalPrice": {
          "$ref": "#/definitions/Model8"
        },
        "priceBeforeRebate": {
          "$ref": "#/definitions/DynamicPrice"
        },
        "priceCap": {
          "$ref": "#/definitions/PriceCap"
        },
        "productType": {
          "$ref": "#/definitions/Model139"
        },
        "supplier": {
          "$ref": "#/definitions/Model10"
        },
        "cancellationPolicy": {
          "$ref": "#/definitions/CancellationPolicy"
        },
        "supplements": {
          "$ref": "#/definitions/ProductSupplements"
        },
        "validity": {
          "$ref": "#/definitions/Validity"
        },
        "params": {
          "$ref": "#/definitions/ProductParams"
        },
        "reservable": {
          "type": "boolean",
          "description": "True if this product is available for reservation in offer"
        },
        "expiresAt": {
          "type": "string",
          "description": "Time when reservation expires if this product has been reserved"
        },
        "verification": {
          "$ref": "#/definitions/verification"
        },
        "displayName": {
          "type": "string",
          "description": "Ticket name for displaying on the App"
        },
        "externalDetails": {
          "$ref": "#/definitions/ExternalDetails"
        },
        "requiredDetails": {
          "$ref": "#/definitions/Model141"
        },
        "displayInfo": {
          "$ref": "#/definitions/DisplayInfo"
        },
        "serviceCharge": {
          "$ref": "#/definitions/ServiceCharge"
        },
        "messages": {
          "$ref": "#/definitions/CommunicationWithOpsResponse"
        },
        "batchIndex": {
          "type": "integer",
          "description": "Index of the input element this product is a response to. Use this to match a result to an input element."
        }
      },
      "required": [
        "id",
        "price",
        "totalPrice",
        "productType",
        "batchIndex"
      ]
    },
    "BatchProductList": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/BatchProduct"
      }
    },
    "Model142": {
      "type": "object",
      "properties": {
        "products": {
          "$ref": "#/definitions/BatchProductList"
        }
      }
    },
    "ProductListInputData": {
      "type": "object",
      "description": "JSON data to be used in fetching products. E.G. when fetching products for a train trip, should include the a 'routeLeg' property that has the journey data for the train trip in tuup route schema"
    },
    "ProductListInput": {
      "type": "object",
      "properties": {
        "data": {
          "$ref": "#/definitions/ProductListInputData"
        }
      }
    },
    "ProductList": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Product"
      }
    },
    "ProductsResponse": {
      "type": "object",
      "properties": {
        "products": {
          "$ref": "#/definitions/ProductList"
        }
      },
      "required": [
        "products"
      ]
    },
    "MessageParams": {
      "type": "object"
    },
    "Data": {
      "type": "object"
    },
    "PushNotificationPayload": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "messageKey": {
          "type": "string"
        },
        "messageParams": {
          "$ref": "#/definitions/MessageParams"
        },
        "data": {
          "$ref": "#/definitions/Data"
        },
        "topic": {
          "type": "string"
        }
      }
    },
    "multicastId": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "PushNotificationError": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Error name",
          "example": "Error"
        },
        "message": {
          "type": "string",
          "description": "Message indicating error reason",
          "example": "Unknown registration id"
        },
        "stack": {
          "type": "string",
          "description": "Stack segment with caught exception. Shown only in development environment.",
          "example": "NotAuthenticatedError: Missing cookie data\n    at Object..."
        }
      },
      "required": [
        "name",
        "message"
      ]
    },
    "SendMessageSchema": {
      "type": "object",
      "properties": {
        "messageId": {
          "type": "string"
        },
        "regId": {
          "type": "string"
        },
        "originalRegId": {
          "type": "string"
        },
        "error": {
          "$ref": "#/definitions/PushNotificationError"
        },
        "errorMsg": {
          "type": "string"
        }
      }
    },
    "Model143": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/SendMessageSchema"
      }
    },
    "DeviceSendResultSchema": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "multicastId": {
          "$ref": "#/definitions/multicastId"
        },
        "success": {
          "type": "number"
        },
        "failure": {
          "type": "number"
        },
        "message": {
          "$ref": "#/definitions/Model143"
        }
      },
      "required": [
        "method",
        "success",
        "failure",
        "message"
      ]
    },
    "Model144": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/DeviceSendResultSchema"
      }
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Model144"
      }
    },
    "PushNotificationsSendSchema": {
      "type": "object",
      "properties": {
        "results": {
          "$ref": "#/definitions/results"
        }
      },
      "required": [
        "results"
      ]
    },
    "routeIds": {
      "type": "array",
      "description": "GTFS route ids to fetch ETA data for. Use routes[].gtfsId from /routes/otp or routeGtfsId from /routes/otp/pattern.",
      "minItems": 1,
      "items": {
        "type": "string",
        "description": "GTFS route ID in format agency:id (e.g., stanrta:30, rtd:150). Use routes[].gtfsId from /routes/otp or routeGtfsId from /routes/otp/pattern.",
        "pattern": "^[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+$"
      }
    },
    "OtpRouteEtaRequestSchema": {
      "type": "object",
      "properties": {
        "routeIds": {
          "$ref": "#/definitions/routeIds"
        }
      },
      "required": [
        "routeIds"
      ]
    },
    "Model145": {
      "type": "string",
      "description": "ACTIVE when the trip is in progress, UPCOMING when it has not departed yet",
      "enum": [
        "ACTIVE",
        "UPCOMING"
      ]
    },
    "dataSource": {
      "type": "string",
      "description": "REALTIME when any stop time came from the agency realtime feed, SCHEDULED when every time is from the static timetable",
      "enum": [
        "REALTIME",
        "SCHEDULED"
      ]
    },
    "Model146": {
      "type": "object",
      "description": "Stop information",
      "properties": {
        "gtfsId": {
          "type": "string",
          "description": "Stop GTFS identifier"
        },
        "name": {
          "type": "string",
          "description": "Stop name"
        },
        "lat": {
          "type": "number",
          "description": "Stop latitude",
          "minimum": -90,
          "maximum": 90
        },
        "lon": {
          "type": "number",
          "description": "Stop longitude",
          "minimum": -180,
          "maximum": 180
        }
      },
      "required": [
        "gtfsId",
        "name",
        "lat",
        "lon"
      ]
    },
    "Model147": {
      "type": "object",
      "properties": {
        "stop": {
          "$ref": "#/definitions/Model146"
        },
        "stopPosition": {
          "type": "integer",
          "description": "Stop position within the trip"
        },
        "scheduledArrival": {
          "type": "integer",
          "description": "Scheduled arrival in seconds since service day midnight"
        },
        "scheduledDeparture": {
          "type": "integer",
          "description": "Scheduled departure in seconds since service day midnight"
        },
        "realtimeArrival": {
          "type": "integer",
          "description": "Realtime arrival in seconds since service day midnight"
        },
        "realtimeDeparture": {
          "type": "integer",
          "description": "Realtime departure in seconds since service day midnight"
        },
        "arrivalDelay": {
          "type": "integer",
          "description": "Arrival delay in seconds"
        },
        "departureDelay": {
          "type": "integer",
          "description": "Departure delay in seconds"
        },
        "realtime": {
          "type": "boolean",
          "description": "True when realtime data is applied"
        },
        "realtimeState": {
          "type": "string",
          "description": "OTP realtime state for the stop time"
        },
        "timepoint": {
          "type": "boolean",
          "description": "True when the stop is a timepoint"
        },
        "serviceDay": {
          "type": "integer",
          "description": "Unix timestamp in seconds for service day midnight"
        },
        "scheduledArrivalTime": {
          "type": "string",
          "description": "Scheduled arrival as ISO timestamp",
          "x-format": {
            "isoDate": true
          }
        },
        "scheduledDepartureTime": {
          "type": "string",
          "description": "Scheduled departure as ISO timestamp",
          "x-format": {
            "isoDate": true
          }
        },
        "realtimeArrivalTime": {
          "type": "string",
          "description": "Realtime arrival as ISO timestamp",
          "x-format": {
            "isoDate": true
          }
        },
        "realtimeDepartureTime": {
          "type": "string",
          "description": "Realtime departure as ISO timestamp",
          "x-format": {
            "isoDate": true
          }
        }
      },
      "required": [
        "stop",
        "stopPosition",
        "scheduledArrival",
        "scheduledDeparture",
        "realtimeArrival",
        "realtimeDeparture",
        "arrivalDelay",
        "departureDelay",
        "realtime",
        "realtimeState",
        "timepoint",
        "serviceDay",
        "scheduledArrivalTime",
        "scheduledDepartureTime",
        "realtimeArrivalTime",
        "realtimeDepartureTime"
      ]
    },
    "allStopEtas": {
      "type": "array",
      "description": "All stop ETA data returned for the trip",
      "items": {
        "$ref": "#/definitions/Model147"
      }
    },
    "remainingStopEtas": {
      "type": "array",
      "description": "Current and upcoming stop ETA data; every stop for an UPCOMING trip, since none has been served",
      "items": {
        "$ref": "#/definitions/Model147"
      }
    },
    "stopEtas": {
      "type": "array",
      "description": "Legacy alias for remainingStopEtas; only present on ACTIVE trips",
      "items": {
        "$ref": "#/definitions/Model147"
      }
    },
    "Model148": {
      "type": "object",
      "properties": {
        "gtfsId": {
          "type": "string",
          "description": "Trip GTFS identifier"
        },
        "tripHeadsign": {
          "type": "string",
          "description": "Trip headsign"
        },
        "patternCode": {
          "type": "string",
          "description": "Pattern code for the trip"
        },
        "directionId": {
          "type": "integer",
          "description": "Direction id for the trip pattern"
        },
        "serviceDate": {
          "type": "string",
          "description": "Service date in YYYYMMDD format",
          "pattern": "^\\d{8}$"
        },
        "status": {
          "$ref": "#/definitions/Model145"
        },
        "dataSource": {
          "$ref": "#/definitions/dataSource"
        },
        "startsAt": {
          "type": "string",
          "description": "Trip start time as ISO timestamp",
          "x-format": {
            "isoDate": true
          }
        },
        "startedAt": {
          "type": "string",
          "description": "Legacy alias for startsAt; prefer startsAt, which reads correctly for upcoming trips",
          "x-format": {
            "isoDate": true
          }
        },
        "endsAt": {
          "type": "string",
          "description": "Trip end time as ISO timestamp",
          "x-format": {
            "isoDate": true
          }
        },
        "allStopEtas": {
          "$ref": "#/definitions/allStopEtas"
        },
        "remainingStopEtas": {
          "$ref": "#/definitions/remainingStopEtas"
        },
        "stopEtas": {
          "$ref": "#/definitions/stopEtas"
        }
      },
      "required": [
        "gtfsId",
        "serviceDate",
        "status",
        "dataSource",
        "startsAt",
        "startedAt",
        "endsAt",
        "allStopEtas",
        "remainingStopEtas"
      ]
    },
    "activeTrips": {
      "type": "array",
      "description": "Trips in progress on the route right now",
      "items": {
        "$ref": "#/definitions/Model148"
      }
    },
    "upcomingTrips": {
      "type": "array",
      "description": "Nearest not-yet-departed trips per direction, carrying scheduled stop times so an idle route still reports when the next bus is due",
      "items": {
        "$ref": "#/definitions/Model148"
      }
    },
    "Model149": {
      "type": "object",
      "properties": {
        "routeId": {
          "type": "string",
          "description": "GTFS route identifier",
          "pattern": "^[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+$"
        },
        "shortName": {
          "type": "string",
          "description": "Short route name"
        },
        "longName": {
          "type": "string",
          "description": "Long route name"
        },
        "activeTrips": {
          "$ref": "#/definitions/activeTrips"
        },
        "upcomingTrips": {
          "$ref": "#/definitions/upcomingTrips"
        },
        "cachedAt": {
          "type": "string",
          "description": "ISO 8601 timestamp of when cached",
          "x-format": {
            "isoDate": true
          }
        }
      },
      "required": [
        "routeId",
        "activeTrips",
        "upcomingTrips",
        "cachedAt"
      ]
    },
    "Model150": {
      "type": "array",
      "description": "Realtime ETA snapshots for the requested GTFS route ids",
      "items": {
        "$ref": "#/definitions/Model149"
      }
    },
    "OtpRouteEtaResponseSchema": {
      "type": "object",
      "properties": {
        "results": {
          "$ref": "#/definitions/Model150"
        }
      },
      "required": [
        "results"
      ]
    },
    "Model151": {
      "type": "array",
      "description": "Array of GTFS route IDs. Supply routes[].gtfsId from /routes/otp or routeGtfsId from /routes/otp/pattern.",
      "items": {
        "type": "string",
        "description": "GTFS route ID in format agency:id (e.g., stanrta:30, rtd:150). Use routes[].gtfsId from /routes/otp or routeGtfsId from /routes/otp/pattern.",
        "pattern": "^[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+$"
      }
    },
    "Update user favorite OTP routes": {
      "type": "object",
      "properties": {
        "routeIds": {
          "$ref": "#/definitions/Model151"
        }
      }
    },
    "UpdateOtpRouteResponse": {
      "type": "object"
    },
    "Model152": {
      "type": "string",
      "description": "Event type",
      "enum": [
        "RouteSelected",
        "routeSelected"
      ]
    },
    "RouteEventSchema": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/Model152"
        },
        "timestamp": {
          "type": "string",
          "description": "Timestamp of the event"
        },
        "sortingIndex": {
          "type": "integer",
          "description": "The sortingIndex of the route this event relates to, required for type routeSeleted",
          "minimum": 0
        }
      },
      "required": [
        "type",
        "timestamp"
      ]
    },
    "RouteEventResponse": {
      "type": "object"
    },
    "ServiceAreaListParams": {
      "type": "object",
      "properties": {
        "at": {
          "type": "string",
          "description": "Location text string, which is comma-separated pair of latitude and longitude",
          "example": "60.17052,24.94099"
        },
        "radius": {
          "type": "number",
          "description": "Maximum distance in meters till available service area",
          "example": 5000,
          "default": 100000
        },
        "routeMode": {
          "type": "string",
          "description": "Pipe-character separated list of route modes without travel modes",
          "example": "publicTransport|bicycle|kyyti",
          "default": "kyyti|onDemand"
        }
      }
    },
    "GeoJSONType": {
      "type": "string",
      "description": "geoJSON geometry type",
      "enum": [
        "Polygon",
        "MultiPolygon"
      ]
    },
    "Model153": {
      "type": "array",
      "description": "List of ids for the services operating in the area",
      "minItems": 1,
      "items": {
        "type": "string",
        "description": "Id of the service",
        "x-format": {
          "guid": {
            "version": "uuidv4"
          }
        }
      }
    },
    "routeMode": {
      "type": "string",
      "description": "Service route mode in the area",
      "enum": [
        "walk",
        "bicycle",
        "publicTransport",
        "car",
        "kyyti",
        "onDemand"
      ]
    },
    "geoPoint": {
      "type": "array",
      "description": "geoPoint",
      "x-constraint": {
        "length": 2
      },
      "items": {
        "type": "string"
      }
    },
    "iconCoordinates": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/geoPoint"
      }
    },
    "ServiceAreaProperties": {
      "type": "object",
      "description": "Service area properties",
      "properties": {
        "name": {
          "type": "string",
          "description": "Service area name"
        },
        "services": {
          "$ref": "#/definitions/Model153"
        },
        "routeMode": {
          "$ref": "#/definitions/routeMode"
        },
        "color": {
          "type": "string",
          "description": "HEX-coded color code for service area when shown on a map",
          "example": "#2D7ACB",
          "default": "#2D7ACB",
          "pattern": "^#[A-Fa-f0-9]{6}$"
        },
        "iconRef": {
          "type": "string",
          "description": "Reference name of the area icon"
        },
        "iconCoordinates": {
          "$ref": "#/definitions/iconCoordinates"
        }
      },
      "required": [
        "name",
        "routeMode",
        "color"
      ]
    },
    "ServiceAreaGeoJSON": {
      "type": "object",
      "description": "geoJSON object describing service area",
      "properties": {
        "type": {
          "$ref": "#/definitions/GeoJSONType"
        },
        "coordinates": {
          "type": "string",
          "description": "Polygon or MultiPolygon shape describing the service area"
        },
        "properties": {
          "$ref": "#/definitions/ServiceAreaProperties"
        }
      },
      "required": [
        "type",
        "coordinates"
      ]
    },
    "nearbyAreas": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ServiceAreaGeoJSON"
      }
    },
    "serviceAreaListResponse": {
      "type": "object",
      "properties": {
        "nearbyAreas": {
          "$ref": "#/definitions/nearbyAreas"
        }
      },
      "required": [
        "nearbyAreas"
      ]
    },
    "GetBatchProductInput": {
      "type": "object",
      "properties": {
        "products": {
          "$ref": "#/definitions/GetBatchProductInputArray"
        }
      }
    },
    "Model154": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Product"
      }
    },
    "Price": {
      "type": "object",
      "description": "Breakdown of price",
      "properties": {
        "formattedPrice": {
          "type": "string",
          "description": "Ready formatted price to show as is in the interface"
        },
        "total": {
          "type": "number",
          "description": "Total price including tax"
        },
        "currency": {
          "$ref": "#/definitions/currency"
        },
        "product": {
          "type": "number",
          "description": "Product's price without value added tax"
        },
        "vat": {
          "type": "number",
          "description": "Value added tax of the price"
        },
        "changeWarning": {
          "type": "boolean",
          "description": "True if the price changed since the original offered price"
        }
      }
    },
    "GetBatchProductOutput": {
      "type": "object",
      "properties": {
        "products": {
          "$ref": "#/definitions/Model154"
        },
        "totalPrice": {
          "$ref": "#/definitions/Price"
        }
      }
    },
    "Model155": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/BasicTerms"
      }
    },
    "Model156": {
      "type": "object",
      "properties": {
        "terms": {
          "$ref": "#/definitions/Model155"
        }
      }
    },
    "Terms": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "URL of terms to refer",
          "x-format": {
            "uri": true
          }
        },
        "version": {
          "type": "string",
          "description": "Version of terms to refer"
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "acceptedAt": {
          "type": "string",
          "description": "Timestamp of acceptance (ISO 8601 datetime)"
        }
      },
      "required": [
        "url",
        "version",
        "userId",
        "acceptedAt"
      ]
    },
    "accepted": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Terms"
      }
    },
    "AcceptedTermsSchema": {
      "type": "object",
      "properties": {
        "accepted": {
          "$ref": "#/definitions/accepted"
        }
      },
      "required": [
        "accepted"
      ]
    },
    "Model157": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/BasicTerms"
      }
    },
    "Model158": {
      "type": "object",
      "properties": {
        "terms": {
          "$ref": "#/definitions/Model157"
        }
      }
    },
    "RevokedTerms": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "URL of terms to refer",
          "x-format": {
            "uri": true
          }
        },
        "version": {
          "type": "string",
          "description": "Version of terms to refer"
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "acceptedAt": {
          "type": "string",
          "description": "Timestamp of acceptance (ISO 8601 datetime)"
        },
        "revokedAt": {
          "type": "string",
          "description": "Timestamp of revocation (ISO 8601 datetime)"
        }
      },
      "required": [
        "url",
        "version",
        "userId",
        "acceptedAt",
        "revokedAt"
      ]
    },
    "revoked": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/RevokedTerms"
      }
    },
    "RevokedTermsSchema": {
      "type": "object",
      "properties": {
        "revoked": {
          "$ref": "#/definitions/revoked"
        }
      },
      "required": [
        "revoked"
      ]
    },
    "body": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string",
          "description": "Password to change"
        }
      },
      "required": [
        "password"
      ]
    },
    "payloadPhone": {
      "type": "object",
      "properties": {
        "phoneNumber": {
          "type": "string",
          "description": "Phone number to add"
        },
        "primary": {
          "type": "boolean",
          "description": "Set this as the primary number of the user. By default, last added number is set as primary.",
          "default": true
        }
      }
    },
    "PhoneBasicSchema": {
      "type": "object",
      "properties": {
        "phoneNumber": {
          "type": "string",
          "description": "Mobile phone number"
        },
        "primary": {
          "type": "boolean",
          "description": "Marks the primary phone number"
        },
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "id": {
          "type": "string",
          "description": "Phone number id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "phoneNumber",
        "primary",
        "userId",
        "id"
      ]
    },
    "Model159": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Email address to add",
          "x-format": {
            "email": true
          }
        },
        "primary": {
          "type": "boolean",
          "description": "Deprecated flag which is ignored"
        }
      },
      "required": [
        "email"
      ]
    },
    "AddEmailSchema": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "email": {
          "type": "string",
          "description": "Added email address",
          "x-format": {
            "email": true
          }
        },
        "id": {
          "type": "string",
          "description": "Id of the added email address",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        }
      },
      "required": [
        "userId",
        "email",
        "id"
      ]
    },
    "Model160": {
      "type": "object",
      "description": "Place to favourite",
      "properties": {
        "name": {
          "type": "string",
          "description": "Place name"
        },
        "city": {
          "type": "string",
          "description": "Place city"
        },
        "type": {
          "$ref": "#/definitions/PlaceType"
        },
        "id": {
          "type": "string",
          "description": "Unique id of place"
        },
        "gid": {
          "type": "string",
          "description": "Global identifier consisting a data source and a record identifier",
          "example": "openstreetmap:address:298372335"
        },
        "stopCode": {
          "type": "string",
          "description": "Public stop code",
          "example": "HELK"
        },
        "platformCode": {
          "type": "string",
          "description": "Platform code inside station",
          "example": "20"
        },
        "departureTime": {
          "$ref": "#/definitions/Time"
        },
        "arrivalTime": {
          "$ref": "#/definitions/Model4"
        },
        "stopId": {
          "type": "string",
          "description": "Public stop id"
        },
        "location": {
          "$ref": "#/definitions/PlaceLocation"
        },
        "address": {
          "type": "string",
          "description": "Place address"
        },
        "country": {
          "type": "string",
          "description": "Place country"
        },
        "title": {
          "type": "string",
          "description": "Place title. More or less synonymous to name."
        },
        "subtitle": {
          "type": "string",
          "description": "Place subtitle. Either consists of the postal code with city info or duplicates address."
        },
        "categories": {
          "$ref": "#/definitions/categories"
        }
      },
      "required": [
        "location"
      ]
    },
    "Model161": {
      "type": "object",
      "properties": {
        "place": {
          "$ref": "#/definitions/Model160"
        }
      },
      "required": [
        "place"
      ]
    },
    "CodeDataAdd": {
      "type": "object",
      "properties": {
        "codeData": {
          "$ref": "#/definitions/CodeDataSchema"
        }
      }
    },
    "reason": {
      "type": "string",
      "description": "The reason for product cancellation",
      "enum": [
        "user",
        "transportNotAvailable",
        "operational",
        "noshow"
      ]
    },
    "actor": {
      "type": "string",
      "description": "Who initiated the product cancellation",
      "enum": [
        "user",
        "integration",
        "admin"
      ]
    },
    "ProductCancelRequest": {
      "type": "object",
      "properties": {
        "reason": {
          "$ref": "#/definitions/reason"
        },
        "actor": {
          "$ref": "#/definitions/actor"
        },
        "description": {
          "type": "string",
          "description": "Free-form description or reason for product cancellation"
        }
      },
      "required": [
        "reason",
        "actor"
      ]
    },
    "Model162": {
      "type": "object",
      "properties": {
        "orderProductsIdx": {
          "type": "integer",
          "description": "Order products index",
          "minimum": 0
        },
        "cancellation": {
          "$ref": "#/definitions/ProductCancelRequest"
        }
      }
    },
    "productCancellations": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "$ref": "#/definitions/Model162"
      }
    },
    "Model163": {
      "type": "object",
      "properties": {
        "productCancellations": {
          "$ref": "#/definitions/productCancellations"
        }
      },
      "required": [
        "productCancellations"
      ]
    },
    "CancelProductBatchResponse": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "Model164": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Error"
      }
    },
    "Model165": {
      "type": "object",
      "properties": {
        "indices": {
          "$ref": "#/definitions/CancelProductBatchResponse"
        },
        "errors": {
          "$ref": "#/definitions/Model164"
        }
      }
    },
    "PaymentConfirmInput": {
      "type": "object",
      "properties": {
        "returnUrl": {
          "type": "string",
          "description": "If payment requires authentication, use custom 3DSecure auth",
          "x-format": {
            "uri": true
          }
        }
      }
    },
    "ReceiptSendPayload": {
      "type": "object"
    },
    "Model166": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "x-format": {
            "uri": true
          }
        }
      }
    },
    "Model167": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string",
          "description": "Refresh token to get new access token"
        }
      },
      "required": [
        "token"
      ]
    },
    "ProductMessageRequest": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Message that needs to be send."
        }
      },
      "required": [
        "message"
      ]
    },
    "AdditionalDetails": {
      "type": "object"
    },
    "AdditionalDetailsPayload": {
      "type": "object",
      "properties": {
        "additionalDetails": {
          "$ref": "#/definitions/AdditionalDetails"
        }
      }
    },
    "RequiredDetails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "SetGroupInfoResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "id of the group membership row",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "userId": {
          "type": "string",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "groupId": {
          "type": "string",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "additionalDetails": {
          "$ref": "#/definitions/AdditionalDetails"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "requiredDetails": {
          "$ref": "#/definitions/RequiredDetails"
        }
      }
    },
    "Model168": {
      "type": "object",
      "properties": {
        "nonce": {
          "type": "string",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "verificationCode": {
          "type": "string"
        }
      }
    },
    "Model169": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "allowMarketing": {
          "type": "boolean",
          "description": "Whether to allow marketing emails"
        }
      }
    },
    "UserBasicSchema": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "allowMarketing": {
          "type": "boolean",
          "description": "Whether to allow marketing emails"
        },
        "id": {
          "type": "string",
          "description": "User id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "properties": {
          "$ref": "#/definitions/UserPropertiesSchema"
        },
        "isSuperAdmin": {
          "type": "boolean",
          "description": "Whether the user account has admin rights"
        },
        "tenantOrganizationId": {
          "type": "string",
          "description": "The organization id of the tenant this user belongs to"
        },
        "createdAt": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Account last update timestamp (ISO 8601 datetime)"
        }
      },
      "required": [
        "firstName",
        "lastName",
        "allowMarketing",
        "id",
        "isSuperAdmin",
        "createdAt",
        "updatedAt"
      ]
    },
    "Model170": {
      "type": "object",
      "properties": {
        "notificationPreference": {
          "$ref": "#/definitions/notificationPreference"
        }
      },
      "required": [
        "notificationPreference"
      ]
    },
    "Model171": {
      "type": "object",
      "properties": {
        "primary": {
          "type": "boolean",
          "description": "Set this as the primary number of the user",
          "enum": [
            true
          ]
        }
      },
      "required": [
        "primary"
      ]
    },
    "object": {
      "type": "string",
      "description": "Object of the operation",
      "enum": [
        "customer"
      ]
    },
    "accountDeleted": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Account id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "userId": {
          "type": "string",
          "description": "Tuup user id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "paymentOperatorId": {
          "type": "string",
          "description": "Payment operator id",
          "x-format": {
            "guid": {
              "version": "uuidv4"
            }
          }
        },
        "loginIdentity": {
          "type": "string",
          "description": "Login identity for external operator, e.g. email or login name"
        },
        "virtual": {
          "type": "boolean",
          "description": "Whether the account is virtual"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the account is active"
        },
        "name": {
          "type": "string",
          "example": "Stripe virtual account"
        },
        "createdAt": {
          "type": "string",
          "description": "Account creation timestamp (ISO 8601 datetime)"
        },
        "updatedAt": {
          "type": "string",
          "description": "Account last update timestamp (ISO 8601 datetime)"
        },
        "object": {
          "$ref": "#/definitions/object"
        },
        "deleted": {
          "type": "boolean",
          "description": "Whether account deletion has succeeded"
        }
      },
      "required": [
        "id",
        "userId",
        "paymentOperatorId",
        "loginIdentity",
        "virtual",
        "enabled",
        "name",
        "createdAt",
        "updatedAt",
        "deleted"
      ]
    },
    "deleted": {
      "type": "array",
      "description": "List of deleted accounts",
      "items": {
        "$ref": "#/definitions/accountDeleted"
      }
    },
    "PaymentAccountsDeletedSchema": {
      "type": "object",
      "properties": {
        "deleted": {
          "$ref": "#/definitions/deleted"
        }
      },
      "required": [
        "deleted"
      ]
    },
    "DeletedPaymentMethodSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Base64-encoded details the deleted payment method"
        },
        "type": {
          "type": "string",
          "description": "Type of the deleted payment method"
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "Model172": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Any user email for verification",
          "x-format": {
            "email": true
          }
        }
      },
      "required": [
        "email"
      ]
    },
    "Model173": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "description": "User Id",
        "x-format": {
          "guid": {
            "version": "uuidv4"
          }
        }
      }
    },
    "DeletedUserSchema": {
      "type": "object",
      "properties": {
        "deleted": {
          "$ref": "#/definitions/Model173"
        }
      },
      "required": [
        "deleted"
      ]
    },
    "Model174": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "description": "Any user email for verification",
          "x-format": {
            "email": true
          }
        },
        "reason": {
          "type": "string",
          "description": "Optional log message for reason of deletion"
        },
        "clearFromOrders": {
          "type": "boolean",
          "description": "True if personal data should also be deleted from orders",
          "default": false
        }
      },
      "required": [
        "email"
      ]
    },
    "Payload": {
      "type": "object"
    },
    "ProductPatchExtraInfo": {
      "type": "object",
      "description": "Extra information, format depends on product"
    }
  },
  "x-alt-definitions": {
    "geoPoint": {
      "type": "array",
      "description": "geoPoint",
      "x-constraint": {
        "length": 2
      },
      "items": {
        "type": "string"
      }
    },
    "Shape": {
      "type": "array",
      "minItems": 2,
      "items": {
        "$ref": "#/x-alt-definitions/geoPoint"
      }
    }
  }
}