> For the complete documentation index, see [llms.txt](https://formdr.gitbook.io/formdr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://formdr.gitbook.io/formdr/documentation/submissions/get-submission.md).

# Get Submission

## Returns a submission

<mark style="color:blue;">`GET`</mark> `https://api.formdr.com/api/v1/practice/{practiceId}/submissions/{submissionId}`

Returns data of a submission, including the prefilledData.

#### Path Parameters

| Name                                           | Type   | Description   |
| ---------------------------------------------- | ------ | ------------- |
| practiceI<mark style="color:red;">\*</mark>    | String | Practice ID   |
| submissionId<mark style="color:red;">\*</mark> | String | Submission ID |

{% tabs %}
{% tab title="200: OK Returns submission data of the submission." %}

```javascript
{
    id: number,
    formId: number,
    recordId: number,
    patientName: String, //This will match a Find Patient search
    submissionJson: {
        prefilledData: {} //data sent during 'create submission'
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Testing

During testing, submissions must have an "APITEST" field, that includes a value as well. It can be any field. If you are missing this field during testing, you will be given an error that describes the same.

{% hint style="info" %}
If you are seeing randomly generated keys in your submisssionJson, this is because you must set the field names yourself within the form builder. All you need to do is click the edit button on any field and then edit the text box with what name you'd like to give the field. This will then be populated in the submissionJson object.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://formdr.gitbook.io/formdr/documentation/submissions/get-submission.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
