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

# Check a price

> Calculates the current price when automatic pricing supports the route.
Otherwise, the response states that the route needs a custom quote.
Bahn does not guarantee that it can provide a custom quote.




## OpenAPI

````yaml /openapi.yaml post /v2/price-checks
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/price-checks:
    post:
      tags:
        - Prices
      summary: Check a price
      description: |
        Calculates the current price when automatic pricing supports the route.
        Otherwise, the response states that the route needs a custom quote.
        Bahn does not guarantee that it can provide a custom quote.
      operationId: checkPrice
      parameters:
        - $ref: '#/components/parameters/RequestId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PriceCheckRequest'
            example:
              pickup:
                address:
                  formatted_address: Teollisuuskatu 1, 00510 Helsinki, Finland
                type: dealership
              delivery:
                address:
                  formatted_address: Hatanpään valtatie 24, 33100 Tampere, Finland
                type: dealership
              items:
                - role: primary
                  vin: WBA00000000000001
              service_options:
                transport_preference: flexible
                inspection: standard
      responses:
        '200':
          description: The price check is complete.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceCheck'
              example:
                status: available
                ordered_for: null
                price:
                  currency: EUR
                  total_cents: 45900
                  transport_cents: 43900
                  additional_fees_cents: 2000
                  trade_in_cents: 0
                estimated_pickup_at: '2026-08-03T08:00:00+03:00'
                estimated_delivery_at: '2026-08-03T13:15:00+03:00'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServerError'
      security:
        - oauth2:
            - orders:write
components:
  parameters:
    RequestId:
      name: X-Request-Id
      in: header
      required: false
      description: A caller-supplied request identifier for support.
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    PriceCheckRequest:
      description: Route, vehicles, and service choices used to calculate a price.
      type: object
      additionalProperties: false
      required:
        - pickup
        - delivery
        - items
        - service_options
      properties:
        ordered_for:
          $ref: '#/components/schemas/OrderedFor'
          description: >-
            Represented business for a platform price check. Direct customers
            omit this field.
        pickup:
          $ref: '#/components/schemas/PickupInput'
          description: >-
            Proposed pickup details. A price check does not require pickup
            availability.
        delivery:
          $ref: '#/components/schemas/DeliveryInput'
          description: Proposed delivery details.
        items:
          type: array
          minItems: 1
          maxItems: 2
          description: >-
            One primary vehicle and, optionally, one reverse-route trade-in
            vehicle.
          contains:
            type: object
            required:
              - role
            properties:
              role:
                const: primary
                description: Requires exactly one primary vehicle in the price check.
          minContains: 1
          maxContains: 1
          items:
            $ref: '#/components/schemas/PriceCheckVehicleInput'
        service_options:
          $ref: '#/components/schemas/ServiceOptions'
          description: Proposed transport and inspection service.
    PriceCheck:
      description: Automatic price result or a clear custom-quote result.
      oneOf:
        - $ref: '#/components/schemas/AvailablePriceCheck'
        - $ref: '#/components/schemas/CustomQuoteRequiredPriceCheck'
      discriminator:
        propertyName: status
        mapping:
          available:
            $ref: '#/components/schemas/AvailablePriceCheck'
          custom_quote_required:
            $ref: '#/components/schemas/CustomQuoteRequiredPriceCheck'
    OrderedFor:
      description: Business represented by a platform ordering channel.
      type: object
      additionalProperties: false
      required:
        - country_code
        - business_id
      properties:
        country_code:
          type: string
          pattern: ^[A-Z]{2}$
          description: The ISO 3166-1 alpha-2 country code of the Bahn customer.
        business_id:
          type: string
          minLength: 1
          maxLength: 100
          description: The official business ID of the Bahn customer.
    PickupInput:
      description: Where, when, and from whom Bahn can collect the vehicle.
      type: object
      additionalProperties: false
      required:
        - address
        - type
      properties:
        address:
          $ref: '#/components/schemas/AddressInput'
          description: Location where Bahn collects the vehicle.
        type:
          type: string
          description: >-
            Dealership for a business handover; private for a private-person
            handover.
          enum:
            - dealership
            - private
        contact:
          $ref: '#/components/schemas/ContactInput'
          description: Person Bahn should contact about the pickup.
        release_code:
          type:
            - string
            - 'null'
          maxLength: 255
          description: Code or reference required to release the vehicle at pickup.
        available_from:
          type: string
          format: date-time
          description: The first time when the vehicle is available for pickup.
        requested_windows:
          type: array
          description: >-
            Time ranges the customer can accept for pickup. Bahn can agree to
            one later.
          items:
            $ref: '#/components/schemas/TimeWindowInput'
          default: []
    DeliveryInput:
      description: Where, when, and to whom Bahn should deliver the vehicle.
      type: object
      additionalProperties: false
      required:
        - address
        - type
      properties:
        address:
          $ref: '#/components/schemas/AddressInput'
          description: Location where Bahn delivers the vehicle.
        type:
          type: string
          description: >-
            Dealership for a business handover; end_customer for delivery to the
            buyer or user.
          enum:
            - dealership
            - end_customer
        contact:
          $ref: '#/components/schemas/ContactInput'
          description: Person Bahn should contact about the delivery.
        requested_windows:
          type: array
          description: >-
            Time ranges the customer can accept for delivery. Bahn can agree to
            one later.
          items:
            $ref: '#/components/schemas/TimeWindowInput'
          default: []
    PriceCheckVehicleInput:
      description: One vehicle included in a price calculation.
      oneOf:
        - $ref: '#/components/schemas/PriceCheckPrimaryVehicleInput'
        - $ref: '#/components/schemas/TradeInVehicleInput'
      discriminator:
        propertyName: role
        mapping:
          primary:
            $ref: '#/components/schemas/PriceCheckPrimaryVehicleInput'
          trade_in:
            $ref: '#/components/schemas/TradeInVehicleInput'
    ServiceOptions:
      description: Transport and inspection service selected for the order.
      type: object
      additionalProperties: false
      required:
        - transport_preference
        - inspection
      properties:
        transport_preference:
          type: string
          description: >
            How Bahn may move the primary vehicle.

            flexible allows driven or truck transport; truck_preferred requests
            a truck when practical;

            truck_required means the vehicle must not be driven.
          enum:
            - flexible
            - truck_preferred
            - truck_required
        inspection:
          type: string
          description: >-
            standard for the normal handover check; full for a structured
            inspection report.
          enum:
            - standard
            - full
    AvailablePriceCheck:
      title: Automatic price available
      description: Automatic price with indicative pickup and delivery times.
      type: object
      additionalProperties: false
      required:
        - status
        - ordered_for
        - price
        - estimated_pickup_at
        - estimated_delivery_at
      properties:
        status:
          const: available
          description: available means the response contains an automatic price.
        ordered_for:
          $ref: '#/components/schemas/NullableOrderedFor'
          description: Represented business, or null for a direct customer request.
        price:
          $ref: '#/components/schemas/PriceValue'
          description: Automatic price for this request.
        estimated_pickup_at:
          type: string
          format: date-time
          description: >-
            Indicative pickup time for this price result. It is not an agreed
            window or ETA.
        estimated_delivery_at:
          type: string
          format: date-time
          description: >-
            Indicative delivery time for this price result. It is not an agreed
            window or ETA.
    CustomQuoteRequiredPriceCheck:
      title: Custom quote required
      description: >-
        Automatic pricing is not available. Bahn does not guarantee a custom
        quote.
      type: object
      additionalProperties: false
      required:
        - status
        - ordered_for
        - price
        - estimated_pickup_at
        - estimated_delivery_at
      properties:
        status:
          const: custom_quote_required
          description: >-
            custom_quote_required means automatic pricing is not available for
            this request.
        ordered_for:
          $ref: '#/components/schemas/NullableOrderedFor'
          description: Represented business, or null for a direct customer request.
        price:
          type: 'null'
          description: Always null because no automatic price is available.
        estimated_pickup_at:
          type: string
          format: date-time
          description: Indicative pickup time when one can still be calculated.
        estimated_delivery_at:
          type: string
          format: date-time
          description: Indicative delivery time when one can still be calculated.
    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'
    AddressInput:
      description: Customer-supplied pickup or delivery address.
      type: object
      additionalProperties: false
      required:
        - formatted_address
      properties:
        formatted_address:
          type: string
          minLength: 1
          maxLength: 500
          description: >-
            Complete address as it should appear to a person handling the
            transport.
        name:
          type: string
          minLength: 1
          maxLength: 500
          description: Business, dealership, auction, or site name at this address.
        address_line_1:
          type: string
          minLength: 1
          maxLength: 200
          description: Street name and building number.
        address_line_2:
          type: string
          minLength: 1
          maxLength: 200
          description: Unit, gate, building, or other secondary address detail.
        postal_code:
          type: string
          minLength: 1
          maxLength: 100
          description: Postal code for the location.
        city:
          type: string
          minLength: 1
          maxLength: 100
          description: City or municipality for the location.
        country_code:
          type: string
          pattern: ^[A-Z]{2}$
          description: Two-letter ISO 3166-1 country code, such as FI or DE.
    ContactInput:
      description: Person to contact about pickup or delivery at this location.
      type: object
      additionalProperties: false
      properties:
        name:
          type:
            - string
            - 'null'
          description: Full name of the handover contact.
        phone:
          type:
            - string
            - 'null'
          description: Phone number for handover coordination. Include the country code.
        email:
          type:
            - string
            - 'null'
          format: email
          description: Email address for handover coordination.
    TimeWindowInput:
      description: One requested or agreed local time range.
      type: object
      additionalProperties: false
      required:
        - start_at
        - end_at
        - timezone
      properties:
        start_at:
          type: string
          format: date-time
          description: Start of the window as an RFC 3339 timestamp with an offset.
        end_at:
          type: string
          format: date-time
          description: End of the window as an RFC 3339 timestamp with an offset.
        timezone:
          type: string
          description: An IANA time-zone name.
    PriceCheckPrimaryVehicleInput:
      title: Primary vehicle
      description: >-
        Primary vehicle facts needed to calculate a price. A vehicle identifier
        is optional here.
      type: object
      additionalProperties: false
      required:
        - role
      properties:
        role:
          const: primary
          description: Identifies the main vehicle in the price check.
        vin:
          type: string
          minLength: 17
          maxLength: 17
          description: 17-character vehicle identification number, when already known.
        registration_number:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 50
          description: Registration number, or null when it is not known.
        make:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 100
          description: Vehicle manufacturer, when known.
        model:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 100
          description: Vehicle model, when known.
        fuel_type:
          $ref: '#/components/schemas/FuelType'
          description: Vehicle fuel or powertrain type, when known.
        transmission:
          $ref: '#/components/schemas/Transmission'
          description: Vehicle transmission type, when known.
        engine_power_kw:
          type: integer
          minimum: 1
          description: Engine or motor power in kilowatts, when known.
        first_registered_year:
          type: integer
          minimum: 1886
          maximum: 3000
          description: Calendar year of first registration, when known.
        kerb_weight_kg:
          type: integer
          minimum: 1
          description: Vehicle kerb weight in kilograms, when known.
        winter_tires:
          $ref: '#/components/schemas/WinterTires'
          description: Winter-tire information, when relevant to pricing.
        note:
          type:
            - string
            - 'null'
          maxLength: 5000
          description: Vehicle-specific note that can affect the transport.
    TradeInVehicleInput:
      title: Trade-in vehicle
      description: >-
        Optional vehicle collected from the delivery location and returned to
        the pickup location.
      type: object
      additionalProperties: false
      required:
        - role
        - registration_number
      properties:
        role:
          const: trade_in
          description: Identifies the trade-in vehicle in the order.
        vin:
          type: string
          minLength: 17
          maxLength: 17
          description: 17-character vehicle identification number, when known.
        registration_number:
          type: string
          minLength: 1
          maxLength: 50
          description: Registration number used to identify the trade-in vehicle.
        make:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 100
          description: Vehicle manufacturer, when known.
        model:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 100
          description: Vehicle model, when known.
        fuel_type:
          $ref: '#/components/schemas/FuelType'
          description: Vehicle fuel or powertrain type, when known.
        transmission:
          $ref: '#/components/schemas/Transmission'
          description: Vehicle transmission type, when known.
        engine_power_kw:
          type: integer
          minimum: 1
          description: Engine or motor power in kilowatts, when known.
        first_registered_year:
          type: integer
          minimum: 1886
          maximum: 3000
          description: Calendar year of first registration, when known.
        kerb_weight_kg:
          type: integer
          minimum: 1
          description: Vehicle kerb weight in kilograms, when known.
        note:
          type:
            - string
            - 'null'
          maxLength: 5000
          description: Vehicle-specific handling or identification note for Bahn.
    NullableOrderedFor:
      description: >-
        Represented business, or null when the order belongs to the direct API
        customer.
      oneOf:
        - $ref: '#/components/schemas/OrderedFor'
        - type: 'null'
    PriceValue:
      description: Price breakdown in euro cents.
      type: object
      additionalProperties: false
      required:
        - currency
        - total_cents
        - transport_cents
        - additional_fees_cents
        - trade_in_cents
      properties:
        currency:
          const: EUR
          description: Currency for every amount in this price.
        total_cents:
          type: integer
          minimum: 0
          description: >-
            Total price, including transport, additional fees, and trade-in
            service.
        transport_cents:
          type: integer
          minimum: 0
          description: >-
            Price of the primary vehicle transport before additional fees and
            trade-in service.
        additional_fees_cents:
          type: integer
          minimum: 0
          description: Total additional service fees.
        trade_in_cents:
          type: integer
          minimum: 0
          description: >-
            Price of the reverse-route trade-in transport, or zero when none is
            included.
    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.
    FuelType:
      type: string
      description: Vehicle fuel or powertrain type.
      enum:
        - petrol
        - diesel
        - electric
        - hybrid_petrol
        - hybrid_diesel
        - unknown
    Transmission:
      type: string
      description: Vehicle transmission type.
      enum:
        - manual
        - automatic
        - unknown
    WinterTires:
      description: Winter-tire details for the primary vehicle.
      type: object
      additionalProperties: false
      required:
        - mounted
        - in_vehicle
      properties:
        mounted:
          type: boolean
          description: Whether winter tires are mounted on the vehicle.
        in_vehicle:
          type: boolean
          description: Whether an additional winter-tire set travels inside the vehicle.
  responses:
    BadRequest:
      description: The request syntax or shape is invalid.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: https://api.bahnexpress.fi/problems/validation-error
            title: The request is invalid.
            status: 400
            code: validation_error
            detail: One or more fields are invalid.
            instance: /v2/orders
            request_id: req_01k1a2b3c4d5e6f7g8h9j0k1m2
            errors:
              - path: items.0.vin
                code: invalid_length
                message: The VIN must contain 17 characters.
    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'
    PayloadTooLarge:
      description: The request body exceeds the maximum size.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unprocessable:
      description: The request is valid, but the business rules reject 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.

````