> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-landing-margin.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v2/interactive-submission/preferred-package-version

> Get the preferred package version for constructing a command submission.
This endpoint (GET /interactive-submission/preferred-package-version) is deprecated and will be removed in Canton 3.6. Please use POST /interactive-submission/preferred-packages instead.



## OpenAPI

````yaml /openapi/json-ledger-api/openapi.yaml get /v2/interactive-submission/preferred-package-version
openapi: 3.0.3
info:
  title: JSON Ledger API HTTP endpoints
  version: 3.5.8
  description: >-
    This specification version fixes the API inconsistencies where certain
    fields marked as required in the spec are in fact optional.

    If you use code generation tool based on this file, you might need to adjust
    the existing application code to handle those fields as optional.

    If you do not want to change your client code, continue using the OpenAPI
    specification for the latest Canton 3.4 patch release.

    MINIMUM_CANTON_VERSION=3.5.8
servers: []
security: []
paths:
  /v2/interactive-submission/preferred-package-version:
    get:
      summary: GET /v2/interactive-submission/preferred-package-version
      description: >-
        Get the preferred package version for constructing a command submission.

        This endpoint (GET /interactive-submission/preferred-package-version) is
        deprecated and will be removed in Canton 3.6. Please use POST
        /interactive-submission/preferred-packages instead.
      operationId: getV2Interactive-submissionPreferred-package-version
      parameters:
        - name: parties
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - name: package-name
          in: query
          required: true
          schema:
            type: string
        - name: vetting_valid_at
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: synchronizer-id
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPreferredPackageVersionResponse'
        '400':
          description: >-
            Invalid value, Invalid value for: query parameter parties, Invalid
            value for: query parameter package-name, Invalid value for: query
            parameter vetting_valid_at, Invalid value for: query parameter
            synchronizer-id
          content:
            text/plain:
              schema:
                type: string
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsCantonError'
      deprecated: true
      security:
        - httpAuth: []
        - apiKeyAuth: []
components:
  schemas:
    GetPreferredPackageVersionResponse:
      title: GetPreferredPackageVersionResponse
      type: object
      properties:
        packagePreference:
          $ref: '#/components/schemas/PackagePreference'
          description: |-
            Not populated when no preferred package is found

            Optional
    JsCantonError:
      title: JsCantonError
      type: object
      required:
        - code
        - cause
        - context
        - errorCategory
      properties:
        code:
          type: string
        cause:
          type: string
        correlationId:
          type: string
        traceId:
          type: string
        context:
          $ref: '#/components/schemas/Map_String'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Tuple2_String_String'
        errorCategory:
          type: integer
          format: int32
        grpcCodeValue:
          type: integer
          format: int32
        retryInfo:
          type: string
        definiteAnswer:
          type: boolean
    PackagePreference:
      title: PackagePreference
      type: object
      required:
        - synchronizerId
        - packageReference
      properties:
        packageReference:
          $ref: '#/components/schemas/PackageReference'
          description: |-
            The package reference of the preferred package.

            Required
        synchronizerId:
          description: >-
            The synchronizer for which the preferred package was computed.

            If the synchronizer_id was specified in the request, then it matches
            the request synchronizer_id.


            Required
          type: string
    Map_String:
      title: Map_String
      type: object
      additionalProperties:
        type: string
    Tuple2_String_String:
      title: Tuple2_String_String
      type: array
      maxItems: 2
      minItems: 2
      items:
        type: string
    PackageReference:
      title: PackageReference
      type: object
      required:
        - packageId
        - packageName
        - packageVersion
      properties:
        packageId:
          description: Required
          type: string
        packageName:
          description: Required
          type: string
        packageVersion:
          description: Required
          type: string
  securitySchemes:
    httpAuth:
      type: http
      description: Ledger API standard JWT token
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      description: Ledger API standard JWT token (websocket)
      name: Sec-WebSocket-Protocol
      in: header

````