> ## 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.

# /cube

> Request a time-dependent 3D distance matrix (cube) asynchronously. Returns a cube ID to poll status via /cube/{id} and fetch results via /cube/{id}/response. Use /cube/{id}/progress for progress on large matrices.



## OpenAPI

````yaml POST /cube
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:
  /cube:
    post:
      tags:
        - Cubes
      summary: Create cube (async)
      description: >-
        Request a time-dependent 3D distance matrix (cube) asynchronously.
        Returns a cube ID to poll status via /cube/{id} and fetch results via
        /cube/{id}/response. Use /cube/{id}/progress for progress on large
        matrices.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCubeDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CubeDto'
        '400':
          description: Bad Request
components:
  schemas:
    CreateCubeDto:
      description: Cube Dto
      examples:
        - coordinates:
            - - 4.9
              - 50.2
            - - 4.8
              - 50.4
            - - 5
              - 50.9
            - - 5.05
              - 50.9
          sources:
            - 0
            - 1
            - 2
            - 3
          destinations:
            - 0
            - 1
            - 2
            - 3
      type: object
      required:
        - coordinates
      properties:
        coordinates:
          type:
            - array
            - 'null'
          items:
            type: array
            items:
              type: number
              format: double
          description: >-
            The coordinates this request will use, coordinates as [{lon},{lat}]
            values, in decimal degrees.
          minItems: 2
        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.
        vehicleType:
          description: The vehicle type for which the table is requested
          type:
            - string
            - 'null'
          anyOf:
            - $ref: '#/components/schemas/VehicleType'
            - type: 'null'
        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
            - 'null'
          anyOf:
            - $ref: '#/components/schemas/LocalDate'
            - type: 'null'
        responseType:
          type:
            - string
            - 'null'
          description: >-
            Specifies the type of response to return. Currently only 'matrix' is
            supported (returns travel time matrices for each time slice).
    CubeDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Cube id.
        status:
          description: Cube 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.
        responseType:
          type:
            - string
            - 'null'
          description: Type of the Cube response, e.g., 'coefficients'.
        hash:
          type:
            - integer
            - 'null'
          format: int32
          description: Hash of the Cube request
        cubeResponseId:
          type: integer
          format: int64
          description: Cube response id.
        updatedAt:
          type:
            - string
            - 'null'
          description: Last update time of the Cube.
        createdAt:
          type:
            - string
            - 'null'
          description: Creation time of the Cube.
    VehicleType:
      type: string
      enum:
        - CAR
        - BIKE
        - TRUCK
        - ELECTRIC_CAR
        - ELECTRIC_BIKE
    LocalDate:
      type: string
      format: date
      examples:
        - '2022-03-10T00:00:00.000Z'
    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.

````