# 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 %}
