
## Recommendations
---

### RecommendationResponse
Model representing a response with recommendations.
  

<div class="admonition admonition-warning"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" /></svg></div><div class="admonition-body"><div class="admonition-content">

This is a read-only class and it is not meant to be instantiated directly.

</div></div></div>

  
**Declared In:**  
lib/model/content/recommendation_response.dart  
  
**Related To:**  
[Recommendation](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendation)  
  
**Declaration:**

<pre><code class="language-Dart">class RecommendationResponse</code></pre>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **name** | String | no | Name of the recommendation campaign |
| **campaignHash** | String | no |  Hash (UUID) of the recommendation campaign |
| **campaignID** | String | no | ID of the recommendation campaign |
| **items** | List<[Recommendation](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendation)> | no | List of items in the recommendation |
| **correlationID** | String | no | Recommendation's correlation ID. It can be added to a `recommendation.click` event to associate it with the recommendation request |
| **schema** | String | no | Schema of the document which contains the recommendation |
| **slug** | String | no | Slug of the document |
| **uuid** | String | no | UUID of the document |

---
---

### Recommendation
Model representating a recommendation item data.
  

<div class="admonition admonition-warning"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" /></svg></div><div class="admonition-body"><div class="admonition-content">

This is a read-only class and it is not meant to be instantiated directly.

</div></div></div>

  
**Declared In:**  
lib/model/content/recommendation.dart  
  
**Related To:**  
[RecommendationResponse](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationresponse)  
  
**Declaration:**

<pre><code class="language-Dart">class Recommendation</code></pre>


**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **itemID** | String | no | Product's GTIN |
| **attributes** | Map<String, Object> | no | Product's recommendation attributes |

---
---

### RecommendationOptions
**Declared In:**  
lib/model/content/recommendation_options.dart  

**Related To:**  
[RecommendationFiltersJoinerRule](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationfiltersjoinerrule)  
  
**Declaration:**

<pre><code class="language-Dart">class RecommendationOptions</code></pre>


**Properties:**  
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **slug** | String | no | Unique identifier of a document which includes a recommendation insert |
| **productID** | String | yes | Item identifier (for single ID) |
| **itemsIds** | List<String> | yes | List of item identifiers (for multiple IDs) |
| **itemsExcluded** | List<String> | yes | Items that will be excluded from the generated recommendations |
| **additionalFilters** | String | yes | Additional filters. These are merged with the campaign's own filters according to the logic in **filtersJoiner** |
| **filtersJoiner** | [RecommendationFiltersJoinerRule](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationfiltersjoinerrule) | yes | Defines the logic of merging additionalFilters with the campaign's existing filters |
| **additionalElasticFilters** | String | yes | Additional elastic filters. These are merged with the campaign's own elastic filters according to the logic in **elasticFiltersJoiner** |
| **elasticFiltersJoiner** | [RecommendationFiltersJoinerRule](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationfiltersjoinerrule) | yes | Defines the logic of merging **additionalElasticFilters** with the campaign's existing elastic filters |
| **displayAttribute** | List<String> | yes | An array of item attributes which value will be returned in a recommendation response |
| **includeContextItems** | bool | yes | When true, the recommendation response will include context item metadata |
  
**Initializers:**  

<pre><code class="language-Dart">RecommendationOptions recommendationOptions = RecommendationOptions(
        slug: slug,
        productID: productId);</code></pre>


---
---

### RecommendationFiltersJoinerRule
**Declared In:**  
lib/model/content/recommendation_options.dart

**Declaration:**  

<pre><code class="language-Dart">enum RecommendationFiltersJoinerRule {
  and('and'),
  or('or'),
  replace('replace');</code></pre>

  
**Functions:**
Converts from **RecommendationFiltersJoinerRule** to **String**.

<div class="content-tabs code-tabs" data-tab-group="tabgrp-164">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-164-0" data-tab-group="tabgrp-164" data-tab-active="true">Dart</button></div>

<div class="tab-panel" data-tab-id="tabgrp-164-0" data-tab-group="tabgrp-164" data-tab-active="true">

```Dart
String recommendationFiltersJoinerRuleAsString()
```

</div>
</div>


Converts from **String** to **RecommendationFiltersJoinerRule**.

<div class="content-tabs code-tabs" data-tab-group="tabgrp-165">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-165-0" data-tab-group="tabgrp-165" data-tab-active="true">Dart</button></div>

<div class="tab-panel" data-tab-id="tabgrp-165-0" data-tab-group="tabgrp-165" data-tab-active="true">

```Dart
static RecommendationFiltersJoinerRule? getRecommendationFiltersJoinerRuleFromString(String string)
```

</div>
</div>


---
---

## Documents
---

---

### DocumentApiQuery
Object for setting parameters to facilitate fetching documents from the API.
  
**Declared In:**  
lib/model/content/document_api_query.dart
  
**Declaration:**

<pre><code class="language-Dart">class DocumentApiQuery</code></pre>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **slug** | String | no | Unique identifier of a document |

**Properties used only if the document includes a recommendation insert:**  
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **productId** | String | yes | Item identifier of the context item |
| **itemsIds** | List<string> | yes | List of item identifiers, used for multiple item context |
| **itemsExcluded** | List<string> | yes | Items that will be excluded from the generated recommendations |
| **additionalFilters** | String | yes | Additional filters. These are merged with the campaign's own filters according to the logic in **filtersJoiner** |
| **filtersJoiner** | [RecommendationFiltersJoinerRule](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationfiltersjoinerrule) | no | Defines the logic of merging additionalFilters with the campaign's existing filters |
| **additionalElasticFilters** | String | yes | Additional elastic filters. These are merged with the campaign's own elastic filters according to the logic in **elasticFiltersJoiner** |
| **elasticFiltersJoiner** | [RecommendationFiltersJoinerRule](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationfiltersjoinerrule) | no | Defines the logic of merging **additionalElasticFilters** with the campaign's existing elastic filters |
| **displayAttribute** | List<string> | yes | An array of item attributes which value will be returned in a recommendation response |
| **includeContextItems** | bool | yes | When true, the recommendation response will include context item metadata |
  
**Initializers:**

<pre><code class="language-TypeScript">DocumentApiQuery({
  required this.slug,
  this.productId,
  this.itemsIds,
  this.itemsExcluded,
  this.additionalFilters,
  this.filtersJoiner,
  this.additionalElasticFilters,
  this.elasticFiltersJoiner,
  this.displayAttribute,
  this.includeContextItems = false
});</code></pre>


---
---

### Document
**Declared In:**  
lib/model/content/document.dart
  
**Declaration:**  

<pre><code class="language-Dart">class Document</code></pre>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **uuid** | String | no | Document's identifier (this parameter was called **identifier** before version 2.0.0)|
| **slug** | String | no | Document's slug |
| **schema** | String | no | Document's schema type |
| **content** | Map<String, Object> | yes | Document's content |
  

<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

All properties are read-only.

</div></div></div>


---
---

## Removed symbols
---

### <del>DocumentsApiQuery</del>{#documentsapiquery}
The object to set parameters easily for fetching documents from API.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 3.5.10 | 3.5.1 | 0.9.10 | 0.2.0 |
| <span style="color:orange">Deprecated in:</span> | 4.13.0 | 5.5.0 | 0.17.0 | n/a |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |
The object to set parameters easily for fetching documents from API.

**Declared In:**  
lib/model/content/documents_api_query.dart  
  
**Related To:**  
[DocumentsApiQueryType](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#documentsapiquerytype)  
  
**Declaration:**

<pre><code class="language-Dart">class DocumentsApiQuery</code></pre>

  
**Properties:**
| Property | Type | Optional | Default | Description |
| --- | --- | --- | --- | --- |
| **type** | [DocumentsApiQueryType](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#documentsapiquerytype) | no | .bySchema | Query type |
| **typeValue** | String | no  | null | Value for query type |
| **version** | String | yes | null | Specifies the document version |
  
**Initializers:**

<pre><code class="language-Dart">DocumentsApiQuery({required this.type, required this.typeValue, this.version})</code></pre>


---
---

### <del>DocumentsApiQueryType</del>{#documentsapiquerytype}
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 3.5.10 | 3.5.1 | 0.9.10 | 0.2.0 |
| <span style="color:orange">Deprecated in:</span> | 4.13.0 | 5.5.0 | 0.17.0 | n/a |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |
**Declared In:**  
lib/enums/content/documents_api_query_type.dart  
  
**Declaration:**

<pre><code class="language-Dart">enum DocumentsApiQueryType {
  schema('by-schema');
}</code></pre>
