Coveo Search API

The Search API from Coveo — 4 operation(s) for search.

Operations 4

POST /rest/organizations/{organizationId}/commerce/v2/search/redirect Execute a Search Redirect Query #
POST /rest/organizations/{organizationId}/commerce/v2/search/querySuggest Request Query Suggestions #
POST /rest/organizations/{organizationId}/commerce/v2/search/productSuggest Request Product Suggestions #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-passagev3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetrequest-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetresultvalue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupby-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupbyresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupbyvalue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-resthighlightresponse-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restquerycorrection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryfunction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryparameters-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryparentresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryresponse-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restrankingfunction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-retrievepassagesrequestv3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-retrievepassagesresponsev3-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-passagev3-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetrequest-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetresultvalue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupby-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupbyresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupbyvalue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-resthighlightresponse-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restquerycorrection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryfunction-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryparameters-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryparentresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryresponse-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restrankingfunction-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-retrievepassagesrequestv3-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-retrievepassagesresponsev3-structure.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coveo-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coveo-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Coveo Commerce Search API
  description: API for Coveo Platform
  termsOfService: https://www.coveo.com/en/support/terms-agreements
  contact:
    name: Coveo
    url: https://connect.coveo.com/s/discussions
  version: 1.0.0
servers:
- url: https://platform.cloud.coveo.com
  description: Coveo public API endpoint
security:
- oauth2:
  - full
tags:
- name: Search
paths:
  /rest/organizations/{organizationId}/commerce/v2/search:
    post:
      tags:
      - Search
      summary: Execute a Search Query
      description: 'Returns products linked to a user query and merchandiser defined hub.</br></br>**Required privilege:** Execute Query<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","targetId":"*"}

        ```

        </details>'
      operationId: search
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequestModel_V2SearchProductView'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SearchResponseModel_V2SearchProductView'
      x-pretty-name: search
      x-required-privilege:
        owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-required-privileges:
      - owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/search_post
  /rest/organizations/{organizationId}/commerce/v2/search/redirect:
    post:
      tags:
      - Search
      summary: Execute a Search Redirect Query
      description: 'Returns a redirect linked to a user query and merchandiser defined hub.</br></br>**Required privilege:** Execute Query<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","targetId":"*"}

        ```

        </details>'
      operationId: redirect
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRedirectRequestModel_V2SearchProductView'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SearchRedirectResponseModel_V2SearchProductView'
      x-pretty-name: redirect
      x-required-privilege:
        owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-required-privileges:
      - owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/search/redirect_post
  /rest/organizations/{organizationId}/commerce/v2/search/querySuggest:
    post:
      tags:
      - Search
      summary: Request Query Suggestions
      description: 'Returns query suggestions.</br></br>**Required privilege:** Execute Query<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","targetId":"*"}

        ```

        </details>'
      operationId: querySuggest
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuerySuggestRequestModel'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/QuerySuggestResponseModel'
      x-pretty-name: querySuggest
      x-required-privilege:
        owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-required-privileges:
      - owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/search/querySuggest_post
  /rest/organizations/{organizationId}/commerce/v2/search/productSuggest:
    post:
      tags:
      - Search
      summary: Request Product Suggestions
      description: 'Returns product suggestions.</br></br>**Required privilege:** Execute Query<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"SEARCH_API","targetDomain":"EXECUTE_QUERY","targetId":"*"}

        ```

        </details>'
      operationId: productSuggest
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequestModel_V2SearchProductView'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SearchResponseModel_V2SearchProductView'
      x-pretty-name: productSuggest
      x-required-privilege:
        owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-required-privileges:
      - owner: SEARCH_API
        targetDomain: EXECUTE_QUERY
        targetId: '*'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/search/productSuggest_post
components:
  schemas:
    QueryCorrectionResponse_V2SearchProductView:
      type: object
      properties:
        originalQuery:
          type: string
          description: If the query was automatically corrected, this property indicates the original basic query expression (q) that triggered the automatic query correction.
        correctedQuery:
          type: string
          description: If the query was automatically corrected, this property indicates the corrected basic query expression (q) that was executed instead of the original one.
        corrections:
          type: array
          description: If the query wasn't automatically corrected, this property contains the basic query expression (q) keyword corrections provided by the Did You Mean index feature.
          example:
          - correctedQuery: Coveo Cloud V2 platform
            wordCorrections:
            - correctedWord: platform
              length: 8
              offset: 15
              originalWord: plattfomr
          items:
            $ref: '#/components/schemas/QueryCorrection_V2SearchProductView'
      description: The query correction response, if the query was corrected.
    RequestFacetBaseObject_V2SearchProductView:
      required:
      - field
      - values
      type: object
      properties:
        facetId:
          type: string
          description: Name of the field to execute the facet search request against.
          example: color
        field:
          minLength: 1
          type: string
          description: The facet field name.
          example: ec_brand
        displayName:
          type: string
          description: The facet display name.
          example: Brand
        values:
          minItems: 1
          type: array
          description: The values displayed by the facet in the search interface at the moment of the request.
          items:
            type: object
            description: The values displayed by the facet in the search interface at the moment of the request.
        numberOfValues:
          type: object
          properties:
            empty:
              type: boolean
            present:
              type: boolean
            asInt:
              type: integer
              format: int32
          description: 'The maximum number of facet values to fetch. It should typically be set to the value last received

            in the `numberOfValues` property of the facet response.

            <br/>

            <br/>

            An exception to this guideline is the case where the last response had

            `moreValuesAvailable=true` and the user asks to see more values for this facet. In this case,

            the front-end is expected to send a value greater than the `numberOfValues` that it last received

            in the response. This ensures that more values are fetched from the index.

            <br/>

            <br/>

            When not provided, the default number of values configured for this facet is used.

            '
        type:
          type: string
          description: 'One of: `regular`, `dateRange`, `numericalRange`, `hierarchical`. For more information, see the [facet types](https://docs.coveo.com/en/p3oa0420#facet-types) documentation.'
          enum:
          - regular
          - dateRange
          - numericalRange
          - hierarchical
          - regular
      description: The facet operations to perform on the query. Note that this parameter is ignored in the '/productSuggest' endpoint.
      example:
      - field: ec_category
        type: regular
        values:
        - value: shoes
          state: idle
      discriminator:
        propertyName: type
    RegularValueModel_V2SearchProductView:
      required:
      - value
      type: object
      properties:
        state:
          type: string
          description: The current facet value state in the search interface.
          enum:
          - idle
          - selected
        preventAutoSelect:
          type: boolean
          description: Whether to prevent Coveo ML from automatically selecting facet values.
        value:
          minLength: 1
          type: string
          description: The facet value name.
      description: The values displayed by the facet in the search interface at the moment of the request.
    Product_V2SearchProductView:
      type: object
      allOf:
      - $ref: '#/components/schemas/Result_V2SearchProductView'
      - type: object
        properties:
          additionalFields:
            type: object
            additionalProperties:
              type: object
              description: The product additional fields.
              example:
                size: M
                material: cotton
            description: The product additional fields.
            example:
              size: M
              material: cotton
          queryPinned:
            type: boolean
            description: Indicates whether the product was pinned by a reserved position rule.
            example: true
          badgePlacements:
            type: array
            description: The list of badge placements associated with this product.
            items:
              $ref: '#/components/schemas/BadgePlacementViewModel_V2SearchProductView'
          ec_name:
            type: string
            description: The product name.
            example: ACME T-Shirt.
          ec_description:
            type: string
            description: The product description.
            example: A very nice T-Shirt. Comes in blue and green colors.
          ec_shortdesc:
            type: string
            description: The product short description.
            example: A very nice T-Shirt.
          ec_brand:
            type: string
            description: The product brand.
            example: ACME
          ec_category:
            type: array
            description: The product category.
            example:
            - T-Shirts
            items:
              type: string
              description: The product category.
              example: '["T-Shirts"]'
          ec_thumbnails:
            type: array
            description: The product thumbnails.
            example:
            - https://example.com/thumbnail1.jpg
            - https://example.com/thumbnail2.jpg
            items:
              type: string
              description: The product thumbnails.
              example: '["https://example.com/thumbnail1.jpg","https://example.com/thumbnail2.jpg"]'
          ec_images:
            type: array
            description: The product images.
            example:
            - https://example.com/image1.jpg
            - https://example.com/image2.jpg
            items:
              type: string
              description: The product images.
              example: '["https://example.com/image1.jpg","https://example.com/image2.jpg"]'
          ec_price:
            type: number
            description: The product price.
            format: double
            example: 19.99
          ec_promo_price:
            type: number
            description: The product promotional price.
            format: double
            example: 14.99
          ec_in_stock:
            type: boolean
            description: The product availability.
            example: true
          ec_item_group_id:
            type: string
            description: The product item group identifier.
            example: '0000003035'
          ec_rating:
            type: number
            description: The product rating.
            format: double
            example: 4.5
          ec_product_id:
            type: string
            description: The product identifier.
            example: 0000003035-45
          ec_gender:
            type: string
            description: The intended gender of the product user.
            example: M
          ec_color:
            type: string
            description: The product color.
            example: Blue
          ec_listing:
            type: string
            description: The product listing.
            example: T-Shirt
          clickUri:
            type: string
            description: The product click URI.
            example: https://example.com/product/0000003035-45
          permanentid:
            type: string
            description: The product permanent identifier.
            example: 0000003035-45
          nameHighlights:
            type: array
            description: The product name highlights.
            example:
            - ACME
            - T-Shirt
            items:
              $ref: '#/components/schemas/Highlight_V2SearchProductView'
          excerpt:
            type: string
            description: The product exerts.
            example: The T-Shirt is very nice
          excerptHighlights:
            type: array
            description: The product exerts highlights.
            items:
              $ref: '#/components/schemas/Highlight_V2SearchProductView'
          children:
            type: array
            description: The product child results.
            items:
              $ref: '#/components/schemas/ChildProduct_V2SearchProductView'
          totalNumberOfChildren:
            type: integer
            description: The total number of child results.
            format: int32
            example: 2
    SearchRequestModel_V2SearchProductView:
      required:
      - context
      - country
      - currency
      - language
      - query
      - trackingId
      type: object
      properties:
        trackingId:
          minLength: 1
          type: string
          description: The unique identifier of the tracking target.
          example: acmecorporation_ca
        language:
          minLength: 1
          type: string
          description: An ISO 639-1 language code.
          example: en
        country:
          minLength: 1
          type: string
          description: An ISO 3166-1 alpha-2 country code.
          example: US
        currency:
          minLength: 1
          type: string
          description: An ISO 4217 currency code.
          example: USD
        clientId:
          type: string
          description: A GUID which represents the current client.\n\nIf your implementation uses the Atomic or Headless libraries, then the [client ID](https://docs.coveo.com/en/masb0234/) is generated automatically in client-side code.\n\nIf you have a custom Coveo implementation, you will have to generate a [UUID v4](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)>)-formatted GUID. You will need to send this ID in every request that is sent to the Commerce API.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.
          example: 58bb4b98-1daa-4767-8c15-90a0ea67645c
        facets:
          type: array
          description: The facet operations to perform on the query. Note that this parameter is ignored in the '/productSuggest' endpoint.
          example:
          - field: ec_category
            type: regular
            values:
            - value: shoes
              state: idle
          items:
            oneOf:
            - $ref: '#/components/schemas/DateRangeFacetModel_V2SearchProductView'
            - $ref: '#/components/schemas/HierarchicalFacetModel_V2SearchProductView'
            - $ref: '#/components/schemas/NumericalRangeFacetModel_V2SearchProductView'
            - $ref: '#/components/schemas/RegularFacetModel_V2SearchProductView'
        page:
          minimum: 0
          type: integer
          description: The page of products to request.
          format: int32
          example: 7
        perPage:
          maximum: 1000
          minimum: 1
          type: integer
          description: The number of products per page. Note that a value greater than 100 may be rejected in the future.
          format: int32
          example: 30
        sort:
          oneOf:
          - $ref: '#/components/schemas/SortByFieldsRequestResponseModel_V2SearchProductView'
          - $ref: '#/components/schemas/SortByRelevanceRequestResponseModel_V2SearchProductView'
        debug:
          type: boolean
          description: Whether to include the execution report on a successful response.
          example: true
        query:
          type: string
          description: The query expression, typically the keywords entered by the end user in a search box.
          example: blue shoes
        context:
          $ref: '#/components/schemas/ContextModel_V2SearchProductView'
        legacyFacetOptions:
          $ref: '#/components/schemas/LegacyFacetOptions_V2SearchProductView'
        enableResults:
          type: boolean
          description: Enable spotlight content in the results. When enabled, the products list in the response will always be empty and the results list should be used instead.
      description: The query suggestion request to be executed.
    HierarchicalFacetModel_V2SearchProductView:
      required:
      - field
      - values
      type: object
      description: Hierarchical (tree-like) facet.
      example:
        facetId: ec_category
        field: ec_category
        displayNames:
        - value: Category
          language: en
        - value: Catégorie
          language: fr
        values:
        - state: selected
          preventAutoSelect: true
          value: Canoes & Kayaks
          children:
          - state: selected
            preventAutoSelect: true
            value: Kayaks
            children:
            - state: selected
              preventAutoSelect: true
              value: Folding Kayaks
          - state: idle
            preventAutoSelect: true
            value: Sea Kayaks
        - state: selected
          preventAutoSelect: false
          value: Canoes
        numberOfValues: 5
        preventAutoSelect: true
        sortCriteria: score
        isFieldExpanded: true
        type: hierarchical
        delimitingCharacter: '|'
        basePath:
        - Boats
        filterByBasePath: true
      allOf:
      - $ref: '#/components/schemas/RequestFacetBaseObject_V2SearchProductView'
      - type: object
        properties:
          values:
            minItems: 1
            type: array
            description: The values displayed by the facet in the search interface at the moment of the request.
            items:
              $ref: '#/components/schemas/HierarchicalValueModel_V2SearchProductView'
          preventAutoSelect:
            type: boolean
            description: Whether to prevent Coveo ML from automatically selecting facet values.
          sortCriteria:
            type: string
            description: The criterion to use for sorting returned facet values.
            enum:
            - score
            - alphanumericNatural
            - alphanumeric
            - occurrences
          delimitingCharacter:
            type: string
            description: The character to use to split field values into a hierarchical sequence.
          filterByBasePath:
            type: boolean
            description: Whether to use basePath as a filter for the results.
          retrieveCount:
            type: object
            properties:
              empty:
                type: boolean
              present:
                type: boolean
              asInt:
                type: integer
                format: int32
            description: The maximum number of children to retrieve for this hierarchical facet values.
          isFieldExpanded:
            type: boolean
            description: The value provided is only copied back in the `isFieldExpanded` property of the response. It does not affect the behaviour of the Commerce Service in any way.
    NumericalRangeFacetResult_V2SearchProductView:
      type: object
      allOf:
      - $ref: '#/components/schemas/AbstractFacetResultObject_V2SearchProductView'
      - type: object
        properties:
          values:
            type: array
            items:
              $ref: '#/components/schemas/NumericalRangeFacetResultValue_V2SearchProductView'
          moreValuesAvailable:
            type: boolean
          fromAutoSelect:
            type: boolean
          domain:
            $ref: '#/components/schemas/RangeDomain_V2SearchProductView'
          interval:
            type: string
            enum:
            - continuous
            - discrete
            - even
            - equiprobable
          isFieldExpanded:
            type: boolean
            description: 'The value received in the `isFieldExpanded` property of the request.  If the facet was

              not part of the request, `false` is returned.

              '
    SortByFieldsRequestResponseModel_V2SearchProductView:
      required:
      - fields
      type: object
      allOf:
      - $ref: '#/components/schemas/AbstractSortRequestResponseModel_V2SearchProductView'
      - type: object
        properties:
          fields:
            minItems: 1
            type: array
            description: Defines the fields and, optionally, their sort order.
            items:
              $ref: '#/components/schemas/SortByFieldRequestResponseModel_V2SearchProductView'
    AbstractFacetResultObject_V2SearchProductView:
      required:
      - type
      type: object
      properties:
        facetId:
          type: string
        field:
          type: string
        displayName:
          type: string
        values:
          type: array
          items:
            type: object
        numberOfValues:
          type: integer
          description: 'The number of values that were requested to the index for this facet. When the facet

            is part of the request and the `numberOfValues` request parameter is not null, the returned value

            will be equal to the value found in the request. Otherwise, the returned value will be equal to

            the default number of values configured for this facet.

            <br/>

            <br/>

            <b>Note:</b> This value can be greater than the number of values returned in the `values` array.

            '
          format: int32
        type:
          type: string
      description: The available facets. Note that this array will always be empty in the '/productSuggest' endpoint.
      discriminator:
        propertyName: type
    SortByRelevanceRequestResponseModel_V2SearchProductView:
      type: object
      allOf:
      - $ref: '#/components/schemas/AbstractSortRequestResponseModel_V2SearchProductView'
    HierarchicalFacetResult_V2SearchProductView:
      type: object
      allOf:
      - $ref: '#/components/schemas/AbstractFacetResultObject_V2SearchProductView'
      - type: object
        properties:
          values:
            type: array
            items:
              $ref: '#/components/schemas/HierarchicalFacetResultValue_V2SearchProductView'
          delimitingCharacter:
            type: string
          moreValuesAvailable:
            type: boolean
          fromAutoSelect:
            type: boolean
          isFieldExpanded:
            type: boolean
            description: 'The value received in the `isFieldExpanded` property of the request.  If the facet was

              not part of the request, `false` is returned.

              '
    DateRangeFacetResult_V2SearchProductView:
      type: object
      allOf:
      - $ref: '#/components/schemas/AbstractFacetResultObject_V2SearchProductView'
      - type: object
        properties:
          values:
            type: array
            items:
              $ref: '#/components/schemas/DateRangeFacetResultValue_V2SearchProductView'
          moreValuesAvailable:
            type: boolean
          fromAutoSelect:
            type: boolean
          isFieldExpanded:
            type: boolean
            description: 'The value received in the `isFieldExpanded` property of the request.  If the facet was

              not part of the request, `false` is returned.

              '
    HierarchicalFacetResultValue_V2SearchProductView:
      type: object
      properties:
        state:
          type: string
          enum:
          - idle
          - selected
        numberOfResults:
          type: integer
          format: int64
        isAutoSelected:
          type: boolean
        isSuggested:
          type: boolean
        moreValuesAvailable:
          type: boolean
          description: Whether additional facet values matching the request are available.
        value:
          type: string
          description: This represents a single path segment.
        path:
          type: array
          items:
            type: string
        isLeafValue:
          type: boolean
        children:
          type: array
          description: The children of this hierarchical facet value.
          items:
            $ref: '#/components/schemas/HierarchicalFacetResultValue_V2SearchProductView'
    NumericalRangeFacetModel_V2SearchProductView:
      required:
      - field
      - values
      type: object
      description: Numerical range facet.
      example:
        facetId: ec_price
        field: ec_price
        displayNames:
        - value: Price
          language: en
        - value: Prix
          language: fr
        values:
        - state: idle
          preventAutoSelect: true
          start: '0'
          end: '999'
          endInclusive: 'true'
        - state: selected
          preventAutoSelect: true
          start: '1000'
          end: '2000'
          endInclusive: 'false'
        - state: selected
          preventAutoSelect: true
          start: '2001'
          end: '3000'
          endInclusive: 'false'
        numberOfValues: 3
        preventAutoSelect: true
        sortCriteria: score
        isFieldExpanded: true
        type: numericalRange
      allOf:
      - $ref: '#/components/schemas/RequestFacetBaseObject_V2SearchProductView'
      - type: object
        properties:
          values:
            minItems: 1
            type: array
            description: The values displayed by the facet in the search interface at the moment of the request.
            items:
              $ref: '#/components/schemas/NumericalRangeValueModel_V2SearchProductView'
          preventAutoSelect:
            type: boolean
            description: Whether to prevent Coveo ML from automatically selecting facet values.
          sortCriteria:
            type: string
            description: The criterion to use for sorting returned facet values.
            enum:
            - score
            - alphanumericNatural
            - alphanumeric
            - occurrences
          interval:
            type: string
            description: Determines the range interval type. Default is `continuous`.
            default: continuous
            enum:
            - continuous
            - discrete
            - even
            - equiprobable
          domain:
            $ref: '#/components/schemas/RangeDomain_V2SearchProductView'
          freezeCurrentValues:
            type: boolean
            description: Should always be set to `false` except when selecting/unselecting facet values. See [here](https://docs.coveo.com/en/3199/build-a-search-ui/implement-facets#toggle-facet-values) for more guidance.
          isFieldExpanded:
            type: boolean
            description: The value provided is only copied back in the `isFieldExpanded` property of the response. It does not affect the behaviour of the Commerce Service in any way.
    QuerySuggestRequestModel:
      required:
      - context
      - currency
      - language
      - trackingId
      type: object
      properties:
        query:
          type: string
          description: The query expression, typically the keywords entered by the end user in a search box.
          example: blue shoes
        trackingId:
          minLength: 1
          type: string
          description: The unique identifier of the tracking target.
          example: acmecorporation_ca
        language:
          minLength: 1
          type: string
          description: An ISO 639-1 language code.
          example: en
        currency:
          minLength: 1
          type: string
          description: An ISO 4217 currency code.
          example: USD
        clientId:
          type: string
          description: A GUID which represents the current client.\n\nIf your implementation uses the Atomic or Headless libraries, then the [client ID](https://docs.coveo.com/en/masb0234/) is generated automatically in client-side code.\n\nIf you have a custom Coveo implementation, you will have to generate a [UUID v4](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)>)-formatted GUID. You will need to send this ID in every request that is sent to the Commerce API.\n\nCoveo Machine Learning models may use this information to provide contextually relevant output.
          example: 58bb4b98-1daa-4767-8c15-90a0ea67645c
        context:
          $ref: '#/components/schemas/ContextModel'
        count:
          maximum: 1000
          minimum: 1
          type: integer
          description: The number of suggested queries to return.
          format: int32
          example: 30
        debug:
          type: boolean
          description: Whether to include the execution report on a successful response.
          example: true
      description: The query suggestion request to be executed.
    QuerySuggestResponseModel:
      type: object
      properties:
        responseId:
          type: string
          description: The unique identifier of the API response. It can be attached to any subsequent impression or click event to attribute them to the request.
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        completions:
          type: array
          description: The list of query suggestions.
          items:
            $ref: '#/components/schemas/Completion'
    ProductForPreview_V2SearchProductView:
      type: object
      allOf:
      - $ref: '#/components/schemas/Result_V2SearchProductView'
      - type: object
        properties:
          score:
            type: integer
            descript

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/openapi/coveo-search-api-openapi.yml