
---
## Generate Document
---
This method generates the document that is defined for the provided slug. Inserts are processed.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |


<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_SCHEMA_READ` permission from the **Schema** group.

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

**Declared In:**  
lib/modules/content/content_impl.dart

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

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)


<div class="content-tabs" data-tab-group="tabgrp-925">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-925-0" data-tab-group="tabgrp-925" data-tab-active="true">SDK &gt;= 1.0.0</button><button class="tab-button" data-tab-id="tabgrp-925-1" data-tab-group="tabgrp-925">Legacy SDK</button></div>

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

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; generateDocument(String slug,
      {required void Function(Document document) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **slug** | String | yes | - | Slug of the document |
| **onSuccess** | Function([Document](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#document) document) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">await Synerise.content.generateDocument(slugName, onSuccess: (Document document) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-925-1" data-tab-group="tabgrp-925">

**Declaration:**  

<pre><code class="language-Dart">Future&lt;Document&gt; generateDocument(String slug) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **slug** | String | yes | - | Slug of the document |

**Return Value:**  
[Document](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#document)

**Example:**  

<pre><code class="language-Dart">await Synerise.content.generateDocument(slugName).catchError((error) {
      //onError handling
    });</code></pre>

</div>
</div>
 

## Generate document with query parameters
---
This method generates the document that is defined for the parameters provided in the query object.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 4.18.0 | 5.19.0 | 0.22.0 | 1.2.0 |
  

<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_SCHEMA_READ` permission from the **Schema** group.

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

**Declared In:**  
lib/modules/content/content_impl.dart

**Related To:**  
[DocumentApiQuery](/developers/mobile-sdk/class-reference/ios/recommendations-and-documents#documentapiquery)  
[Document](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#document)

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)
  
**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; generateDocumentWithApiQuery(DocumentApiQuery apiQuery,
      {required void Function(Document document) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **apiQuery** | [DocumentApiQuery](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#documentapiquery) | yes | - | Object that stores all query parameters |
| **onSuccess** | Function([Document](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#document) document) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">DocumentApiQuery apiQuery = DocumentApiQuery(slug: "SLUG");

await Synerise.content.generateDocumentWithApiQuery(apiQuery, onSuccess: (Document document) {
  //onSuccess handling
}, onError: (SyneriseError error) {
  //onError handling
});</code></pre>
 

## Get Recommendations (v2)
---
This method generates recommendations that are defined for the options provided. The recommendations are generated by using a document with an insert.  

For instructions, see ["Displaying AI recommendations > With documents and screen views"](/developers/mobile-sdk/displaying-recommendations/documents).
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
  

<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_SCHEMA_READ` permission from the **Schema** group.

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

**Declared In:**  
lib/modules/content/content_impl.dart

**Related To:**  
[RecommendationOptions](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationoptions)  
[RecommendationResponse](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationresponse)

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)


<div class="content-tabs" data-tab-group="tabgrp-926">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-926-0" data-tab-group="tabgrp-926" data-tab-active="true">SDK &gt;= 1.0.0</button><button class="tab-button" data-tab-id="tabgrp-926-1" data-tab-group="tabgrp-926">Legacy SDK</button></div>

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

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; getRecommendationsV2(RecommendationOptions recommendationOptions,
      {required void Function(RecommendationResponse recommendationResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **recommendationOptions** | [RecommendationOptions](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationoptions) | yes | - | Options for recommendations |
| **onSuccess** | Function([RecommendationResponse](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationresponse) recommendationResponse) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">RecommendationOptions recommendationOptions = RecommendationOptions(
        slug: slug,
        productID: productId);
        
    await Synerise.content.getRecommendationsV2(recommendationOptions, onSuccess: (RecommendationResponse recommendationResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-926-1" data-tab-group="tabgrp-926">

**Declaration:**  

<pre><code class="language-Dart">Future&lt;RecommendationResponse&gt; getRecommendationsV2(RecommendationOptions recommendationOptions) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **recommendationOptions** | [RecommendationOptions](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationoptions) | yes | - | Options for recommendations |

**Return Value:**  
[RecommendationResponse](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationresponse)

**Example:**  

<pre><code class="language-Dart">RecommendationOptions recommendationOptions = RecommendationOptions(
        slug: slug,
        productID: productId);
        
    await Synerise.content.getRecommendationsV2(recommendationOptions).catchError((error) {
      //onError handling
    });</code></pre>

</div>
</div>
 

## Generate Screen View
---
This method generates a customer's highest-priority screen view campaign from the feed with the provided feed slug.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
  

<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_SCHEMA_READ` permission from the **Schema** group.

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

**Declared In:**  
lib/modules/content/content_impl.dart

**Related To:**  
[ScreenView](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenview)

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)


<div class="content-tabs" data-tab-group="tabgrp-927">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-927-0" data-tab-group="tabgrp-927" data-tab-active="true">SDK &gt;= 1.0.0</button><button class="tab-button" data-tab-id="tabgrp-927-1" data-tab-group="tabgrp-927">Legacy SDK</button></div>

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

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; generateScreenView(String feedSlug,
      {required void Function(ScreenView screenView) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **feedSlug** | String | yes | - | Identifies a specific screen view feed |
| **onSuccess** | Function([ScreenView](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenview) screenView) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">await Synerise.content.generateScreenView(slug, onSuccess: (ScreenView screenViewResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-927-1" data-tab-group="tabgrp-927">

**Declaration:**  

<pre><code class="language-Dart">Future&lt;ScreenView&gt; generateScreenView(String feedSlug) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **feedSlug** | String | yes | - | Identifies the feed from which the screen view is selected. |

**Return Value:**  
[ScreenView](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenview)

**Example:**  

<pre><code class="language-Dart">await Synerise.content.generateScreenView(slug).catchError((error) {
      //onError handling
    });</code></pre>

</div>
</div>
 

## Generate screen view with query parameters
---
This method generates customer's highest-priority screen view campaign that is defined for parameters provided in the query object.
**Declared In:**  
lib/modules/content/content_impl.dart

**Related To:**  
[ScreenViewApiQuery](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenviewapiquery)
[ScreenView](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenview)

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)
  
**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; generateScreenViewWithApiQuery(ScreenViewApiQuery apiQuery,
      {required void Function(ScreenView screenView) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **apiQuery** | [ScreenViewApiQuery](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenviewapiquery) | yes | - | Object that stores all query parameters |
| **onSuccess** | Function([ScreenView](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenview) screenView) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">ScreenViewApiQuery apiQuery = ScreenViewApiQuery(feedSlug: "FEED_SLUG");
apiQuery.productId = "PRODUCT_ID";

await Synerise.content.generateScreenViewWithApiQuery(apiQuery, onSuccess: (ScreenView screenView) {
  //onSuccess handling
}, onError: (SyneriseError error) {
  //onError handling
});</code></pre>
 

## Generate Brickworks
This method generates content from a published version of a [Brickworks](/docs/assets/brickworks) record. Inserts and fields which require a customer context fetch it automatically from the current user.



|                                                 | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| ----------------------------------------------- | ----------- | --------------- | -------------------- | --------------- |
| <span style="color:green">Introduced in:</span> | 5.8.1        | 6.8.0           | 1.6.0                | 2.6.0            |


<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `BRICKWORKS_RECORDS_READ` permission from the **RECORDS** group.

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

**Declared In:**  
lib/modules/content/content_impl.dart

**Related To:**  
[BrickworksApiQuery](/developers/mobile-sdk/class-reference/flutter/miscellaneous#brickworksapiquery)

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; generateBrickworks(BrickworksQpiQuery apiQuery, {
    required void Function(Map&lt;String, dynamic&gt;) onSuccess,
    required void Function(SyneriseError error) onError}) async</code></pre>



**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **apiQuery** | [BrickworksApiQuery](/developers/mobile-sdk/class-reference/flutter/miscellaneous#brickworksapiquery) | yes | - | Object that stores all query parameters |
| **onSuccess** | Function(Map<String, dynamic> brickworks) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
Object with content generated from a record.

**Example:**  

<pre><code class="language-dart">BrickworksApiQuery apiQuery = BrickworksApiQuery.byRecordSlug(schemaSlug: "SCHEMA_SLUG", recordSlug: "RECORD_SLUG");
apiQuery.recordSlug = "RECORD_SLUG";

await Synerise.content.generateBrickworks(apiQuery, onSuccess: onSuccess(Map&lt;String, dynamic&gt; brickworks) {
  //onSuccess handling
}, onError: (SyneriseError error) {
  //onError handling
});</code></pre>
 

## Removed methods

### <del>Get document</del> {#get-document}
---
This method generates the document that is defined for the provided slug.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 3.4.8 | 3.4.2 | 0.9.10 | 0.2.0 |
| <span style="color:orange">Deprecated in:</span> | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |


<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_DOCUMENT_READ` permission from the **Document** group.

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

**Replaced By:**  
[Generate document](/developers/mobile-sdk/method-reference/flutter/content#generate-document) and [Generate document with query parameters](/developers/mobile-sdk/method-reference/flutter/content#generate-document-with-query-parameters)

**Declared In:**  
lib/modules/content/content_impl.dart

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)


<div class="content-tabs" data-tab-group="tabgrp-928">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-928-0" data-tab-group="tabgrp-928" data-tab-active="true">SDK &gt;= 1.0.0</button><button class="tab-button" data-tab-id="tabgrp-928-1" data-tab-group="tabgrp-928">Legacy SDK</button></div>

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

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt;&gt; getDocument(String slug,
      {required void Function(Map&lt;String, Object&gt; document) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **slug** | String | yes | - | Name of the slug |
| **onSuccess** | Function([Document](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#document) document) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getDocument(slug, onSuccess: (Map&lt;String, Object&gt; document) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-928-1" data-tab-group="tabgrp-928">

**Declaration:**  

<pre><code class="language-Dart">Future&lt;Map&lt;String, Object&gt;&gt; getDocument(String slug) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **slug** | String | yes | - | Name of the slug |

**Return Value:**  
Document as Map<String, Object>

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getDocument(slug).catchError((error) {
      //onError handling
    });</code></pre>

</div>
</div>
 

### <del>Get documents</del> {#get-documents}
---
This method generates documents that are defined for parameters provided in the query object.

| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |


<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_DOCUMENT_READ` permission from the **Document** group.

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

**Declared In:**  
lib/modules/content/content_impl.dart

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

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)


<div class="content-tabs" data-tab-group="tabgrp-929">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-929-0" data-tab-group="tabgrp-929" data-tab-active="true">SDK &gt;= 1.0.0</button><button class="tab-button" data-tab-id="tabgrp-929-1" data-tab-group="tabgrp-929">Legacy SDK</button></div>

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

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; getDocuments(DocumentsApiQuery documentsApiQuery,
      {required void Function(List&lt;Map&lt;String, Object&gt;&gt; documentsList) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **documentsApiQuery** | [DocumentsApiQuery](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#documentsapiquery) | yes | - | Object for configuration of the query parameters |
| **onSuccess** | Function(List<Map<String, Object>> documents) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getDocuments(documentsApiQuery, onSuccess: (List&lt;Map&lt;String, Object&gt;&gt; documentsList) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-929-1" data-tab-group="tabgrp-929">

**Declaration:**  

<pre><code class="language-Dart">Future&lt;List&lt;Map&lt;String, Object&gt;&gt;&gt; getDocuments(DocumentsApiQuery documentsApiQuery) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **documentsApiQuery** | [DocumentsApiQuery](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#documentsapiquery) | yes | - | Object for configuration of the query parameters |

**Return Value:**  
List of documents as Map<String, Object>

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getDocuments(documentsApiQuery).catchError((error) {
      //onError handling
    });</code></pre>

</div>
</div>
 

### <del>Get recommendations</del> {#get-recommendations}
---
This method generates recommendations that are defined for the options provided.

| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |
  

<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_DOCUMENT_READ` permission from the **Document** group.

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

**Replaced By:**  
[Get recommendations (v2)](/developers/mobile-sdk/method-reference/flutter/content#get-recommendations-v2)

**Declared In:**  
lib/modules/content/content_impl.dart

**Related To:**  
[RecommendationOptions](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationoptions)  
[RecommendationResponse](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationresponse)

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)


<div class="content-tabs" data-tab-group="tabgrp-930">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-930-0" data-tab-group="tabgrp-930" data-tab-active="true">SDK &gt;= 1.0.0</button><button class="tab-button" data-tab-id="tabgrp-930-1" data-tab-group="tabgrp-930">Legacy SDK</button></div>

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

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; getRecommendations(RecommendationOptions recommendationOptions,
      {required void Function(RecommendationResponse recommendationResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **recommendationOptions** | [RecommendationOptions](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationoptions) | yes | - | Object for configuration of the options parameters |
| **onSuccess** | Function([RecommendationResponse](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationresponse) recommendationResponse) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getRecommendations(recommendationOptions, onSuccess: (RecommendationResponse recommendationResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-930-1" data-tab-group="tabgrp-930">

**Declaration:**  

<pre><code class="language-Dart">Future&lt;RecommendationResponse&gt; getRecommendations(RecommendationOptions recommendationOptions) async</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **recommendationOptions** | [RecommendationOptions](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationoptions) | yes | - | Object for configuration of the options parameters |

**Return Value:**  
[RecommendationResponse](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents#recommendationresponse)

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getRecommendations(recommendationOptions).catchError((error) {
      //onError handling
    });</code></pre>

</div>
</div>
 

### <del>Get screen view</del> {#get-screen-view}
---
This method generates the customer's highest-priority screen view campaign.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 3.7.1 | 3.7.1 | 0.9.10 | 0.2.0 |
| <span style="color:orange">Deprecated in:</span> | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |


<div class="admonition admonition-note"><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="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The API key must have the `SCHEMA_SERVICE_SCHEMA_READ` permission from the **Schema** group.

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

**Replaced By:**  
[Generate screen view](/developers/mobile-sdk/method-reference/flutter/content#generate-screen-view) and [Generate screen view with query parameters](/developers/mobile-sdk/method-reference/flutter/content#generate-screen-view-with-query-parameters)

**Declared In:**  
lib/modules/content/content_impl.dart

**Related To:**  
[ScreenViewResponse](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenviewresponse)

**Class:**  
[ContentImpl](/developers/mobile-sdk/class-reference/flutter/modules#content)

<div class="content-tabs" data-tab-group="tabgrp-931">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-931-0" data-tab-group="tabgrp-931" data-tab-active="true">SDK &gt;= 1.0.0</button><button class="tab-button" data-tab-id="tabgrp-931-1" data-tab-group="tabgrp-931">Legacy SDK</button></div>

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

**Declaration:**  

<pre><code class="language-Dart">Future&lt;void&gt; getScreenView(
      {required void Function(ScreenViewResponse screenViewResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **onSuccess** | Function([ScreenViewResponse](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenviewresponse) screenViewResponse) | yes | - | Function to be executed when the operation is completed successfully |
| **onError** | Function([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous#syneriseerror) error) | yes | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getScreenView(onSuccess: (ScreenViewResponse screenViewResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-931-1" data-tab-group="tabgrp-931">

**Declaration:**  

<pre><code class="language-Dart">Future&lt;ScreenViewResponse&gt; getScreenView() async</code></pre>


**Return Value:**  
[ScreenViewResponse](/developers/mobile-sdk/class-reference/flutter/miscellaneous#screenviewresponse)

**Example:**  

<pre><code class="language-Dart">await Synerise.content.getScreenView().catchError((error) {
      //onError handling
    });</code></pre>

</div>
</div>
 
