---
openapi: 3.0.3
info:
  title: Solvice Maps Routing API
  version: 1.0.0
servers:
- url: https://routing.solvice.io
  description: Production server
security:
- apikey: []
paths:
  /cube:
    get:
      tags:
      - Cube Controller
      parameters:
      - name: page
        in: query
        schema:
          format: int32
          minimum: 0
          type: integer
      - name: size
        in: query
        schema:
          format: int32
          maximum: 100
          minimum: 1
          type: integer
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CubePageDto'
    post:
      tags:
      - Cube Controller
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCubeDto'
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CubeDto'
  /cube/{id}:
    get:
      tags:
      - Cube Controller
      parameters:
      - name: id
        in: path
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CubeDto'
  /cube/{id}/progress:
    get:
      tags:
      - Cube Controller
      parameters:
      - name: id
        in: path
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CubeProgressDto'
  /cube/{id}/response:
    get:
      tags:
      - Cube Controller
      parameters:
      - name: id
        in: path
        description: Cube request id.
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "200":
          description: Get cube response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CubeResponseDto'
  /cube/{id}/response/url:
    get:
      tags:
      - Cube Controller
      parameters:
      - name: id
        in: path
        description: Cube request id.
        required: true
        schema:
          format: int64
          type: integer
      - name: expiresInMinutes
        in: query
        schema:
          format: int64
          type: integer
          nullable: true
      responses:
        "302":
          description: Redirect to cube response in Cloud Storage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CubeResponseDto'
  /health:
    get:
      tags:
      - Health Controller
      responses:
        "200":
          description: OK
  /route:
    post:
      tags:
      - Route Controller
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRouteDto'
      responses:
        "200":
          description: Route created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteDto'
        "400":
          description: Bad request - Invalid input parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "429":
          description: Too many requests - Rate limit exceeded
          headers:
            X-RateLimit-Limit:
              description: The maximum number of requests allowed per time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests remaining in the current time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Reset:
              description: The time at which the current rate limit window resets
                in UTC epoch seconds
              style: simple
              schema:
                type: integer
            Retry-After:
              description: The number of seconds to wait before making another request
              style: simple
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "502":
          description: Bad gateway - External service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "503":
          description: Service unavailable - External service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "504":
          description: Gateway timeout - Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /table:
    get:
      tags:
      - Table Controller
      parameters:
      - name: page
        in: query
        schema:
          format: int32
          minimum: 0
          type: integer
      - name: size
        in: query
        schema:
          format: int32
          maximum: 100
          minimum: 1
          type: integer
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TablePageDto'
    post:
      tags:
      - Table Controller
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTableDto'
      responses:
        "201":
          description: Table created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableDto'
        "400":
          description: Bad request - Invalid input parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "429":
          description: Too many requests - Rate limit exceeded
          headers:
            X-RateLimit-Limit:
              description: The maximum number of requests allowed per time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests remaining in the current time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Reset:
              description: The time at which the current rate limit window resets
                in UTC epoch seconds
              style: simple
              schema:
                type: integer
            Retry-After:
              description: The number of seconds to wait before making another request
              style: simple
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /table/sync:
    post:
      tags:
      - Table Controller
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTableDto'
      responses:
        "200":
          description: Get table response directly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableResponseDto'
        "400":
          description: Bad request - Invalid input parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "429":
          description: Too many requests - Rate limit exceeded
          headers:
            X-RateLimit-Limit:
              description: The maximum number of requests allowed per time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests remaining in the current time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Reset:
              description: The time at which the current rate limit window resets
                in UTC epoch seconds
              style: simple
              schema:
                type: integer
            Retry-After:
              description: The number of seconds to wait before making another request
              style: simple
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "502":
          description: Bad gateway - External service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "503":
          description: Service unavailable - External service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "504":
          description: Gateway timeout - Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /table/{id}:
    get:
      tags:
      - Table Controller
      parameters:
      - name: id
        in: path
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableDto'
  /table/{id}/progress:
    get:
      tags:
      - Table Controller
      parameters:
      - name: id
        in: path
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableProgressDto'
  /table/{id}/request:
    get:
      tags:
      - Table Controller
      parameters:
      - name: id
        in: path
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "200":
          description: Get table request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableRequestDto'
  /table/{id}/response:
    get:
      tags:
      - Table Controller
      parameters:
      - name: id
        in: path
        description: Table request id.
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "200":
          description: Get table response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableResponseDto'
  /table/{id}/response/url:
    get:
      tags:
      - Table Controller
      parameters:
      - name: id
        in: path
        description: Table request id.
        required: true
        schema:
          format: int64
          type: integer
      responses:
        "302":
          description: Redirect to table response in Cloud Storage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableResponseDto'
  /test/error/400:
    get:
      tags:
      - Test Error Controller
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: string
  /test/error/404:
    get:
      tags:
      - Test Error Controller
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: string
  /test/error/429:
    get:
      tags:
      - Test Error Controller
      responses:
        "200":
          description: OK
  /test/error/500:
    get:
      tags:
      - Test Error Controller
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: string
  /topics/table-response:
    post:
      tags:
      - Pubsub Controller
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PubsubEvent'
      responses:
        "200":
          description: OK
  /trip:
    post:
      tags:
      - Trip Controller
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTripDto'
      responses:
        "201":
          description: Trip created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TripDto'
        "400":
          description: Bad request - Invalid input parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "429":
          description: Too many requests - Rate limit exceeded
          headers:
            X-RateLimit-Limit:
              description: The maximum number of requests allowed per time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests remaining in the current time window
              style: simple
              schema:
                type: integer
            X-RateLimit-Reset:
              description: The time at which the current rate limit window resets
                in UTC epoch seconds
              style: simple
              schema:
                type: integer
            Retry-After:
              description: The number of seconds to wait before making another request
              style: simple
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "502":
          description: Bad gateway - External service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "503":
          description: Service unavailable - External service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        "504":
          description: Gateway timeout - Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateCubeDto:
      description: Cube Dto
      required:
      - coordinates
      type: object
      properties:
        coordinates:
          description: "The coordinates this request will use, coordinates as [{lon},{lat}]\
            \ values, in decimal degrees."
          minItems: 2
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        sources:
          description: "An array of index elements (0 <= integer < #coordinates) to\
            \ use location with given index as source. Default is to use all."
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        destinations:
          description: "An array of index elements (0 <= integer < #coordinates) to\
            \ use location with given index as destination. Default is to use all."
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        vehicleType:
          description: The vehicle type for which the table is requested
          type: string
          allOf:
          - $ref: '#/components/schemas/VehicleType'
          nullable: true
        date:
          description: The date for which you want to calculate the cube. This will
            take into account predictive travel time based on TomTom data. Format
            YYYY-MM-DD. Default is current date.
          type: string
          allOf:
          - $ref: '#/components/schemas/LocalDate'
          nullable: true
        responseType:
          description: "Specifies the type of response to return. Can be 'coefficients'\
            \ (return polynomial coefficients, default) or 'matrix' (return travel\
            \ time matrices)."
          type: string
          nullable: true
      example:
        coordinates:
        - - 4.9
          - 50.2
        - - 4.8
          - 50.4
        - - 5.0
          - 50.9
        - - 5.05
          - 50.9
        sources:
        - 0
        - 1
        - 2
        - 3
        destinations:
        - 0
        - 1
        - 2
        - 3
    CreateRouteDto:
      description: Route Dto
      required:
      - coordinates
      type: object
      properties:
        coordinates:
          description: "The coordinates this request will use, coordinates as [{lon},{lat}]\
            \ values, in decimal degrees."
          minItems: 2
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        bearings:
          description: "Limits the search to segments with given bearing in degrees\
            \ towards true north in clockwise direction. Can be null or an array of\
            \ [{value},{range}] with integer 0 .. 360,integer 0 .. 180."
          type: array
          items:
            type: array
            items:
              format: int32
              type: integer
          nullable: true
        radiuses:
          description: Limits the coordinate snapping to streets in the given radius
            in meters. Can be null double >= 0.
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        hints:
          description: Hints for the coordinate snapping. Array of base64 encoded
            strings.
          type: array
          items:
            type: string
          nullable: true
        generate_hints:
          description: "Whether or not adds a Hint to the response which can be used\
            \ in subsequent requests. (optional, default true)"
          type: boolean
          nullable: true
        alternatives:
          format: int32
          description: "Search for up to this many alternative routes. Please note\
            \ that even if alternative routes are requested, a result cannot be guaranteed.\
            \ (optional, default 0)"
          maximum: 10
          minimum: 0
          type: integer
          nullable: true
        steps:
          description: "Return route steps for each route leg. (optional, default\
            \ false)"
          type: boolean
          nullable: true
        annotations:
          description: "An array with strings of duration, nodes, distance, weight,\
            \ datasources, speed (optional)"
          type: array
          items:
            type: string
          nullable: true
        geometries:
          description: "Returned route geometry format (influences overview and per\
            \ step). Can also be geojson. (optional, default polyline)"
          pattern: polyline|geojson|polyline6
          type: string
          nullable: true
        overview:
          description: "Add overview geometry either full, simplified according to\
            \ highest zoom level it could be display on, or not at all (false). (optional,\
            \ default simplified)"
          pattern: full|simplified|false
          type: string
          nullable: true
        continue_straight:
          description: Forces the route to keep going straight at waypoints and don't
            do a uturn even if it would be faster. Default value depends on the profile.
          type: boolean
          nullable: true
        approaches:
          description: "Keep waypoints on curb side. Can be null (unrestricted, default)\
            \ or curb."
          type: array
          items:
            type: string
          nullable: true
        waypoints:
          description: "Indices to coordinates to treat as waypoints. If not supplied,\
            \ all coordinates are waypoints. Must include first and last coordinate\
            \ index"
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        snapping:
          pattern: default|any
          type: string
          nullable: true
        vehicleType:
          description: The vehicle type for which the table is requested
          type: string
          allOf:
          - $ref: '#/components/schemas/VehicleType'
          nullable: true
        routingEngine:
          description: The vehicle type for which the table is requested
          type: string
          allOf:
          - $ref: '#/components/schemas/RoutingEngine'
          nullable: true
        departureTime:
          description: The departure time for which you want to calculate the route.
            This will take into account predictive travel time based on TomTom data.
          type: string
          allOf:
          - $ref: '#/components/schemas/LocalDateTime'
          nullable: true
      example:
        coordinates:
        - - 4.9
          - 50.2
        - - 4.8
          - 50.4
    CreateTableDto:
      description: Table Dto
      required:
      - coordinates
      type: object
      properties:
        coordinates:
          description: "The coordinates this request will use, coordinates as [{lon},{lat}]\
            \ values, in decimal degrees."
          minItems: 2
          type: array
          items:
            type: array
            items:
              format: double
              type: number
        sources:
          description: "An array of index elements (0 <= integer < #coordinates) to\
            \ use location with given index as source. Default is to use all."
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        destinations:
          description: "An array of index elements (0 <= integer < #coordinates) to\
            \ use location with given index as destination. Default is to use all."
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        annotations:
          description: "Return the requested table or tables in response. Can be ['duration']\
            \ (return the duration matrix, default) or ['duration', distance'] (return\
            \ both the duration matrix and the distance matrix)."
          type: array
          items:
            type: string
          nullable: true
        vehicleType:
          description: The vehicle type for which the table is requested
          type: string
          allOf:
          - $ref: '#/components/schemas/VehicleType'
          nullable: true
        engine:
          description: "Routing data engine being used: OpenStreetMap (OSM) or TomTom."
          type: string
          allOf:
          - $ref: '#/components/schemas/RoutingEngine'
          nullable: true
        departureTime:
          description: The departure time (ISO8601) for which you want to calculate
            the route. This will take into account predictive travel time based on
            TomTom data.
          type: string
          allOf:
          - $ref: '#/components/schemas/LocalDateTime'
          nullable: true
      example:
        coordinates:
        - - 4.9
          - 50.2
        - - 4.8
          - 50.4
        - - 5.0
          - 50.9
        - - 5.05
          - 50.9
        sources:
        - 0
        - 1
        - 2
        - 3
        destinations:
        - 0
        - 1
        - 2
        - 3
    CreateTripDto:
      required:
      - coordinates
      type: object
      properties:
        coordinates:
          description: "The coordinates this request will use, coordinates as [{lon},{lat}]\
            \ values, in decimal degrees."
          minItems: 2
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        bearings:
          description: "Limits the search to segments with given bearing in degrees\
            \ towards true north in clockwise direction. Can be null or an array of\
            \ [{value},{range}] with integer 0 .. 360,integer 0 .. 180."
          type: array
          items:
            type: array
            items:
              format: int32
              type: integer
          nullable: true
        radiuses:
          description: Limits the coordinate snapping to streets in the given radius
            in meters. Can be null double >= 0.
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        hints:
          description: Hints for the coordinate snapping. Array of base64 encoded
            strings.
          type: array
          items:
            type: string
          nullable: true
        generate_hints:
          description: "Whether or not adds a Hint to the response which can be used\
            \ in subsequent requests. (optional, default true)"
          type: boolean
          nullable: true
        steps:
          description: "Return route steps for each route. (optional, default false)"
          type: boolean
          nullable: true
        annotations:
          description: "An array with strings of duration, nodes, distance, weight,\
            \ datasources, speed or boolean for enabling/disabling all. (optional,\
            \ default false)"
          type: array
          items:
            type: string
          nullable: true
        geometries:
          description: "Returned route geometry format (influences overview and per\
            \ step). Can also be geojson. (optional, default polyline)"
          pattern: polyline|geojson|polyline6
          type: string
          nullable: true
        overview:
          description: "Add overview geometry either full, simplified (optional, default\
            \ simplified)"
          pattern: full|simplified|false
          type: string
          nullable: true
        roundtrip:
          description: "Return route is a roundtrip. (optional, default true)"
          type: boolean
          nullable: true
        source:
          description: "Return route starts at `any` or `first` coordinate. (optional,\
            \ default `any`)"
          pattern: any|first
          type: string
          example: any
          nullable: true
        destination:
          description: "Return route ends at any or last coordinate. (optional, default\
            \ any)"
          pattern: any|first
          type: string
          example: any
          nullable: true
        approaches:
          description: "Keep waypoints on curb side. Can be null (unrestricted, default)\
            \ or curb."
          pattern: unrestricted|curb
          type: string
          example: curb
          nullable: true
        snapping:
          description: "Keep waypoints on curb side. Can be null (unrestricted, default)\
            \ or curb."
          pattern: default|any
          type: string
          example: curb
          nullable: true
        vehicleType:
          description: The vehicle type for which the table is requested
          type: string
          allOf:
          - $ref: '#/components/schemas/VehicleType'
          nullable: true
        engine:
          description: "Routing data engine being used: OpenStreetMap (OSM) or TomTom."
          type: string
          allOf:
          - $ref: '#/components/schemas/RoutingEngine'
          nullable: true
        departureTime:
          description: The departure time for which you want to calculate the route.
            This will take into account predictive travel time based on TomTom data.
          type: string
          allOf:
          - $ref: '#/components/schemas/LocalDateTime'
          example: 2020-01-01T12:00:00
          nullable: true
    CubeDto:
      type: object
      properties:
        id:
          format: int64
          description: Cube id.
          type: integer
        status:
          description: "Cube status (IN_PROGRESS, SUCCEEDED, FAILED)."
          type: string
          allOf:
          - $ref: '#/components/schemas/Status'
          nullable: true
        errorMessage:
          description: Error message if the Cube failed.
          type: string
          nullable: true
        responseType:
          description: "Type of the Cube response, e.g., 'coefficients'."
          type: string
          nullable: true
        hash:
          format: int32
          description: Hash of the Cube request
          type: integer
          nullable: true
        cubeResponseId:
          format: int64
          description: Cube response id.
          type: integer
        updatedAt:
          description: Last update time of the Cube.
          type: string
          nullable: true
        createdAt:
          description: Creation time of the Cube.
          type: string
          nullable: true
    CubePageDto:
      required:
      - embedded
      - page
      type: object
      properties:
        embedded:
          $ref: '#/components/schemas/CubePageEmbeddedDto'
        page:
          $ref: '#/components/schemas/PageDto'
    CubePageEmbeddedDto:
      required:
      - cubes
      type: object
      properties:
        cubes:
          type: array
          items:
            $ref: '#/components/schemas/CubeDto'
    CubeProgressDto:
      type: object
      properties:
        nrOfSucceededSlices:
          format: int64
          description: "Cube requests get split up into multiple Table requests, one\
            \ for each slice. `nrOfSucceededSlices` is the number of slice requests\
            \ that succeeded."
          type: integer
          example: 8
          nullable: true
        nrOfFailedSlices:
          format: int64
          description: "Cube requests get split up into multiple Table requests, one\
            \ for each slice. `nrOfFailedSlices` is the number of slice requests that\
            \ failed."
          type: integer
          example: 0
          nullable: true
        nrOfSlices:
          format: int64
          description: "Cube requests get split up into multiple Table requests, one\
            \ for each slice. `nrOfSlices` is the total number of slice requests."
          type: integer
          example: 8
          nullable: true
    CubeResponseDto:
      description: Cube Response
      type: object
      properties:
        tableId:
          format: int64
          description: Table response id. Not to be confused with table request id.
          type: integer
        durations:
          description: Time distance matrix. In order of sources to destinations indexes
            in request.
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        distances:
          description: Distance matrix. In order of sources to destinations indexes
            in request.
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        sources:
          description: Actual sources snapped to map.
          type: array
          items:
            $ref: '#/components/schemas/Waypoint'
          nullable: true
        destinations:
          description: Actual destinations snapped to map.
          type: array
          items:
            $ref: '#/components/schemas/Waypoint'
          nullable: true
        durationSlices:
          description: Time distance matrix. In order of sources to destinations indexes
            in request.
          type: array
          items:
            type: array
            items:
              type: array
              items:
                format: double
                type: number
          nullable: true
        coefficients:
          description: Travel Time cube. In order of sources to destinations indexes
            in request. Inner array is list of 6 coefficients.
          type: array
          items:
            type: array
            items:
              type: array
              items:
                format: double
                type: number
          nullable: true
      example:
        destinations:
        - hint: eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe
          distance: 54.20808645369059
          name: Avenue de la Restauration
          location:
          - 4.899732
          - 50.200456
        - hint: o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe
          distance: 483.4921257061384
          name: Route des Trois Communes
          location:
          - 4.794387
          - 50.397549
        - hint: WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe
          distance: 202.89814553989248
          name: Wittebos
          location:
          - 5.002787
          - 50.900473
        - hint: GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe
          distance: 10.496399718824598
          name: Tiensestraat
          location:
          - 5.050105
          - 50.899933
        coordinates:
        - - 0
          - 1976.1
          - 5772.3
          - 5642.6
        - - 2010.2
          - 0
          - 4783.9
          - 4654.2
        - - 5817.2
          - 4797.4
          - 0
          - 508.6
        - - 5705.3
          - 4685.5
          - 530.2
          - 0
        sources:
        - hint: eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe
          distance: 54.20808645369059
          name: Avenue de la Restauration
          location:
          - 4.899732
          - 50.200456
        - hint: o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe
          distance: 483.4921257061384
          name: Route des Trois Communes
          location:
          - 4.794387
          - 50.397549
        - hint: WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe
          distance: 202.89814553989248
          name: Wittebos
          location:
          - 5.002787
          - 50.900473
        - hint: GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe
          distance: 10.496399718824598
          name: Tiensestraat
          location:
          - 5.050105
          - 50.899933
    ErrorResponse:
      required:
      - code
      - message
      - timestamp
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        timestamp:
          $ref: '#/components/schemas/Instant'
    Instant:
      format: date-time
      type: string
      example: 2022-03-10T16:15:50Z
    LocalDate:
      format: date
      type: string
      example: 2022-03-10
    LocalDateTime:
      format: date-time
      type: string
      example: 2022-03-10T12:15:50
    PageDto:
      type: object
      properties:
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
    PubsubEvent:
      type: object
      properties:
        message:
          type: object
          allOf:
          - $ref: '#/components/schemas/PubsubMessage'
          nullable: true
        subscription:
          type: string
          nullable: true
    PubsubMessage:
      type: object
      properties:
        data:
          type: string
          nullable: true
        messageId:
          type: string
          nullable: true
    Route:
      type: object
      properties:
        distance:
          format: double
          description: "The distance traveled by the route, in `float` meters."
          type: number
          nullable: true
        duration:
          format: double
          description: "The estimated travel time, in `float` number of seconds."
          type: number
          nullable: true
        geometry:
          description: "The whole geometry of the route value depending on overview\
            \ parameter, format depending on the geometries parameter. See RouteStep's\
            \ geometry field for a parameter documentation."
          type: string
          nullable: true
        legs:
          description: Represents a route between two waypoints.
          type: array
          items:
            $ref: '#/components/schemas/RouteLeg'
          nullable: true
    RouteDto:
      description: Route response
      type: object
      properties:
        routes:
          description: Represents a route through (potentially multiple) waypoints.
          type: array
          items:
            $ref: '#/components/schemas/Route'
          nullable: true
        waypoints:
          description: List of waypoints to get from A to B.
          type: array
          items:
            $ref: '#/components/schemas/Waypoint'
          nullable: true
      example:
        routes:
        - geometry: "{wkqHi~{\\tLb\\uEvH{mA{`@{~Bnr@gSwKkQsp@iDkjBsn@uS}rAtr@ccBt}AuhBxEal@_Ow}AblCqfA~a@mn@{A_Vz~@w|@x{@{PmP{CikA}Sg|@ec@ve@y[xzEyGbLmLmJolA~yCwaB|_B"
          legs:
          - steps: []
            summary: ""
            weight: 1976.1
            duration: 1976.1
            distance: 31561.2
          weight_name: routability
          weight: 1976.1
          duration: 1976.1
          distance: 31561.2
        waypoints:
        - hint: eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe
          distance: 54.20808645369059
          name: Avenue de la Restauration
          location:
          - 4.899732
          - 50.200456
        - hint: o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe
          distance: 483.4921257061384
          name: Route des Trois Communes
          location:
          - 4.794387
          - 50.397549
    RouteLeg:
      type: object
      properties:
        summary:
          type: string
          nullable: true
        distance:
          format: double
          description: "The distance traveled by the route, in `float` meters."
          type: number
          nullable: true
        duration:
          format: double
          description: "The estimated travel time, in `float` number of seconds."
          type: number
          nullable: true
        weight:
          format: double
          type: number
          nullable: true
    RoutingEngine:
      enum:
      - OSM
      - TOMTOM
      - GOOGLE
      - ANYMAP
      type: string
    Status:
      enum:
      - IN_PROGRESS
      - SUCCEEDED
      - FAILED
      type: string
    TableDto:
      type: object
      properties:
        id:
          format: int64
          description: Table id.
          type: integer
        status:
          description: "Table status (IN_PROGRESS, SUCCEEDED, FAILED)."
          type: string
          allOf:
          - $ref: '#/components/schemas/Status'
          nullable: true
        errorMessage:
          description: Error message if the Cube failed.
          type: string
          nullable: true
        hash:
          format: int32
          description: Hash of the Cube request
          type: integer
          nullable: true
        tableResponseId:
          format: int64
          description: Table response id.
          type: integer
        updatedAt:
          description: Last update time of the table.
          type: string
          nullable: true
        createdAt:
          description: Creation time of the table.
          type: string
          nullable: true
    TablePageDto:
      required:
      - embedded
      - page
      type: object
      properties:
        embedded:
          $ref: '#/components/schemas/TablePageEmbeddedDto'
        page:
          $ref: '#/components/schemas/PageDto'
    TablePageEmbeddedDto:
      required:
      - tables
      type: object
      properties:
        tables:
          type: array
          items:
            $ref: '#/components/schemas/TableDto'
    TableProgressDto:
      type: object
      properties:
        nrOfSucceededChildren:
          format: int64
          description: Bigger table requests get split up. `nrOfSucceededChildren`
            is the number of child requests that succeeded.
          type: integer
          example: 8
          nullable: true
        nrOfFailedChildren:
          format: int64
          description: Bigger table requests get split up. `nrOfFailedChildren` is
            the number of child requests that failed.
          type: integer
          example: 0
          nullable: true
        nrOfChildren:
          format: int64
          description: Bigger table requests get split up. `nrOfChildren` is the number
            of total child requests.
          type: integer
          example: 8
          nullable: true
    TableRequestDto:
      required:
      - coordinates
      type: object
      properties:
        id:
          format: int64
          description: Bigger table requests get split up. `nrOfSucceededChildren`
            is the number of child requests that succeeded.
          type: integer
        coordinates:
          description: "The coordinates this request will use, coordinates as [{lon},{lat}]\
            \ values, in decimal degrees."
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        sources:
          description: "Use location with given `index` as source, mind that `0 <=\
            \ integer < #locations`"
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        destinations:
          description: "Use location with given `index` as destination, mind that\
            \ `0 <= integer < #locations`"
          type: array
          items:
            format: int32
            type: integer
          nullable: true
        annotations:
          description: "An array with strings of duration, nodes, distance, weight,\
            \ datasources, speed (optional)"
          type: array
          items:
            type: string
          nullable: true
    TableResponseDto:
      description: Table Response
      type: object
      properties:
        tableId:
          format: int64
          description: Table response id. Not to be confused with table request id.
          type: integer
        durations:
          description: Time distance matrix. In order of sources to destinations indexes
            in request.
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        distances:
          description: Distance matrix. In order of sources to destinations indexes
            in request.
          type: array
          items:
            type: array
            items:
              format: double
              type: number
          nullable: true
        sources:
          description: Actual sources snapped to map.
          type: array
          items:
            $ref: '#/components/schemas/Waypoint'
          nullable: true
        destinations:
          description: Actual destinations snapped to map.
          type: array
          items:
            $ref: '#/components/schemas/Waypoint'
          nullable: true
      example:
        destinations:
        - hint: eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe
          distance: 54.20808645369059
          name: Avenue de la Restauration
          location:
          - 4.899732
          - 50.200456
        - hint: o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe
          distance: 483.4921257061384
          name: Route des Trois Communes
          location:
          - 4.794387
          - 50.397549
        - hint: WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe
          distance: 202.89814553989248
          name: Wittebos
          location:
          - 5.002787
          - 50.900473
        - hint: GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe
          distance: 10.496399718824598
          name: Tiensestraat
          location:
          - 5.050105
          - 50.899933
        durations:
        - - 0
          - 1976.1
          - 5772.3
          - 5642.6
        - - 2010.2
          - 0
          - 4783.9
          - 4654.2
        - - 5817.2
          - 4797.4
          - 0
          - 508.6
        - - 5705.3
          - 4685.5
          - 530.2
          - 0
        sources:
        - hint: eX5AgduYjYYsAAAAlAAAAHIAAAAAAAAAxBf6QX7HzELIz51CAAAAACwAAACUAAAAcgAAAAAAAAAVtwAAlMNKAIj__QKgxEoAwP39AgEAXwRPrDVe
          distance: 54.20808645369059
          name: Avenue de la Restauration
          location:
          - 4.899732
          - 50.200456
        - hint: o_v2gPMxk4KXAAAAQwAAAJsAAADWAwAA4YOXQ0HtBEOh05pDGnn1RJcAAABDAAAAmwAAANYDAAAVtwAAEyhJAG0BAQMAPkkAAAsBAwMAXxRPrDVe
          distance: 483.4921257061384
          name: Route des Trois Communes
          location:
          - 4.794387
          - 50.397549
        - hint: WvwMgrAseoRNAAAAAAAAALwAAAAAAAAAvYZVQgAAAAAK0AFDAAAAAE0AAAAAAAAAvAAAAAAAAAAVtwAAI1ZMAPmtCANAS0wAIKwIAwYAXw9PrDVe
          distance: 202.89814553989248
          name: Wittebos
          location:
          - 5.002787
          - 50.900473
        - hint: GtVBggTgEIkDAAAADwAAAMUAAAAAAAAAbWKjQHMstUHaEZlDAAAAAAMAAAAPAAAAxQAAAAAAAAAVtwAA-Q5NAN2rCAOQDk0AIKwIAwsAHw5PrDVe
          distance: 10.496399718824598
          name: Tiensestraat
          location:
          - 5.050105
          - 50.899933
    TripDto:
      description: Trip response
      type: object
      properties:
        waypoints:
          type: array
          items:
            $ref: '#/components/schemas/TripWaypoint'
          nullable: true
        trips:
          type: array
          items:
            $ref: '#/components/schemas/Route'
          nullable: true
      example:
        coordinates:
        - - 4.9
          - 50.2
        - - 4.8
          - 50.4
    TripWaypoint:
      type: object
      properties:
        trips_index:
          format: int32
          type: integer
          nullable: true
        waypoint_index:
          format: int32
          type: integer
          nullable: true
    VehicleType:
      enum:
      - CAR
      - BIKE
      - TRUCK
      - ELECTRIC_CAR
      - ELECTRIC_BIKE
      type: string
    Waypoint:
      type: object
      properties:
        hint:
          description: "Unique internal identifier of the segment (ephemeral, not\
            \ constant over data updates) This can be used on subsequent request to\
            \ significantly speed up the query and to connect multiple services."
          type: string
          nullable: true
        distance:
          format: double
          description: The distance of the snapped point from the original
          type: number
          nullable: true
        name:
          description: Name of the street the coordinate snapped to
          type: string
          nullable: true
        location:
          description: "Array that contains the [longitude, latitude] pair of the\
            \ snapped coordinate"
          type: array
          items:
            format: double
            type: number
          nullable: true
  headers:
    X-RateLimit-Limit:
      description: The number of allowed requests in the current period
      schema:
        type: integer
        example: 100
    X-RateLimit-Remaining:
      description: The number of remaining requests in the current period
      schema:
        minimum: 0
        type: integer
        example: 98
    X-RateLimit-Reset:
      description: The time at which the current rate limit window resets (Unix timestamp)
      schema:
        type: integer
        example: 1672531200
  securitySchemes:
    apikey:
      type: apiKey
      description: Api Key based authentication (apikey)
      name: Authorization
      in: header
