> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetIntakeFormSubmission

# Package: contentCollector

# Namespace: IntakeForms

# Method link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/content-collector/intake-form-v1/get-intake-form-submission.md

## Permission Scopes:
SCOPE.PARTNERS.CONTENT-COLLECTOR: SCOPE.PARTNERS.CONTENT-COLLECTOR

## Introduction

Retrieves the client's answers for an intake form, as a structured tree of
questions and answers.

The response contains the client's current answers, including answers saved
before the form is submitted. To check whether the client has submitted the
form, call [Get Intake Form](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/content-collector/intake-form-v1/get-intake-form.md)
and check `clientFormInteraction.submissionDate`.

Answers are returned as text. For choice fields, each answer is the option
label the client selected. Other values are returned as plain text, for
example `true` for a checked checkbox or `1500` for a number. File-upload fields carry their files in `assets` on the question they
belong to. Repeater fields nest 1 group of questions per item. The response
also includes the client's notes, each with its own files.

Returns only intake forms in the caller's account.

---

## REST API

### Schema

```
 Method: getIntakeFormSubmission
 Description: Retrieves the client's answers for an intake form, as a structured tree of questions and answers.  The response contains the client's current answers, including answers saved before the form is submitted. To check whether the client has submitted the form, call [Get Intake Form](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/content-collector/intake-form-v1/get-intake-form.md) and check `clientFormInteraction.submissionDate`.  Answers are returned as text. For choice fields, each answer is the option label the client selected. Other values are returned as plain text, for example `true` for a checked checkbox or `1500` for a number. File-upload fields carry their files in `assets` on the question they belong to. Repeater fields nest 1 group of questions per item. The response also includes the client's notes, each with its own files.  Returns only intake forms in the caller's account.
 URL: https://www.wixapis.com/partners/content-collector/v1/intake-forms/{intakeFormId}/submission
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  intakeFormId
 Method parameters: 
   param name: intakeFormId | type:   none | required: true 
 Return type: GetIntakeFormSubmissionResponse
  - name: submission | type: IntakeFormSubmission | description: Client's submission, as a tree of questions and answers.  
     - name: questions | type: array<SubmissionQuestion> | description: Answered questions, in the order they appear in the form. Composite and repeater fields keep their nesting. File-upload fields appear as questions with an empty `answer` and populated `assets`.  | validation: maxItems 500
        - name: target | type: string | description: Key of the form field. Stays the same across submissions. Repeater item groups share the key of their repeater field.  | validation: maxLength 200
        - name: label | type: string | description: Question label. For a repeater item group, when the client added more than 1 item, the label is followed by the item number. For example, `Team member #2`.  | validation: maxLength 350
        - name: answer | type: array<string> | description: Answers as text. For choice fields, the selected option labels. Empty for file-upload fields and question groups.  | validation: maxItems 1000, maxLength 2147483647
        - name: assets | type: array<Asset> | description: Files uploaded for this field. Empty for fields that aren't file uploads.  | validation: maxItems 1000
           - name: fileId | type: string | description: File GUID.  | validation: maxLength 200
           - name: displayName | type: string | description: Original file name. For example, `logo.png`.  | validation: maxLength 1000
           - name: url | type: string | description: Permanent download URL for the file.  | validation: format WEB_URL
        - name: nestedQuestions | type: array<SubmissionQuestion> | description: Nested questions for composite and repeater fields.  | validation: maxItems 1000
     - name: notes | type: array<ClientNote> | description: Notes the client added to the submission.  | validation: maxItems 1000
        - name: content | type: string | description: Note text.  | validation: maxLength 2147483647
        - name: files | type: array<Asset> | description: Files attached to this note.  | validation: maxItems 1000

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: no_submission | Description: The client hasn't started filling out the intake form yet. A client's first saved answers can take a few moments to become available.


```

### Examples

### Get Intake Form Submission
Retrieves the client's answers, uploaded files, and notes for an intake form

```curl
curl -X GET \
'https://www.wixapis.com/partners/content-collector/v1/intake-forms/8046df3c-7575-4098-a5ab-c91ad8f33c47/submission' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.contentCollectorIntakeForms.contentCollectorIntakeForms.getIntakeFormSubmission(intakeFormId)
 Description: Retrieves the client's answers for an intake form, as a structured tree of questions and answers.  The response contains the client's current answers, including answers saved before the form is submitted. To check whether the client has submitted the form, call [Get Intake Form](https://dev.wix.com/docs/api-reference/account-level/studio-workspace/content-collector/intake-form-v1/get-intake-form.md) and check `clientFormInteraction.submissionDate`.  Answers are returned as text. For choice fields, each answer is the option label the client selected. Other values are returned as plain text, for example `true` for a checked checkbox or `1500` for a number. File-upload fields carry their files in `assets` on the question they belong to. Repeater fields nest 1 group of questions per item. The response also includes the client's notes, each with its own files.  Returns only intake forms in the caller's account.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  intakeFormId
 Method parameters: 
   param name: intakeFormId | type: string | description: GUID of the intake form whose submission to retrieve. | required: true | validation: format GUID
 Return type: PROMISE<GetIntakeFormSubmissionResponse>
  - name: submission | type: IntakeFormSubmission | description: Client's submission, as a tree of questions and answers.  
     - name: questions | type: array<SubmissionQuestion> | description: Answered questions, in the order they appear in the form. Composite and repeater fields keep their nesting. File-upload fields appear as questions with an empty `answer` and populated `assets`.  | validation: maxItems 500
        - name: target | type: string | description: Key of the form field. Stays the same across submissions. Repeater item groups share the key of their repeater field.  | validation: maxLength 200
        - name: label | type: string | description: Question label. For a repeater item group, when the client added more than 1 item, the label is followed by the item number. For example, `Team member #2`.  | validation: maxLength 350
        - name: answer | type: array<string> | description: Answers as text. For choice fields, the selected option labels. Empty for file-upload fields and question groups.  | validation: maxItems 1000, maxLength 2147483647
        - name: assets | type: array<Asset> | description: Files uploaded for this field. Empty for fields that aren't file uploads.  | validation: maxItems 1000
           - name: fileId | type: string | description: File GUID.  | validation: maxLength 200
           - name: displayName | type: string | description: Original file name. For example, `logo.png`.  | validation: maxLength 1000
           - name: url | type: string | description: Permanent download URL for the file.  | validation: format WEB_URL
        - name: nestedQuestions | type: array<SubmissionQuestion> | description: Nested questions for composite and repeater fields.  | validation: maxItems 1000
     - name: notes | type: array<ClientNote> | description: Notes the client added to the submission.  | validation: maxItems 1000
        - name: content | type: string | description: Note text.  | validation: maxLength 2147483647
        - name: files | type: array<Asset> | description: Files attached to this note.  | validation: maxItems 1000

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: no_submission | Description: The client hasn't started filling out the intake form yet. A client's first saved answers can take a few moments to become available.


```

### Examples

### Get an intake form submission
Retrieves the client's answers, uploaded files, and notes for an intake form

```javascript
import { contentCollectorIntakeForms } from "@wix/content-collector-intake-forms";

async function getIntakeFormSubmission() {
  const response = await contentCollectorIntakeForms.getIntakeFormSubmission(
    "8046df3c-7575-4098-a5ab-c91ad8f33c47"
  );
}

/* Promise resolves to:
 * {
 *   "submission": {
 *     "questions": [
 *       {
 *         "target": "business_name",
 *         "label": "What's your business name?",
 *         "answer": ["Bloom Bakery"]
 *       },
 *       {
 *         "target": "logo",
 *         "label": "Upload your logo",
 *         "assets": [
 *           {
 *             "fileId": "d7a341c4-196b-46e7-813c-2b0fc1847ec6",
 *             "displayName": "bloom-logo.png",
 *             "url": "https://static.wixstatic.com/media/d7a341c4196b46e7813c2b0fc1847ec6.png"
 *           }
 *         ]
 *       }
 *     ],
 *     "notes": [
 *       {
 *         "content": "Please keep the warm colors from our current storefront.",
 *         "files": [
 *           {
 *             "fileId": "e2c58f19-7a4d-4b3e-9f61-0d8a3b7c5e24",
 *             "displayName": "storefront.jpg",
 *             "url": "https://static.wixstatic.com/media/e2c58f197a4d4b3e9f610d8a3b7c5e24.jpg"
 *           }
 *         ]
 *       }
 *     ]
 *   }
 * }
 */

```

### getIntakeFormSubmission (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { contentCollectorIntakeForms } from '@wix/content-collector-intake-forms';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { contentCollectorIntakeForms },
  // Include the auth strategy and host as relevant
});


async function getIntakeFormSubmission(intakeFormId) {
  const response = await myWixClient.contentCollectorIntakeForms.getIntakeFormSubmission(intakeFormId);
};
```

---