Search.../

getSubmission( )

Developer Preview

Retrieves a submission by ID.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function getSubmission(submissionId: string): Promise<FormSubmission>

getSubmission Parameters

NAME
TYPE
DESCRIPTION
submissionId
string

ID of the submission to retrieve.

Returns

The retrieved submission.

Return Type:

Promise<
FormSubmission
>
NAME
TYPE
DESCRIPTION
_createdDate
Date

Date and time the form submission was created.

_id
string

Submission ID.

_updatedDate
Date

Date and time the form submission was updated.

formId
string

ID of the form which submission belongs to.

namespace
string

The app which the form submissions belong to. For example, the namespace for the Wix Forms App is "wix.form_app.form". The namespace of a submission can be retrieved using the Get Submission endpoint.

revision
string

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.

seen
boolean

Whether the submission was read by a site collaborator with permissions to manage submissions.

status
string

Status of the submission.

  • PENDING: When a submission has been created, but has not yet been recorded in the submission table of the forms dashboard.
  • CONFIRMED: When a submission is recorded in the submissions table of the forms dashboard.
submissions
Object

Submission values where key is the form field and value is the data submitted for the given field.

submitter
Submitter

ID of the creator of the form submission.

Was this helpful?

getSubmission example

Copy Code
1import { submissions } from 'wix-forms.v2';
2
3 async function getSubmission(submissionId) {
4 try {
5 const result = await submissions.getSubmission(submissionId);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13