---
title: "Returns autocomplete suggestions for a borehole text column. When a
filterRequest is supplied, suggestions are restricted to boreholes
matching every active filter except the filter on the field being autocompleted, so the
user can refine that field's value (filter-exclusion on the self-field)."
method: POST
path: "/api/v{version}/borehole/suggest"
tags: ["Borehole"]
---

# Returns autocomplete suggestions for a borehole text column. When a
filterRequest is supplied, suggestions are restricted to boreholes
matching every active filter except the filter on the field being autocompleted, so the
user can refine that field's value (filter-exclusion on the self-field).

`POST /api/v{version}/borehole/suggest`

## Path parameters

- `version` string, required

## Query parameters

- `field` 'OriginalName' | 'ProjectName' | 'Name' — The set of borehole text columns that support suggestions. Bound from the query string as camelCase ("originalName", "projectName", "name").
- `query` string
- `limit` integer

## Request body

- FilterRequest — Represents a request to filter boreholes by various criteria.
  - `polygon` Geometry
    - `factory` GeometryFactory
      - `precisionModel` PrecisionModel
        - `isFloating` boolean
        - `maximumSignificantDigits` integer
        - `scale` number, double
        - `gridSize` number, double
        - `precisionModelType` 0 | 1 | 2
      - `coordinateSequenceFactory` CoordinateSequenceFactory
        - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
      - `srid` integer
      - `geometryServices` NtsGeometryServices
        - `geometryOverlay` GeometryOverlay
        - `coordinateEqualityComparer` CoordinateEqualityComparer
        - `defaultSRID` integer
        - `defaultCoordinateSequenceFactory` CoordinateSequenceFactory
          - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
        - `defaultPrecisionModel` PrecisionModel
          - `isFloating` boolean
          - `maximumSignificantDigits` integer
          - `scale` number, double
          - `gridSize` number, double
          - `precisionModelType` 0 | 1 | 2
    - `userData` unknown
    - `srid` integer
    - `geometryType` string, nullable
    - `ogcGeometryType` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16
    - `precisionModel` PrecisionModel
      - `isFloating` boolean
      - `maximumSignificantDigits` integer
      - `scale` number, double
      - `gridSize` number, double
      - `precisionModelType` 0 | 1 | 2
    - `coordinate` Coordinate
      - `x` number, double
      - `y` number, double
      - `z` number, double
      - `m` number, double
      - `coordinateValue` Coordinate — recursive
      - `isValid` boolean
    - `coordinates` Coordinate[], nullable
      - `x` number, double
      - `y` number, double
      - `z` number, double
      - `m` number, double
      - `coordinateValue` Coordinate — recursive
      - `isValid` boolean
    - `numPoints` integer
    - `numGeometries` integer
    - `isSimple` boolean
    - `isValid` boolean
    - `isEmpty` boolean
    - `area` number, double
    - `length` number, double
    - `centroid` Point
      - `factory` GeometryFactory
        - `precisionModel` PrecisionModel
          - `isFloating` boolean
          - `maximumSignificantDigits` integer
          - `scale` number, double
          - `gridSize` number, double
          - `precisionModelType` 0 | 1 | 2
        - `coordinateSequenceFactory` CoordinateSequenceFactory
          - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
        - `srid` integer
        - `geometryServices` NtsGeometryServices
          - `geometryOverlay` GeometryOverlay
          - `coordinateEqualityComparer` CoordinateEqualityComparer
          - `defaultSRID` integer
          - `defaultCoordinateSequenceFactory` CoordinateSequenceFactory
            - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
          - `defaultPrecisionModel` PrecisionModel
            - `isFloating` boolean
            - `maximumSignificantDigits` integer
            - `scale` number, double
            - `gridSize` number, double
            - `precisionModelType` 0 | 1 | 2
      - `userData` unknown
      - `srid` integer
      - `precisionModel` PrecisionModel
        - `isFloating` boolean
        - `maximumSignificantDigits` integer
        - `scale` number, double
        - `gridSize` number, double
        - `precisionModelType` 0 | 1 | 2
      - `numGeometries` integer
      - `isSimple` boolean
      - `isValid` boolean
      - `area` number, double
      - `length` number, double
      - `centroid` Point — recursive
      - `interiorPoint` Point — recursive
      - `pointOnSurface` Point — recursive
      - `envelope` Geometry — recursive
      - `envelopeInternal` Envelope
        - `isNull` boolean
        - `width` number, double
        - `height` number, double
        - `diameter` number, double
        - `minX` number, double
        - `maxX` number, double
        - `minY` number, double
        - `maxY` number, double
        - `area` number, double
        - `minExtent` number, double
        - `maxExtent` number, double
        - `centre` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
      - `isRectangle` boolean
      - `coordinateSequence` CoordinateSequence
        - `dimension` integer
        - `measures` integer
        - `spatial` integer
        - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
        - `hasZ` boolean
        - `hasM` boolean
        - `zOrdinateIndex` integer
        - `mOrdinateIndex` integer
        - `first` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
        - `last` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
        - `count` integer
      - `coordinates` Coordinate[], nullable
        - `x` number, double
        - `y` number, double
        - `z` number, double
        - `m` number, double
        - `coordinateValue` Coordinate — recursive
        - `isValid` boolean
      - `numPoints` integer
      - `isEmpty` boolean
      - `dimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
      - `boundaryDimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
      - `x` number, double
      - `y` number, double
      - `coordinate` Coordinate
        - `x` number, double
        - `y` number, double
        - `z` number, double
        - `m` number, double
        - `coordinateValue` Coordinate — recursive
        - `isValid` boolean
      - `geometryType` string, nullable
      - `ogcGeometryType` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16
      - `boundary` Geometry — recursive
      - `z` number, double
      - `m` number, double
    - `interiorPoint` Point
      - `factory` GeometryFactory
        - `precisionModel` PrecisionModel
          - `isFloating` boolean
          - `maximumSignificantDigits` integer
          - `scale` number, double
          - `gridSize` number, double
          - `precisionModelType` 0 | 1 | 2
        - `coordinateSequenceFactory` CoordinateSequenceFactory
          - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
        - `srid` integer
        - `geometryServices` NtsGeometryServices
          - `geometryOverlay` GeometryOverlay
          - `coordinateEqualityComparer` CoordinateEqualityComparer
          - `defaultSRID` integer
          - `defaultCoordinateSequenceFactory` CoordinateSequenceFactory
            - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
          - `defaultPrecisionModel` PrecisionModel
            - `isFloating` boolean
            - `maximumSignificantDigits` integer
            - `scale` number, double
            - `gridSize` number, double
            - `precisionModelType` 0 | 1 | 2
      - `userData` unknown
      - `srid` integer
      - `precisionModel` PrecisionModel
        - `isFloating` boolean
        - `maximumSignificantDigits` integer
        - `scale` number, double
        - `gridSize` number, double
        - `precisionModelType` 0 | 1 | 2
      - `numGeometries` integer
      - `isSimple` boolean
      - `isValid` boolean
      - `area` number, double
      - `length` number, double
      - `centroid` Point — recursive
      - `interiorPoint` Point — recursive
      - `pointOnSurface` Point — recursive
      - `envelope` Geometry — recursive
      - `envelopeInternal` Envelope
        - `isNull` boolean
        - `width` number, double
        - `height` number, double
        - `diameter` number, double
        - `minX` number, double
        - `maxX` number, double
        - `minY` number, double
        - `maxY` number, double
        - `area` number, double
        - `minExtent` number, double
        - `maxExtent` number, double
        - `centre` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
      - `isRectangle` boolean
      - `coordinateSequence` CoordinateSequence
        - `dimension` integer
        - `measures` integer
        - `spatial` integer
        - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
        - `hasZ` boolean
        - `hasM` boolean
        - `zOrdinateIndex` integer
        - `mOrdinateIndex` integer
        - `first` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
        - `last` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
        - `count` integer
      - `coordinates` Coordinate[], nullable
        - `x` number, double
        - `y` number, double
        - `z` number, double
        - `m` number, double
        - `coordinateValue` Coordinate — recursive
        - `isValid` boolean
      - `numPoints` integer
      - `isEmpty` boolean
      - `dimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
      - `boundaryDimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
      - `x` number, double
      - `y` number, double
      - `coordinate` Coordinate
        - `x` number, double
        - `y` number, double
        - `z` number, double
        - `m` number, double
        - `coordinateValue` Coordinate — recursive
        - `isValid` boolean
      - `geometryType` string, nullable
      - `ogcGeometryType` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16
      - `boundary` Geometry — recursive
      - `z` number, double
      - `m` number, double
    - `pointOnSurface` Point
      - `factory` GeometryFactory
        - `precisionModel` PrecisionModel
          - `isFloating` boolean
          - `maximumSignificantDigits` integer
          - `scale` number, double
          - `gridSize` number, double
          - `precisionModelType` 0 | 1 | 2
        - `coordinateSequenceFactory` CoordinateSequenceFactory
          - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
        - `srid` integer
        - `geometryServices` NtsGeometryServices
          - `geometryOverlay` GeometryOverlay
          - `coordinateEqualityComparer` CoordinateEqualityComparer
          - `defaultSRID` integer
          - `defaultCoordinateSequenceFactory` CoordinateSequenceFactory
            - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
          - `defaultPrecisionModel` PrecisionModel
            - `isFloating` boolean
            - `maximumSignificantDigits` integer
            - `scale` number, double
            - `gridSize` number, double
            - `precisionModelType` 0 | 1 | 2
      - `userData` unknown
      - `srid` integer
      - `precisionModel` PrecisionModel
        - `isFloating` boolean
        - `maximumSignificantDigits` integer
        - `scale` number, double
        - `gridSize` number, double
        - `precisionModelType` 0 | 1 | 2
      - `numGeometries` integer
      - `isSimple` boolean
      - `isValid` boolean
      - `area` number, double
      - `length` number, double
      - `centroid` Point — recursive
      - `interiorPoint` Point — recursive
      - `pointOnSurface` Point — recursive
      - `envelope` Geometry — recursive
      - `envelopeInternal` Envelope
        - `isNull` boolean
        - `width` number, double
        - `height` number, double
        - `diameter` number, double
        - `minX` number, double
        - `maxX` number, double
        - `minY` number, double
        - `maxY` number, double
        - `area` number, double
        - `minExtent` number, double
        - `maxExtent` number, double
        - `centre` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
      - `isRectangle` boolean
      - `coordinateSequence` CoordinateSequence
        - `dimension` integer
        - `measures` integer
        - `spatial` integer
        - `ordinates` 0 | 1 | 2 | 3 | 4 | 7 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65535 | 65536 | 65539 | 65543 | 131072 | 262144 | 524288 | 1048576 | 2097152 | 4194304 | 8388608 | 16777216 | 33554432 | 67108864 | 134217728 | 268435456 | 536870912 | 1073741824 | -2147483648 | -65536 | -1
        - `hasZ` boolean
        - `hasM` boolean
        - `zOrdinateIndex` integer
        - `mOrdinateIndex` integer
        - `first` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
        - `last` Coordinate
          - `x` number, double
          - `y` number, double
          - `z` number, double
          - `m` number, double
          - `coordinateValue` Coordinate — recursive
          - `isValid` boolean
        - `count` integer
      - `coordinates` Coordinate[], nullable
        - `x` number, double
        - `y` number, double
        - `z` number, double
        - `m` number, double
        - `coordinateValue` Coordinate — recursive
        - `isValid` boolean
      - `numPoints` integer
      - `isEmpty` boolean
      - `dimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
      - `boundaryDimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
      - `x` number, double
      - `y` number, double
      - `coordinate` Coordinate
        - `x` number, double
        - `y` number, double
        - `z` number, double
        - `m` number, double
        - `coordinateValue` Coordinate — recursive
        - `isValid` boolean
      - `geometryType` string, nullable
      - `ogcGeometryType` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16
      - `boundary` Geometry — recursive
      - `z` number, double
      - `m` number, double
    - `dimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
    - `boundary` Geometry — recursive
    - `boundaryDimension` 0 | 1 | 2 | 3 | -3 | -2 | -1
    - `envelope` Geometry — recursive
    - `envelopeInternal` Envelope
      - `isNull` boolean
      - `width` number, double
      - `height` number, double
      - `diameter` number, double
      - `minX` number, double
      - `maxX` number, double
      - `minY` number, double
      - `maxY` number, double
      - `area` number, double
      - `minExtent` number, double
      - `maxExtent` number, double
      - `centre` Coordinate
        - `x` number, double
        - `y` number, double
        - `z` number, double
        - `m` number, double
        - `coordinateValue` Coordinate — recursive
        - `isValid` boolean
    - `isRectangle` boolean
  - `originalName` string, nullable — Gets or sets the original name filter.
  - `projectName` string, nullable — Gets or sets the project name filter.
  - `name` string, nullable — Gets or sets the alternate name filter.
  - `statusId` integer[], nullable — Gets or sets the status ID filter.
  - `typeId` integer[], nullable — Gets or sets the borehole type ID filter.
  - `purposeId` integer[], nullable — Gets or sets the purpose ID filter.
  - `workflowStatus` WorkflowStatus[], nullable — Gets or sets the workflow status filter. Matches boreholes whose workflow status is in this set.
  - `workgroupId` integer[], nullable — Gets or sets the workgroup ID filter.
  - `ids` integer[], nullable — Gets or sets multiple borehole IDs filter.
  - `restrictionUntilFrom` string, date, nullable — Gets or sets the restriction until date start filter.
  - `restrictionUntilTo` string, date, nullable — Gets or sets the restriction until date end filter.
  - `totalDepthMin` number, double, nullable — Gets or sets the minimum total depth filter.
  - `totalDepthMax` number, double, nullable — Gets or sets the maximum total depth filter.
  - `topBedrockFreshMdMin` number, double, nullable — Gets or sets the minimum top bedrock fresh depth filter.
  - `topBedrockFreshMdMax` number, double, nullable — Gets or sets the maximum top bedrock fresh depth filter.
  - `topBedrockWeatheredMdMin` number, double, nullable — Gets or sets the minimum top bedrock weathered depth filter.
  - `topBedrockWeatheredMdMax` number, double, nullable — Gets or sets the maximum top bedrock weathered depth filter.
  - `restrictionId` integer[], nullable — Gets or sets the restriction ID filter.
  - `canton` string[], nullable — Gets or sets the canton filter. Boreholes match if their canton is in this set.
  - `municipality` string[], nullable — Gets or sets the municipality filter. Boreholes match if their municipality is in this set.
  - `logToolTypeId` integer[], nullable — Gets or sets the log tool type codelist IDs filter. Boreholes match if any of their log files have at least one of these tool type codelist IDs in their BDMS.Models.LogFile.LogFileToolTypeCodes.
  - `identifierTypeId` integer[], nullable — Gets or sets the identifier type (codelist) IDs filter. Boreholes match if at least one BDMS.Models.BoreholeCodelist row has a `CodelistId` in this set; combined with BDMS.Models.FilterRequest.IdentifierValue the predicates apply on the same row (strict semantics).
  - `identifierValue` string, nullable — Gets or sets the identifier value substring filter (case-insensitive).
  - `nationalInterest` 'False' | 'True' | 'Null' — Represents a boolean filter value for nullable boolean fields.
  - `topBedrockIntersected` 'False' | 'True' | 'Null' — Represents a boolean filter value for nullable boolean fields.
  - `hasGroundwater` 'False' | 'True' | 'Null' — Represents a boolean filter value for nullable boolean fields.
  - `hasGeometry` 'False' | 'True' — Represents a boolean filter value for non-nullable boolean fields.
  - `hasLogs` 'False' | 'True' — Represents a boolean filter value for non-nullable boolean fields.
  - `hasProfiles` 'False' | 'True' — Represents a boolean filter value for non-nullable boolean fields.
  - `hasPhotos` 'False' | 'True' — Represents a boolean filter value for non-nullable boolean fields.
  - `hasDocuments` 'False' | 'True' — Represents a boolean filter value for non-nullable boolean fields.
  - `pageNumber` integer — Gets or sets the page number for pagination.
  - `pageSize` integer — Gets or sets the page size for pagination.
  - `orderBy` 'Id' | 'OriginalName' | 'Name' | 'WorkgroupId' | 'StatusId' | 'TypeId' | 'PurposeId' | 'LocationX' | 'LocationY' | 'ElevationZ' | 'TotalDepth' — Defines the valid fields by which a borehole list can be ordered.
  - `direction` 'Asc' | 'Desc' — Defines the order direction for ordering borehole results.

## Response `200`

OK

- BoreholeSuggestion[]
  - `value` string — The distinct text value present on one or more boreholes.
  - `count` integer — How many boreholes in the caller's visible set have this value.

---

[API](https://skmtc.net/geoadmin/apis/boreholes-rest-api-v2.md) · [All operations](https://skmtc.net/geoadmin/apis/boreholes-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geoadmin/boreholes-rest-api-v2/revisions/e6d0b4ee0f52/schema)
