> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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

# QuerySubmissionsByNamespace

# Package: forms

# Namespace: FormSubmissionService

# Method link: https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/query-submissions-by-namespace?apiView=SDK.md

## Permission Scopes:
Manage form submissions.: SCOPE.FORMS.MANAGE-SUBMISSIONS

## Introduction

> **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance.md) to confirm that the app named `wix_forms` is installed on the site.
<br>

Returns a list of up to 100 submissions, based on the specified paging, filtering, and sorting.

Every query must filter by `namespace`, and the namespace must be inside `query.filter`. For the Wix Forms app, the namespace is `wix.form_app.form`. The API ignores a `namespace` sent anywhere else, such as at the top level of the request body beside `query`, and the call fails with `namespace filter is required`.

For example, to get the latest submissions of a form, send `{"query": {"filter": {"namespace": "wix.form_app.form", "formId": "<formId>"}, "sort": [{"fieldName": "createdDate", "order": "DESC"}], "cursorPaging": {"limit": 100}}}`.

The submission time is `createdDate`. Filter and sort by `createdDate` and `updatedDate`, not by `_createdDate` or `_updatedDate`.

For the fields you can filter and sort by, see [Form Submissions: Supported Filters and Sorting](https://dev.wix.com/docs/rest/crm/forms/form-submissions/filter-and-sort.md).

To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).

---

## REST API

### Schema

```
 Method: querySubmissionsByNamespace
 Description: > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance.md) to confirm that the app named `wix_forms` is installed on the site. <br>  Returns a list of up to 100 submissions, based on the specified paging, filtering, and sorting.  Every query must filter by `namespace`, and the namespace must be inside `query.filter`. For the Wix Forms app, the namespace is `wix.form_app.form`. The API ignores a `namespace` sent anywhere else, such as at the top level of the request body beside `query`, and the call fails with `namespace filter is required`.  For example, to get the latest submissions of a form, send `{"query": {"filter": {"namespace": "wix.form_app.form", "formId": "<formId>"}, "sort": [{"fieldName": "createdDate", "order": "DESC"}], "cursorPaging": {"limit": 100}}}`.  The submission time is `createdDate`. Filter and sort by `createdDate` and `updatedDate`, not by `_createdDate` or `_updatedDate`.  For the fields you can filter and sort by, see [Form Submissions: Supported Filters and Sorting](https://dev.wix.com/docs/rest/crm/forms/form-submissions/filter-and-sort.md).  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
 URL: https://www.wixapis.com/form-submission-service/v4/submissions/namespace/query
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: onlyYourOwn | type: onlyYourOwn | description: Whether to return only your own submissions. If `false`, returns all submissions based on query filters.  
   param name: query | type: CursorQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 3
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
 Query fields:
   - field: id | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: formId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: namespace | operators: $eq | sort: none | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: seen | operators: $eq, $ne | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: createdDate | operators: $eq, $gt, $gte, $in, $lt, $lte, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: updatedDate | operators: $eq, $gt, $gte, $in, $lt, $lte, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.memberId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.visitorId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.applicationId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.userId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: orderDetails.checkoutId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: childMetaSiteId | operators: $eq, $in, $ne, $nin | sort: none | aggregatable: undefined | searchable: undefined
 Return type: QuerySubmissionsByNamespaceResponse
  - name: submissions | type: array<FormSubmission> | description: The retrieved Submissions.  
     - name: id | type: string | description: Submission GUID.  | read-only: true | validation: format GUID
     - name: formId | type: string | description: GUID of the form which the submission belongs to.  | validation: format GUID, immutable
     - name: namespace | type: string | description: The app which the form submissions belong to. A submission inherits the namespace from its form schema, so you can't set it directly.  For example, a submission of a form visible in the Wix Forms app has the namespace `wix.form_app.form`, the namespace of the Wix Forms app, whose app GUID is `225dd912-7dea-4738-8688-4b8c6955ffc2`.  See a list of namespaces for [apps made by Wix](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction.md#namespaces-of-apps-made-by-wix) section. To retrieve the GUID for a Wix app, see [Apps Created By Wix](https://dev.wix.com/docs/rest/articles/get-started/apps-created-by-wix.md).  | read-only: true | validation: minLength 10, maxLength 50
     - name: status | type: SubmissionStatus | description: Status of the submission.  The status a submission is created with depends on the form's namespace and on whether the form collects payment, so read it from the response rather than assuming.  A submission for a form that collects payment starts as `PAYMENT_WAITING`. Otherwise, most namespaces record the submission immediately as `CONFIRMED`. Namespaces that need to complete another step first, such as taking payment for a pricing plan, create the submission as `PENDING` and confirm it later with Confirm Submission.  A `PENDING` submission isn't recorded yet, and is deleted automatically if it isn't confirmed in time.  
         - enum:
         -     PENDING: A submission is created, but has not yet been recorded in the Wix Forms collection.
         -     CONFIRMED: A submission is recorded in the Wix Forms collection.
         -     PAYMENT_WAITING: A form submission requiring payment is created.
         -     PAYMENT_CANCELED: An order of a form submission is canceled.
     - name: submissions | type: Map<string,Value> | description: Values the visitor submitted.  Each key is the `target` of a field in the form schema, which is the field's stable storage key rather than its GUID or label. Only keys matching a field target are accepted.  Each value's shape follows that field's `inputType`: `STRING` fields submit a string, `NUMBER` a number, `BOOLEAN` a boolean, and `ARRAY` an array of the selected option values. Date and time fields are strings. A choice field submits an option's `value`, not its GUID or its label.  3 input types submit structured values: `ADDRESS` submits an address object, `PAYMENT` an array holding 1 product object per item bought, and `SCHEDULING` an appointment object.  For the full mapping, see [About Submission Values](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/about-submission-values.md).  | validation: format map
        - ONE-OF: 
           - name: nullValue | type:  | description:   
           - name: numberValue | type: number | description:   
           - name: stringValue | type: string | description:   
           - name: boolValue | type: boolean | description:   
           - name: structValue | type: object | description:   
           - name: listValue | type: ListValue | description:   
              - name: values | type: array<Value> | description:   
     - name: createdDate | type: string | description: Date and time the form submission was created.  | validation: format date-time, immutable
     - name: updatedDate | type: string | description: Date and time the form submission was updated.  | read-only: true | validation: format date-time
     - name: revision | type: string | description: Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.  | read-only: true | validation: format int64
     - name: submitter | type: Submitter | description: GUID of the visitor that submitted the form.  | read-only: true 
        - ONE-OF: 
           - name: memberId | type: string | description: Member GUID.  | validation: format GUID
           - name: visitorId | type: string | description: Visitor GUID.  | validation: format GUID
           - name: applicationId | type: string | description: Application GUID.  | validation: maxLength 36
           - name: userId | type: string | description: User GUID.  | validation: format GUID
     - name: seen | type: boolean | description: Whether a site owner marked a submission as "seen".  
     - name: extendedFields | type: ExtendedFields | description: Data extension object that holds users' and apps' fields.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: orderDetails | type: OrderDetails | description: Order details. <br> <b>Note</b>: This object is only applicable when submitting a form in the Wix Payments app.  
        - name: orderId | type: string | description: GUID of the order related to submission (only applicable if a form has payments).  | read-only: true | validation: format GUID
        - name: number | type: string | description: Order number.  | read-only: true | validation: format int64
        - name: currency | type: string | description: Currency.  | read-only: true | validation: format CURRENCY
        - name: itemSubtotal | type: string | description: Item subtotal.  | read-only: true | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: checkoutId | type: string | description: GUID of the checkout related to submission (only applicable if a form has payments).  | read-only: true | validation: format GUID
     - name: contactId | type: string | description: Contact GUID of a site visitor who created the submission.  | read-only: true | validation: format GUID, immutable
     - name: accessRestriction | type: string | description: Authorized viewer GUID.  | validation: format GUID, immutable
     - name: tags | type: PublicTags | description: Tag GUIDs collections associated with the current entity.  
        - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs  | validation: maxItems 100, maxLength 5
     - name: appointmentDetails | type: AppointmentDetails | description: Appointment details. This object is only applicable when submitting a form that creates a booking appointment.  
        - name: staffMemberId | type: string | description: GUID of the staff member assigned to the appointment.  | validation: format GUID
        - name: staffMemberName | type: string | description: Name of the staff member assigned to the appointment.  | validation: minLength 1, maxLength 40
     - name: childMetaSiteId | type: string | description: GUID of the child site the submission was made on.  Only present when the form was submitted on a site that shares its data with a parent site. In that case submissions from every child site are stored on the parent site, and this field identifies which child site the submission came from.  | read-only: true | validation: format GUID
  - name: metadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Offset that was requested.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### QuerySubmissionsByNamespace
```curl
~~~cURL
curl -X POST \
  'https://www.wixapis.com/form-submission-service/v4/submissions/namespace/query' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: <AUTH>' \
  -d '{
    "query": {
      "filter": {
        "namespace": "wix.form_app.form",
        "formId": "e62e3011-55cf-4de3-a497-e097b52d86b8"
      },
      "sort": [
        {
          "fieldName": "createdDate",
          "order": "DESC"
        }
      ],
      "cursorPaging": {
        "limit": 100
      }
    }
  }'
~~~
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.forms.submissions.querySubmissionsByNamespace(query, options)
 Description: > **Note:** The Form Submission API only works with the Wix Forms app. Call [GetAppInstance](https://dev.wix.com/docs/rest/api-reference/app-management/apps/app-instance/get-app-instance.md) to confirm that the app named `wix_forms` is installed on the site. <br>  Returns a list of up to 100 submissions, based on the specified paging, filtering, and sorting.  Every query must filter by `namespace`, and the namespace must be inside `query.filter`. For the Wix Forms app, the namespace is `wix.form_app.form`. The API ignores a `namespace` sent anywhere else, such as at the top level of the request body beside `query`, and the call fails with `namespace filter is required`.  For example, to get the latest submissions of a form, send `{"query": {"filter": {"namespace": "wix.form_app.form", "formId": "<formId>"}, "sort": [{"fieldName": "createdDate", "order": "DESC"}], "cursorPaging": {"limit": 100}}}`.  The submission time is `createdDate`. Filter and sort by `createdDate` and `updatedDate`, not by `_createdDate` or `_updatedDate`.  For the fields you can filter and sort by, see [Form Submissions: Supported Filters and Sorting](https://dev.wix.com/docs/rest/crm/forms/form-submissions/filter-and-sort.md).  To learn about working with _Query_ endpoints, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination), and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: SubmissionQuery   | required: true 
     - name: cursorPaging | type: CursorPaging | description: Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.  
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: filter | type: object | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  
        - name: sort | type: array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`  | validation: maxItems 3
           - name: fieldName | type: string | description: Name of the field to sort by.  | validation: maxLength 512
           - name: order | type: SortOrder | description: Sort order.  
                 - enum: ASC, DESC
   param name: options | type: QuerySubmissionsByNamespaceOptions  none  
        - name: onlyYourOwn | type: boolean | description: Whether to return only your own submissions. If `false`, returns all submissions based on query filters.  
 Query fields:
   - field: _id | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: formId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: contactId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: namespace | operators: $eq | sort: none | aggregatable: undefined | searchable: undefined
   - field: status | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: seen | operators: $eq, $ne | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _createdDate | operators: $eq, $gt, $gte, $in, $lt, $lte, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: _updatedDate | operators: $eq, $gt, $gte, $in, $lt, $lte, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.memberId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.visitorId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.applicationId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: submitter.userId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: orderDetails.checkoutId | operators: $eq, $in, $ne, $nin | sort: ASC, DESC | aggregatable: undefined | searchable: undefined
   - field: childMetaSiteId | operators: $eq, $in, $ne, $nin | sort: none | aggregatable: undefined | searchable: undefined
 Return type: PROMISE<QuerySubmissionsByNamespaceResponse>
  - name: submissions | type: array<FormSubmission> | description: The retrieved Submissions.  
     - name: _id | type: string | description: Submission GUID.  | read-only: true | validation: format GUID
     - name: formId | type: string | description: GUID of the form which the submission belongs to.  | validation: format GUID, immutable
     - name: namespace | type: string | description: The app which the form submissions belong to. A submission inherits the namespace from its form schema, so you can't set it directly.  For example, a submission of a form visible in the Wix Forms app has the namespace `wix.form_app.form`, the namespace of the Wix Forms app, whose app GUID is `225dd912-7dea-4738-8688-4b8c6955ffc2`.  See a list of namespaces for [apps made by Wix](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction.md#namespaces-of-apps-made-by-wix) section. To retrieve the GUID for a Wix app, see [Apps Created By Wix](https://dev.wix.com/docs/rest/articles/get-started/apps-created-by-wix.md).  | read-only: true | validation: minLength 10, maxLength 50
     - name: status | type: SubmissionStatus | description: Status of the submission.  The status a submission is created with depends on the form's namespace and on whether the form collects payment, so read it from the response rather than assuming.  A submission for a form that collects payment starts as `PAYMENT_WAITING`. Otherwise, most namespaces record the submission immediately as `CONFIRMED`. Namespaces that need to complete another step first, such as taking payment for a pricing plan, create the submission as `PENDING` and confirm it later with Confirm Submission.  A `PENDING` submission isn't recorded yet, and is deleted automatically if it isn't confirmed in time.  
         - enum:
         -     PENDING: A submission is created, but has not yet been recorded in the Wix Forms collection.
         -     CONFIRMED: A submission is recorded in the Wix Forms collection.
         -     PAYMENT_WAITING: A form submission requiring payment is created.
         -     PAYMENT_CANCELED: An order of a form submission is canceled.
     - name: submissions | type: Map<string,Value> | description: Values the visitor submitted.  Each key is the `target` of a field in the form schema, which is the field's stable storage key rather than its GUID or label. Only keys matching a field target are accepted.  Each value's shape follows that field's `inputType`: `STRING` fields submit a string, `NUMBER` a number, `BOOLEAN` a boolean, and `ARRAY` an array of the selected option values. Date and time fields are strings. A choice field submits an option's `value`, not its GUID or its label.  3 input types submit structured values: `ADDRESS` submits an address object, `PAYMENT` an array holding 1 product object per item bought, and `SCHEDULING` an appointment object.  For the full mapping, see [About Submission Values](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/about-submission-values.md).  | validation: format map
        - ONE-OF: 
           - name: nullValue | type:  | description:   
           - name: numberValue | type: number | description:   
           - name: stringValue | type: string | description:   
           - name: boolValue | type: boolean | description:   
           - name: structValue | type: object | description:   
           - name: listValue | type: ListValue | description:   
              - name: values | type: array<Value> | description:   
     - name: _createdDate | type: Date | description: Date and time the form submission was created.  | validation: immutable
     - name: _updatedDate | type: Date | description: Date and time the form submission was updated.  | read-only: true 
     - name: revision | type: string | description: Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission.  | read-only: true | validation: format int64
     - name: submitter | type: Submitter | description: GUID of the visitor that submitted the form.  | read-only: true 
        - ONE-OF: 
           - name: memberId | type: string | description: Member GUID.  | validation: format GUID
           - name: visitorId | type: string | description: Visitor GUID.  | validation: format GUID
           - name: applicationId | type: string | description: Application GUID.  | validation: maxLength 36
           - name: userId | type: string | description: User GUID.  | validation: format GUID
     - name: seen | type: boolean | description: Whether a site owner marked a submission as "seen".  
     - name: extendedFields | type: ExtendedFields | description: Data extension object that holds users' and apps' fields.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: orderDetails | type: OrderDetails | description: Order details. <br> <b>Note</b>: This object is only applicable when submitting a form in the Wix Payments app.  
        - name: orderId | type: string | description: GUID of the order related to submission (only applicable if a form has payments).  | read-only: true | validation: format GUID
        - name: number | type: string | description: Order number.  | read-only: true | validation: format int64
        - name: currency | type: string | description: Currency.  | read-only: true | validation: format CURRENCY
        - name: itemSubtotal | type: string | description: Item subtotal.  | read-only: true | validation: decimalValue {"gte":"0.00","maxScale":2}
        - name: checkoutId | type: string | description: GUID of the checkout related to submission (only applicable if a form has payments).  | read-only: true | validation: format GUID
     - name: contactId | type: string | description: Contact GUID of a site visitor who created the submission.  | read-only: true | validation: format GUID, immutable
     - name: accessRestriction | type: string | description: Authorized viewer GUID.  | validation: format GUID, immutable
     - name: tags | type: PublicTags | description: Tag GUIDs collections associated with the current entity.  
        - name: tags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
           - name: tagIds | type: array<string> | description: List of tag GUIDs  | validation: maxItems 100, maxLength 5
     - name: appointmentDetails | type: AppointmentDetails | description: Appointment details. This object is only applicable when submitting a form that creates a booking appointment.  
        - name: staffMemberId | type: string | description: GUID of the staff member assigned to the appointment.  | validation: format GUID
        - name: staffMemberName | type: string | description: Name of the staff member assigned to the appointment.  | validation: minLength 1, maxLength 40
     - name: childMetaSiteId | type: string | description: GUID of the child site the submission was made on.  Only present when the form was submitted on a site that shares its data with a parent site. In that case submissions from every child site are stored on the parent site, and this field identifies which child site the submission came from.  | read-only: true | validation: format GUID
  - name: metadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Offset that was requested.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### Query submissions by namespace (with elevated permissions)
```javascript
import { submissions } from '@wix/forms';
import { auth } from '@wix/essentials';

const elevatedQuerySubmissionsByNamespace = auth.elevate(submissions.querySubmissionsByNamespace);

export async function myQuerySubmissionsByNamespaceFunction() {
  try {
    const items = await elevatedQuerySubmissionsByNamespace()
      .eq('namespace', 'wix.form_app.form')
      .find()
    console.log('Success! Submissions:', items);
      return items
  } catch (error) {
      console.error(error)
  }
}

/* Promise resolves to:
[
    {
        "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03",
        "namespace": "wix.form_app.form",
        "status": "CONFIRMED",
        "submissions": {
            "last_name": "Doe",
            "first_name": "John"
        },
        "revision": "3",
        "submitter": {
            "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"
        },
        "seen": false,
        "_id": "abb9b5c9-a881-467c-9c34-b9bea43ca5f0",
        "_createdDate": "2023-12-28T12:54:04.652Z",
        "_updatedDate": "2023-12-28T12:54:05.483Z"
    },
    {
        "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03",
        "namespace": "wix.form_app.form",
        "status": "CONFIRMED",
        "submissions": {
            "last_name": "McBride",
            "first_name": "Patsy"
        },
        "revision": "3",
        "submitter": {
            "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"
        },
        "seen": false,
        "_id": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d",
        "_createdDate": "2023-12-28T12:55:55.630Z",
        "_updatedDate": "2023-12-28T12:55:56.233Z"
    }
]
*/
```

### Query submissions by namespace
```javascript
import { submissions } from '@wix/forms';

export async function myQuerySubmissionsByNamespaceFunction() {
  try {
    const items = await submissions.querySubmissionsByNamespace()
      .eq('namespace', 'wix.form_app.form')
      .find()
    console.log('Success! Submissions:', items);
      return items
  } catch (error) {
      console.error(error)
  }
}

/* Promise resolves to:
[
    {
        "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03",
        "namespace": "wix.form_app.form",
        "status": "CONFIRMED",
        "submissions": {
            "last_name": "Doe",
            "first_name": "John"
        },
        "revision": "3",
        "submitter": {
            "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"
        },
        "seen": false,
        "_id": "abb9b5c9-a881-467c-9c34-b9bea43ca5f0",
        "_createdDate": "2023-12-28T12:54:04.652Z",
        "_updatedDate": "2023-12-28T12:54:05.483Z"
    },
    {
        "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03",
        "namespace": "wix.form_app.form",
        "status": "CONFIRMED",
        "submissions": {
            "last_name": "McBride",
            "first_name": "Patsy"
        },
        "revision": "3",
        "submitter": {
            "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"
        },
        "seen": false,
        "_id": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d",
        "_createdDate": "2023-12-28T12:55:55.630Z",
        "_updatedDate": "2023-12-28T12:55:56.233Z"
    }
]
*/
```

### querySubmissionsByNamespace (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 { submissions } from '@wix/forms';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function querySubmissionsByNamespace(query,options) {
  const response = await myWixClient.submissions.querySubmissionsByNamespace(query,options);
};
```

---