> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Status & Retrieve Content

> Learn how to check the processing status and retrieve the generated content of a session in the mobile SDK

<Callout type="updates" color="orange" icon="bell">
  **Updated:**

  Starting with Mobile SDK `v2.6.0+` on iOS SDK, you can retrieve Medication orders using the `getStructuredData(for:)` method.

  Learn more in the [Get structured data API](/mobile-sdk/ambient-guides/session-status-and-content-retrieval#get-structured-data) section.
</Callout>

<div className="quick-summary-wrapper">
  <div className="quick-summary-header">
    <span className="quick-summary-icon" aria-hidden="true" />

    <span className="quick-summary-title">Quick summary</span>
  </div>

  <div className="quick-summary-content">
    The Mobile SDK provides methods to check processing status and retrieve generated content after a session ends. Check status using `status(for:)`, retrieve clinical notes with `content(for:)`, get transcripts with `transcript(for:)`, and access structured data with `getStructuredData(for:)`.

    <br />

    <br />

    All methods are asynchronous and require a valid `recordingId`. Submit user feedback on AI-generated content using `submitFeedback(_:for:onCompletion:)` to help improve future note generation.
  </div>

  <div className="quick-summary-footer">
    <span className="quick-summary-footer-icon" aria-hidden="true" />

    <span className="quick-summary-footer-text">Last updated:</span>
    <span className="quick-summary-footer-date">June 2026</span>
  </div>
</div>

The Suki Mobile SDK provides methods to check the processing status and retrieve the generated content of a session. Use these methods to track the progress of your session and retrieve the generated content after it has been completed.

**What will you learn?**

In this guide, you will learn how to:

* Check the processing status of a session using the `status(for:)` method.
* Retrieve generated content by calling the `content(for:)` method to get clinical note suggestions.
* Retrieve the full transcript of the conversation using the `transcript(for:)` method.
* Get structured data, such as generated diagnoses and entities, using the `getStructuredData(for:)` method.
* Submit user feedback on AI-generated content using the `submitFeedback(_:for:onCompletion:)` method, including both quantitative and qualitative data.
* Handle asynchronous results using a completion handler for all retrieval methods.
* Understand and adhere to constraints for submitting feedback, including providing feedback only once per entity type per session.

<Note>
  Before calling any of these methods, you must ensure that the mobile SDK is **initialized** and that you are using a valid `recordingId` from an active or completed session.
</Note>

## Check status and retrieve content

After you end a session, you can asynchronously check its processing status and retrieve the generated content. You must provide a valid `recordingId` for the session you want to query.

***

The diagram below illustrates the process of retrieving the generated content of a session.

```mermaid actions={false} theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#FFF394','primaryTextColor':'#1a1a1a','primaryBorderColor':'#FFE148','lineColor':'#FFE148','secondaryColor':'#FFE148','tertiaryColor':'#FFFADE','mainBkg':'#FFF394','secondBkg':'#FFFADE','tertiaryBorderColor':'#FFE148','border1':'#FFE148','border2':'#FFE148','arrowheadColor':'#FFE148','fontFamily':'Inter, system-ui, sans-serif','fontSize':'14px','nodeBorder':'#FFE148','edgeLabelBackground':'#FFE148','clusterBkg':'#FFFADE','clusterBorder':'#FFE148','defaultLinkColor':'#FFE148','titleColor':'#1a1a1a','nodeTextColor':'#1a1a1a'}}}%%
graph TD
    A[Start: You have a valid recordingId] --> B{Call a retrieval method, passing the ID}
    B --> C[SDK performs an asynchronous operation...]
    C --> D{Completion Handler is called with a Result}
    D -->|Success| E[Process the returned content<br/>e.g., display suggestions, transcript]
    D -->|Failure| F[Handle the returned error]
    E --> G[End]
    F --> G[End]
    
    style A fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#1a1a1a
    style B fill:#FFE148,stroke:#FFE148,stroke-width:2px,color:#1a1a1a
    style C fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#1a1a1a
    style D fill:#FFE148,stroke:#FFE148,stroke-width:2px,color:#1a1a1a
    style E fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#1a1a1a
    style F fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#1a1a1a
    style G fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#1a1a1a
```

***

All retrieval methods are **asynchronous**. The result is returned in a <Tooltip tip="A closure that runs when a task, such as a network request, is complete. Use it to process the final result or handle an error">
Completion handler
</Tooltip>, which provides either the requested content or an error.

### Check the processing status

Use the `status(for:)` method to get the current content generation status of a session.

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  SukiAmbientCore.shared.status(for: recordingId) { result in
      // The completion handler returns a result type.
      switch result {
      case .success(let status):
          // On success, the status object contains the current state.
          print("Session status: \(status)")
      case .failure(let error):
          // On failure, an error object is returned.
          print("Error fetching status: \(error)")
      }
  }
  ```
</CodeGroup>

### Get generated suggestions

To retrieve the main clinical note content, call the `content(for:)` method.

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  SukiAmbientCore.shared.content(for: recordingId) { result in
      switch result {
      case .success(let suggestions):
          // The suggestions object contains the generated note content.
          print("Generated Suggestions: \(suggestions)")
      case .failure(let error):
          print("Error fetching content: \(error)")
      }
  }
  ```
</CodeGroup>

### Get the audio transcript

Retrieve the full transcript of the conversation using the `transcript(for:)` method.

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  SukiAmbientCoreManager.shared.transcript(for: recordingId) { result in
      switch result {
      case .success(let response):
          // The response object contains transcript segments.
          // This example joins them into a single string.
          let transcriptText = (response.finalTranscript ?? []).compactMap { $0.transcript }.joined(separator: " ")
          print(transcriptText)
      case .failure(let error):
          print("Error fetching transcript: \(error)")
      }
  }
  ```
</CodeGroup>

### Get structured data

Use the `getStructuredData(for:)` method to retrieve structured output, such as diagnoses and other entities generated from the session.

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  SukiAmbientCoreManager.shared.getStructuredData(for: recordingId) { result in // [!code ++:19]
      switch result {
      case .success(let response):
          let data = response.structuredData
          // Diagnoses
          for d in data.diagnoses.diagnoses {
              print(d.note)
          }
          // Medication orders (optional) [!code ++:6] if Medication orders are enabled
          if let orders = data.orders?.medicationOrders {
              let all = orders.values + orders.partialValues
              for order in all {
                  print(order.drugName, order.instructions)
              }
          }
      case .failure(let error):
          print(error)
      }
  }
  ```
</CodeGroup>

### Submit user feedback

<Note>
  `New` Submit user feedback for the AI-generated content.
</Note>

Use the `submitFeedback(_:for:onCompletion:)` to collect and submit user feedback on AI-generated content by using the `QuantitativeFeedback` and `QualitativeFeedback` structs.

This allows you to capture both quantitative (ratings) and qualitative (comments) feedback. Your feedback helps Suki **improve** the quality of its AI-generated content.

#### Function signature

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  public func submitFeedback(
      _ submission: FeedbackSubmission,
      for recordingId: RecordingId,
      onCompletion completionHandler: @escaping ((Result<String, Error>) -> Void)
  )
  public typealias RecordingId = String
  ```
</CodeGroup>

#### Required data structures

Submitting feedback requires you to construct a `FeedbackSubmission` object. This object uses the `FeedbackEntity` and `QuantitativeFeedback` data structures.

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  public struct FeedbackSubmission {
      public let entity: FeedbackEntity
      public let quantitative: QuantitativeFeedback
      public let comments: String?
      
      public init(entity: FeedbackEntity,
                  quantitative: QuantitativeFeedback,
                  comments: String? = nil)
  }

  public enum FeedbackEntity: String {
      case content = "content"
  }

  public struct QuantitativeFeedback {
      public let minRating: Int
      public let maxRating: Int
      public let rating: Int
      
      public init(minRating: Int, maxRating: Int, rating: Int)
  }
  ```
</CodeGroup>

#### Implementation example

To submit feedback, you first create the `FeedbackSubmission` object and then pass it to the `submitFeedback` method along with the `recordingId`.

The method is **asynchronous**. The completion handler returns a `Result` containing either a success message with the unique feedbackId or an error if the submission failed.

<CodeGroup>
  ```swift Swift theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  // 1. Create the quantitative feedback object.
  let quantitativeFeedback = QuantitativeFeedback(minRating: 1, maxRating: 5, rating: 4)

  // 2. Create the full feedback submission object.
  let submission = FeedbackSubmission(
      entity: .content,
      quantitative: quantitativeFeedback,
      comments: "The patient's history was captured accurately."
  )

  // 3. Call the submit method with the submission object and recording ID.
  SukiAmbientCoreManager.shared.submitFeedback(submission, for: recordingId) { result in
      switch result {
      case .success(let feedbackId):
          print("Feedback submitted successfully with ID: \(feedbackId)")
      case .failure(let error):
          print("Error submitting feedback: \(error)")
      }
  }
  ```
</CodeGroup>

<Warning>
  * Provide feedback for each entity type **once per session** only.

  * At present feedback submissions are only supported for the `.content` entity. This may be expanded in the future.

  * Submitting feedback for the same entity type a second time in the same session will be considered invalid.
</Warning>

#### Rating system

* The `maxRating` must be greater than the `minRating`.

* The rating must be within the inclusive range of `minRating` and `maxRating`.

* The `comments` string is optional and has a maximum length of **2000** characters.

<Note>
  - Configure any integer rating scale. For example, create a 1 to 5 scale by setting `minRating` to 1 and `maxRating` to 5, or a binary scale by setting the values to 0 and 1.

  - Suki recommends using a scale of 1 to 5 for ratings.
</Note>

## FAQs

<AccordionGroup>
  <Accordion title="Why is the content not being generated?">
    The content is not being generated because the session is not in a completed state or the session was too short. We require a **minimum of 1 minute of audio** to generate content. You must ensure that the session is in a completed state before retrieving the content.
  </Accordion>

  <Accordion title="Why is the content not being retrieved?">
    The content is not being retrieved because the `recordingId` is not valid. You must ensure that you are using a valid `recordingId` from an active or completed session.
  </Accordion>

  <Accordion title="How do I know if the content has been generated?">
    Check the status of the session to determine if the content has been generated.
  </Accordion>

  <Accordion title="How do I know if the content has been retrieved?">
    Check the status of the session to determine if the content has been retrieved.
  </Accordion>

  <Accordion title="What happens if the internet connection is lost?">
    If the internet connection is lost, the content will be retrieved when the connection is restored. Please refer to the [Offline mode](/mobile-sdk/ambient-guides/offline-mode) guide for more information.
  </Accordion>

  <Accordion title="What happens if the session is not completed?">
    The content will not be retrieved if the session is not completed. You must ensure that the session is in a completed state before retrieving the content.
  </Accordion>
</AccordionGroup>

## Next steps

<Icon icon="file-lines" iconType="solid" /> After you have retrieved the content, you can proceed to the [Clear session](/mobile-sdk/ambient-guides/clearing-sessions) guide to create a new session.
