younifyd
Menu

Document V3

Get item in JSON format

GET/rest/search/v3/document

Use it in a workflow

  1. Add a step and choose the Coveo connector.
  2. Pick the Document V3 action (under Search).
  3. Fill in the fields below, then reference the result from later steps as {{documentV3.response.data}}.

Request

Query parameters

primaryIdstring

The primary ID of the document.

uniqueIdstring

**Deprecated:** Use `primaryId` instead. The unique ID of the document.

organizationIdstring

The unique identifier of the target Coveo Cloud organization. Specifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token.

pipelinestring

The name of the query pipeline to use for this request (bypassing its conditions, if it has any). You can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `"pipeline": ""`). If a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any). **Notes:** - This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition. - For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `"default"` value. - When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491). See also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).

searchHubstring

The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Notes:** - This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition. - When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter. See also the `tab` parameter.

viewAllContentboolean

Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege.

localestring

The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition. Coveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object. **Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).

timezonestring

The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items. If not specified, the default time zone of the server hosting the index is used. **Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.

indexTokenstring

The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter. If you do not specify an `indexToken` (or `index`) value, any index mirror could be used. **Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).

indexstring

The identifier of the index mirror to forward the request to. See also the `indexToken` parameter. If you do not specify an `index` (or `indexToken`) value, any index mirror could be used. **Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).

logicalIndexstring

The identifier for a logical group of indexes that have been configured to include documents from the same sources. If you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.

tabstring

The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `"default"` string, if no `tab` value was specified in the query). See also the `searchHub` parameter.

referrerstring

The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value). Coveo Machine Learning models may use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified. See also the `context` parameter.

contextany

The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings. Coveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object. **Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`). See also the `referrer` parameter. **Example** `{"userAgeRange":"25-35","userRoles":["PremiumCustomer","ProductReviewer"]}`

Response

Returns 200 with an object. Read it in later steps with {{documentV3.response.data.<field>}}.

ClickUristring

> This property is deprecated; it should not be populated by Search API V2 searches.

Excerptstring

> This property is deprecated; it should not be populated by Search API V2 searches.

FirstSentencesstring

> This property is deprecated; it should not be populated by Search API V2 searches.

PrintableUristring

> This property is deprecated; it should not be populated by Search API V2 searches.

Titlestring

> This property is deprecated; it should not be populated by Search API V2 searches.

UniqueIdstring

> This property is deprecated; it should not be populated by Search API V2 searches.

Uristring

> This property is deprecated; it should not be populated by Search API V2 searches.

absentTermsarray<string>

The basic query expression terms which this query result item does not match. **Note:** > This property is populated by terms from the query pipeline-processed `q` value (not from the original `q` value).

childResultsarray<oneOf>

An array of references to the children of this item, if result folding was applied (see the `filterField` query parameter). The query results contained in this field will have both their parent and child results set to `null`.

clickUristring

The hyperlinkable item URI. **Notes:** - Use the `clickUri` value when you want to create hyperlinks to the item, rather than the `uri` or `printableUri` value. - The `clickUri` value is not necessarily unique for each item.

excerptstring

The contextual excerpt generated for the item (see the `excerptLength` query parameter).

excerptHighlightsarray<object>

The length and offset of each word to highlight in the item `excerpt` string.

lengthinteger (int64)required

The length (in number of characters) of the word to highlight.

offsetinteger (int64)required

The 0-based index position of the first character of the word to highlight in the string.

firstSentencesstring

The first sentences retrieved from the item (see the `retrieveFirstSentences` query parameter).

firstSentencesHighlightsarray<object>

The length and offset of each word to highlight in the item `firstSentences` string.

lengthinteger (int64)required

The length (in number of characters) of the word to highlight.

offsetinteger (int64)required

The 0-based index position of the first character of the word to highlight in the string.

flagsstring

The flags that are set on the item by the index. Distinct values are separated by semicolons.

hasHtmlVersionboolean

Whether the index contains an HTML version of this item.

hasMobileHtmlVersionboolean

Whether the index contains a mobile HTML version of this item.

isRecommendationboolean

Whether the item score was boosted as a Coveo ML recommendation.

isTopResultboolean

Whether the item score was boosted by a featured result rule in the query pipeline.

isUserActionViewboolean

Whether the item score was boosted as a Coveo ML recommendation.

parentResultoneOf
percentScorenumber (double)

The item ranking score expressed as a percentage (see the `sortCriteria` and `rankingFunctions` query parameters).

primaryidstring

The primary identifier of the item. See [primaryid field](https://docs.coveo.com/en/pa9c0434) for more details.

printableUristring

The human readable item URI. **Note:** Avoid using the `printableUri` value to create hyperlinks to the item. Use the `ClickUri` value instead.

printableUriHighlightsarray<object>

The length and offset of each word to highlight in the item `printableUri` string.

lengthinteger (int64)required

The length (in number of characters) of the word to highlight.

offsetinteger (int64)required

The 0-based index position of the first character of the word to highlight in the string.

rankingInfostring

The raw debug information generated by the index to detail how the item was ranked. This property is `null` unless the `debug` query parameter is set to `true`.

rankingModifierstring

If applicable, represents the type of ranking modification that was applied to this result. **Note:** When logging a **Click** usage analytics event for an opened query result item, the `rankingModifier` field of that event should be set to the `rankingModifier` value of the opened query result item, if available.

ratingnumber (double)

**Note:** The value of this property is always `3`.

rawobject

The values of the fields which were retrieved for this item (see the `fieldsToInclude` and `fieldsToExclude` query parameters).

scoreinteger (int32)

The total ranking score computed for the item (see the `sortCriteria` and `rankingFunctions` query parameters).

summarystring

The item summary (see the `summaryLength` query parameter).

summaryHighlightsarray<object>

The length and offset of each word to highlight in the item `summary` string.

lengthinteger (int64)required

The length (in number of characters) of the word to highlight.

offsetinteger (int64)required

The 0-based index position of the first character of the word to highlight in the string.

titlestring

The item title. **Note:** When logging a **Click** usage analytics event for an opened query result item, the `documentTitle` field of that event should be set to the `title` value of the opened query result item.

titleHighlightsarray<object>

The length and offset of each word to highlight in the item `title` string.

lengthinteger (int64)required

The length (in number of characters) of the word to highlight.

offsetinteger (int64)required

The 0-based index position of the first character of the word to highlight in the string.

totalNumberOfChildResultsinteger (int64)

The total number of children available in the index for this item, if result folding was applied (see the `filterField` query parameter).

uniqueIdstring

The unique item identifier. You should consider the `uniqueId` value as an opaque string.

uristring

The item URI. **Notes:** - Avoid using the `uri` value to create hyperlinks to the item. Use the `ClickUri` value instead. - When logging a **Click** usage analytics event for an opened query result item, the `documentUrl` field of that event should be set to the `uri` value of the opened query result item.

json
{
  "absentTerms": [
    "platform",
    "native",
    "solution"
  ],
  "childResults": [
    null
  ],
  "clickUri": "https://example.com/t/1/898/2",
  "excerpt": "... the new Coveo Cloud V2 and Coveo Cloud V1 ... the main differences between the two Coveo Cloud versions ...",
  "excerptHighlights": [
    {
      "length": 5,
      "offset": 15
    }
  ],
  "firstSentences": "Hello, I know Coveo currently hosts organizations in two independent cloud platforms, the new Coveo Cloud V2 and Coveo Cloud V1, the original Coveo offering in the cloud. I would like to learn the main differences between the two Coveo Cloud versions ...",
  "firstSentencesHighlights": [
    {
      "length": 5,
      "offset": 15
    }
  ],
  "flags": "HasHtmlVersion;HasMobileHtmlVersion",
  "hasHtmlVersion": true,
  "hasMobileHtmlVersion": true,
  "isRecommendation": false,
  "isTopResult": false
}

Need more? See the Coveo guide for connection setup and behaviour shared by every action.