> ## Documentation Index
> Fetch the complete documentation index at: https://maps.solvice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# /table/upload

> Upload a pre-computed distance matrix. Use the returned ID to fetch the table via /table/{id}.



## OpenAPI

````yaml POST /table/upload
openapi: 3.1.0
info:
  title: Solvice Maps Routing API
  description: >
    The Solvice Maps Routing API provides distance matrices, routes, and travel
    time calculations

    for logistics and route optimization applications. Supports multiple routing
    engines including

    OpenStreetMap and TomTom with time-dependent traffic data.
  version: 1.0.0
  contact:
    name: Solvice Support
    url: https://solvice.io
    email: support@solvice.io
servers:
  - url: https://routing.solvice.io
    description: Production server
security:
  - apikey: []
tags:
  - name: Tables
    description: Distance/duration matrix operations
  - name: Cubes
    description: Time-dependent 3D travel time matrices
  - name: Routes
    description: Point-to-point routing
  - name: Trips
    description: Traveling salesman / round-trip optimization
paths:
  /table/upload:
    post:
      tags:
        - Tables
      summary: Upload table
      description: >-
        Upload a pre-computed distance matrix. Use the returned ID to fetch the
        table via /table/{id}.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadTableDto'
        required: true
      responses:
        '201':
          description: Table uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableDto'
        '400':
          description: Bad request - Invalid matrix data or dimensions
          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
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: The number of requests remaining in the current time window
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                The time at which the current rate limit window resets in UTC
                epoch seconds
              schema:
                type: integer
            Retry-After:
              description: The number of seconds to wait before making another request
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UploadTableDto:
      description: Upload pre-computed distance/duration matrix
      examples:
        - coordinates:
            - - 4.9
              - 50.2
            - - 4.8
              - 50.4
            - - 5
              - 50.9
            - - 5.05
              - 50.9
          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
      type: object
      required:
        - coordinates
        - durations
      properties:
        coordinates:
          type: array
          items:
            type: array
            items:
              type: number
              format: double
          description: >-
            The coordinates for this matrix, as [{lon},{lat}] values, in decimal
            degrees.
          minItems: 2
        durations:
          type: array
          items:
            type: array
            items:
              type: number
              format: double
          description: >-
            Pre-computed duration matrix. Rows are sources, columns are
            destinations.
        sources:
          type:
            - array
            - 'null'
          items:
            type: integer
            format: int32
          description: >-
            An array of index elements (0 <= integer < #coordinates) to use
            location with given index as source. Default is to use all.
        destinations:
          type:
            - array
            - 'null'
          items:
            type: integer
            format: int32
          description: >-
            An array of index elements (0 <= integer < #coordinates) to use
            location with given index as destination. Default is to use all.
        distances:
          type:
            - array
            - 'null'
          items:
            type: array
            items:
              type: number
              format: double
          description: >-
            Pre-computed distance matrix. Optional - only needed if distance
            data is available.
        annotations:
          type:
            - array
            - 'null'
          items:
            type: string
          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).
        vehicleType:
          description: The vehicle type for which the table is requested
          type:
            - string
            - 'null'
          anyOf:
            - $ref: '#/components/schemas/VehicleType'
            - type: 'null'
        engine:
          description: >-
            Routing data engine. Use `TOMTOM` with `departureTime` for
            predictive traffic, or `TOMTOM_REAL_TIME` for live traffic (sync
            endpoints only — `departureTime` is ignored).
          type:
            - string
            - 'null'
          anyOf:
            - $ref: '#/components/schemas/RoutingEngine'
            - type: 'null'
        departureTime:
          description: The departure time (ISO8601) for which this matrix was computed.
          type:
            - string
            - 'null'
          examples:
            - '2024-03-15T08:30:00.000Z'
          anyOf:
            - $ref: '#/components/schemas/LocalDateTime'
            - type: 'null'
        interpolate:
          type:
            - boolean
            - 'null'
          description: >-
            Enable linear interpolation between time slices for more accurate
            results based on departure time
        exclude:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/RoadTypeExclude'
          description: Exclude certain road types from routing
        sourceWaypoints:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Waypoint'
          description: >-
            Source waypoints snapped to map. Optional if waypoint data is
            available.
        destinationWaypoints:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Waypoint'
          description: >-
            Destination waypoints snapped to map. Optional if waypoint data is
            available.
    TableDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Table id.
        status:
          description: Table status (IN_PROGRESS, SUCCEEDED, FAILED).
          type:
            - string
            - 'null'
          anyOf:
            - $ref: '#/components/schemas/Status'
            - type: 'null'
        errorMessage:
          type:
            - string
            - 'null'
          description: Error message if the Cube failed.
        hash:
          type:
            - integer
            - 'null'
          format: int32
          description: Hash of the Cube request
        nrOfSources:
          type:
            - integer
            - 'null'
          format: int32
          description: Number of sources in the table
        nrOfDestinations:
          type:
            - integer
            - 'null'
          format: int32
          description: Number of destinations in the table
        tableResponseId:
          type: integer
          format: int64
          description: Table response id.
        updatedAt:
          type:
            - string
            - 'null'
          description: Last update time of the table.
        createdAt:
          type:
            - string
            - 'null'
          description: Creation time of the table.
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        timestamp:
          type: integer
          format: int64
    VehicleType:
      type: string
      enum:
        - CAR
        - BIKE
        - TRUCK
        - ELECTRIC_CAR
        - ELECTRIC_BIKE
    RoutingEngine:
      type: string
      description: >
        Routing data engine used to calculate distances/durations.


        - `OSM`: Open Street Map, traffic-unaware (default).

        - `TOMTOM`: TomTom map data with predictive traffic patterns. Use with
        `departureTime` and optionally `interpolate`.

        - `TOMTOM_REAL_TIME`: TomTom map data with **real-time traffic**. The
        `departureTime` field is ignored — every request uses the current time.
        Available on `POST /route` and `POST /table/sync` only (not on async
        `/table` or `/route/batch`).

        - `GOOGLE`: Google routing data (contact sales).

        - `ANYMAP`: Solvice's proprietary engine with advanced traffic modeling.

        - `CUSTOM`: Bring-your-own engine via custom integration.
      enum:
        - OSM
        - TOMTOM
        - GOOGLE
        - ANYMAP
        - CUSTOM
        - TOMTOM_REAL_TIME
    LocalDateTime:
      type: string
      format: date-time
    RoadTypeExclude:
      type: string
      enum:
        - TOLL
        - MOTORWAY
        - FERRY
        - TUNNEL
        - BRIDGE
    Waypoint:
      type: object
      properties:
        hint:
          type:
            - string
            - 'null'
          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.
        distance:
          type:
            - number
            - 'null'
          format: double
          description: The distance of the snapped point from the original
        name:
          type:
            - string
            - 'null'
          description: Name of the street the coordinate snapped to
        location:
          type:
            - array
            - 'null'
          items:
            type: number
            format: double
          description: >-
            Array that contains the [longitude, latitude] pair of the snapped
            coordinate
    Status:
      type: string
      enum:
        - IN_PROGRESS
        - AGGREGATING
        - SUCCEEDED
        - FAILED
        - CREATING
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````