**Source URL:** https://limited.veevavault.dev/clinical/vault-api/api-reference/26.2/clinical-operations/apply-template-edl-to-milestones.md

# Apply Template EDL to Milestones

Create missing *EDLs*, *Expected Documents*, and *Milestone Items* for specified *Milestone* records based on a *Study Template EDL*.

<Aside>The EDL Template Refactor feature must be enabled in your Clinical Operations Vault to use this endpoint. To enable it in the UI, navigate to **Admin > Settings > Application Settings > Expected Document List (EDL) Options** and select **EDL Template Refactor**.</Aside>

* The maximum CSV input file size is 1 GB.

* The values in the input must be UTF-8 encoded.

* CSVs must follow the standard RFC 4180 format, with some [exceptions](/vault-api/references/csv-rfc-deviations).

* The maximum batch size is 500.

<Endpoint path="/api/{version}/app/clinical/studies/{study_id}/apply_template_edl" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/json` or `text/csv` |
| `Accept` | `application/json` (default) or `text/csv` |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{study_id}` | The ID of the *Study* whose *Template EDL* should be applied to *Milestones*. The *Study* record must not be archived and its *Template EDL* field must be populated. |
</FieldTable>

## Body Parameters {#body-parameters}

Upload parameters as a JSON or CSV file. You can add up to 500 records in a single request.

<FieldTable>
| Field Name | Description |
| --- | --- |
| `id` | The ID of the *Milestone* record to apply the *Template EDL* to. The *Milestone* ID must be related to the specified `{study_id}`. Inactive records are skipped. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {AUTH_VALUE}" \
-H "Content-Type: text/csv" \
-H "Accept: application/json" \
--data-raw 'id
0MI00000001E015
0MI00000001E022
0MI00000001E020' \
https://myvault.veevavault.com/api/v26.1/app/clinical/studies/0ST00000000O001/apply_template_edl

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "job_id": "740602"
        }
    ]
}

```
</CodeExample>

## Response Details {#response-details}

On `SUCCESS`, Vault initiates a job to create missing *EDLs*, *Expected Documents*, and *Milestone Items* for the *Milestone* records provided in the request. You can use the `job_id` in the response to retrieve the [status](/vault-api/api-reference/26.2/jobs/retrieve-job-status) and results of the request. On completion, Vault sends an email notification with the job results.



---

**Previous:** [Apply Template EDL to a Milestone](/clinical/vault-api/api-reference/26.2/clinical-operations/apply-edl-template-to-a-milestone)  
**Next:** [Create Milestones from Template](/clinical/vault-api/api-reference/26.2/clinical-operations/create-milestones-from-template)