# Merging Templates

> Merge DOCX templates with JSON data into invoices and letters with the merge endpoint: merge fields, merge blocks, one document per record and MergeSettings.

- **Product:** DS Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** DS Server > Document Processing > Merging Templates
- **Web URL:** https://docs.textcontrol.com/ds-server/document-processing/mail-merge/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/document-processing/mail-merge/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/document-processing/mail-merge/llms-full.txt

---

## On This Page

- [How Merging Works](https://docs.textcontrol.com/ds-server/document-processing/mail-merge/#how-merging-works)
- [Prepare the Template and the Data](https://docs.textcontrol.com/ds-server/document-processing/mail-merge/#prepare-the-template-and-the-data)
- [Merge a Template With curl](https://docs.textcontrol.com/ds-server/document-processing/mail-merge/#merge-a-template-with-curl)
- [Merge a Template With .NET](https://docs.textcontrol.com/ds-server/document-processing/mail-merge/#merge-a-template-with-net)
- [Create One Document per Record](https://docs.textcontrol.com/ds-server/document-processing/mail-merge/#create-one-document-per-record)
- [Set Merge Options](https://docs.textcontrol.com/ds-server/document-processing/mail-merge/#set-merge-options)
- [Next Steps](https://docs.textcontrol.com/ds-server/document-processing/mail-merge/#next-steps)

---

## Nearby

- **Previous:** [Converting Documents](https://docs.textcontrol.com/ds-server/document-processing/converting/llms.txt)
- **Next:** [Appending Documents](https://docs.textcontrol.com/ds-server/document-processing/appending/llms.txt)
