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

# Get the current transport tracking snapshot

> Returns one tracking entry for each order item. When position is present, use point and observed_at to show the item on a map.




## OpenAPI

````yaml /openapi.yaml get /v2/orders/{order_id}/tracking
openapi: 3.1.2
info:
  title: Bahn Customer API
  version: 2.0.0-draft
  summary: Create and follow vehicle transport orders.
  description: |
    Create vehicle transport orders and read their current state.
  contact:
    name: Bahn API support
    email: support@bahnexpress.com
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://sandbox.api.bahnexpress.fi
    description: Customer sandbox
  - url: https://api.bahnexpress.fi
    description: Production
security:
  - oauth2:
      - orders:read
      - orders:write
tags:
  - name: Authentication
    description: Create an access token for the selected environment.
  - name: Prices
    description: Check the current price for a route.
  - name: Orders
    description: Create, read, change, and cancel orders.
  - name: Files
    description: Upload and read order files.
  - name: Inspections
    description: Get vehicle inspection reports.
  - name: Tracking
    description: Get the current location for each order item.
  - name: Reports
    description: Get order report rows.
  - name: Sandbox
    description: Apply deterministic scenarios in the customer sandbox.
  - name: Webhooks
    description: Receive order change events from Bahn.
paths:
  /v2/orders/{order_id}/tracking:
    parameters:
      - $ref: '#/components/parameters/OrderId'
      - $ref: '#/components/parameters/RequestId'
      - $ref: '#/components/parameters/IfNoneMatch'
    get:
      tags:
        - Tracking
      summary: Get the current transport tracking snapshot
      description: >
        Returns one tracking entry for each order item. When position is
        present, use point and observed_at to show the item on a map.
      operationId: getOrderTracking
      responses:
        '200':
          description: The current tracking snapshot.
          headers:
            ETag:
              description: The location snapshot revision.
              schema:
                type: string
              example: '"trk_01k1a2b3c4d5e6f7g8h9j0k1m2"'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrackingSnapshot'
              example:
                order_id: ord_01k1a2b3c4d5e6f7g8h9j0k1m2
                status: in_transit
                items:
                  - item_id: item_01k1a2b3c4d5e6f7g8h9j0k1m2_primary
                    role: primary
                    tracking_state: active
                    phase: pickup
                    pickup_progress: nearby
                    driver:
                      name: Alex Driver
                    position:
                      point:
                        type: Point
                        coordinates:
                          - 23.76
                          - 61.5
                      accuracy_meters: 12
                      heading_degrees: 45
                      observed_at: '2026-08-03T11:59:00+03:00'
                revision: trk_01k1a2b3c4d5e6f7g8h9j0k1m2
        '304':
          description: The snapshot did not change.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServerError'
      security:
        - oauth2:
            - orders:read
components:
  parameters:
    OrderId:
      name: order_id
      in: path
      required: true
      description: The order identifier.
      schema:
        $ref: '#/components/schemas/OrderId'
    RequestId:
      name: X-Request-Id
      in: header
      required: false
      description: A caller-supplied request identifier for support.
      schema:
        type: string
        minLength: 1
        maxLength: 255
    IfNoneMatch:
      name: If-None-Match
      in: header
      required: false
      description: The last location revision that the caller received.
      schema:
        type: string
  schemas:
    TrackingSnapshot:
      description: Current map and pickup-approach state for every vehicle in an order.
      type: object
      additionalProperties: false
      required:
        - order_id
        - status
        - items
        - revision
      properties:
        order_id:
          $ref: '#/components/schemas/OrderId'
          description: Order represented by this tracking snapshot.
        status:
          $ref: '#/components/schemas/OrderStatus'
          description: Current overall order status.
        items:
          type: array
          minItems: 1
          description: One tracking entry for each order item.
          items:
            $ref: '#/components/schemas/TrackingItem'
        revision:
          type: string
          description: Opaque snapshot revision used as the tracking ETag.
    OrderId:
      type: string
      pattern: ^ord_[a-z0-9]+$
      description: Stable Bahn order identifier used in every order resource path.
    OrderStatus:
      type: string
      description: >
        Overall order state derived from all vehicles.

        accepted means no vehicle is in transit; in_transit means transport is
        underway;

        delivered means every required vehicle is delivered; cancelled means the
        order was cancelled.
      enum:
        - accepted
        - in_transit
        - delivered
        - cancelled
    TrackingItem:
      description: Current tracking state for one primary or trade-in vehicle.
      type: object
      additionalProperties: false
      required:
        - item_id
        - role
        - tracking_state
        - phase
        - pickup_progress
        - driver
        - position
      properties:
        item_id:
          $ref: '#/components/schemas/OrderItemId'
          description: Vehicle that this tracking entry describes.
        role:
          type: string
          description: >-
            primary for the outbound vehicle; trade_in for the reverse-route
            vehicle.
          enum:
            - primary
            - trade_in
        tracking_state:
          $ref: '#/components/schemas/TrackingState'
          description: >
            Current tracking lifecycle state.

            not_started means no customer tracking has started.

            active means the current driver assignment has active tracking.

            paused means a durable ferry or carrier phase has no driver GPS.

            ended means delivery or cancellation ended tracking.

            A null position during a short GPS gap does not change active to
            paused.
        phase:
          type: string
          description: The current tracking phase.
          enum:
            - pickup
            - transport
        pickup_progress:
          description: Pickup approach state, or null outside pickup approach.
          oneOf:
            - $ref: '#/components/schemas/PickupProgress'
            - type: 'null'
        driver:
          description: Known pickup driver, or null when no driver name is available.
          oneOf:
            - $ref: '#/components/schemas/TrackingDriver'
            - type: 'null'
        position:
          description: >-
            The position to show for this item, or null when no position is
            available.
          oneOf:
            - $ref: '#/components/schemas/TrackingPosition'
            - type: 'null'
    Problem:
      description: A machine-readable API error in RFC 9457 problem-details format.
      type: object
      additionalProperties: false
      required:
        - type
        - title
        - status
        - code
        - instance
        - request_id
      properties:
        type:
          type: string
          format: uri
          description: A stable URI for the problem type.
        title:
          type: string
          description: A short problem summary.
        status:
          type: integer
          minimum: 400
          maximum: 599
          description: The HTTP status code returned with this problem.
        code:
          $ref: '#/components/schemas/ProblemCode'
          description: Stable code for application logic and retry decisions.
        detail:
          type: string
          description: A human-readable explanation of this occurrence.
        instance:
          type: string
          description: The request path that produced the problem.
        request_id:
          type: string
          description: Request identifier to include when you contact Bahn support.
        errors:
          type: array
          description: >-
            Field-level validation errors, when the problem concerns request
            input.
          items:
            $ref: '#/components/schemas/FieldError'
    OrderItemId:
      type: string
      pattern: ^item_[a-z0-9]+_(primary|trade_in)$
      description: Stable identifier for the primary or trade-in vehicle within an order.
    TrackingState:
      type: string
      description: |
        not_started means no customer tracking has started.
        active means the current driver assignment has active tracking.
        paused means a durable transport phase has no driver GPS.
        ended means delivery or cancellation ended tracking.
        A short GPS gap does not change the state.
      enum:
        - not_started
        - active
        - paused
        - ended
    PickupProgress:
      type: string
      description: >-
        on_the_way while the driver approaches pickup; nearby after the pickup
        ETA reaches 30 minutes or less.
      enum:
        - on_the_way
        - nearby
    TrackingDriver:
      description: Known driver shown during pickup approach.
      type: object
      additionalProperties: false
      required:
        - name
      properties:
        name:
          type: string
          minLength: 1
          description: Driver's full name.
    TrackingPosition:
      description: >-
        Map-ready vehicle position with its observation time and optional
        movement details.
      type: object
      additionalProperties: false
      required:
        - point
        - observed_at
        - accuracy_meters
        - heading_degrees
      properties:
        point:
          $ref: '#/components/schemas/GeoJsonPoint'
          description: GeoJSON point to render as the vehicle marker.
        observed_at:
          type: string
          format: date-time
          description: Time when this position was observed. Show its age near the map.
        accuracy_meters:
          type:
            - number
            - 'null'
          minimum: 0
          description: The position accuracy radius in meters.
        heading_degrees:
          type:
            - number
            - 'null'
          minimum: 0
          maximum: 360
          description: The travel heading in degrees from north.
    ProblemCode:
      type: string
      description: A stable machine code for client decisions.
      enum:
        - validation_error
        - authentication_failed
        - permission_denied
        - resource_not_found
        - idempotency_conflict
        - revision_conflict
        - order_not_cancellable
        - order_not_updateable
        - business_rule_violation
        - ordered_for_required
        - ordered_for_not_allowed
        - ordered_for_customer_not_found
        - file_too_large
        - request_too_large
        - scenario_not_allowed
        - internal_error
    FieldError:
      description: One invalid request field.
      type: object
      additionalProperties: false
      required:
        - path
        - code
        - message
      properties:
        path:
          type: string
          description: Dot-separated path to the invalid field.
        code:
          type: string
          description: Stable validation code for this field error.
        message:
          type: string
          description: Human-readable reason why the field is invalid.
    GeoJsonPoint:
      type: object
      description: A GeoJSON position for one map marker.
      additionalProperties: false
      required:
        - type
        - coordinates
      properties:
        type:
          const: Point
          description: GeoJSON geometry type.
        coordinates:
          $ref: '#/components/schemas/GeoJsonPosition'
          description: Longitude and latitude for the map marker.
    GeoJsonPosition:
      type: array
      description: GeoJSON coordinate pair in longitude, latitude order.
      prefixItems:
        - type: number
          minimum: -180
          maximum: 180
        - type: number
          minimum: -90
          maximum: 90
      minItems: 2
      maxItems: 2
  responses:
    Unauthorized:
      description: Authentication failed.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: The token lacks the required scope or customer access.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: The resource does not exist or the customer cannot access it.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    ServerError:
      description: Bahn could not complete the request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 client credentials.
      flows:
        clientCredentials:
          tokenUrl: /oauth2/token
          scopes:
            orders:read: Read customer orders.
            orders:write: Check prices, upload files, and change customer orders.
            reports:read: Read customer order reports.
            test:write: Apply customer sandbox scenarios.

````