# Templates

Liquid template management for receipt and email rendering.
Merchants can use built-in system templates (standard, detailed, compact) or upload
custom Liquid templates. Templates control the layout and content of rendered receipts
and notification emails.

 - [GET /templates](https://docs.nelnetpay.com/apis/receipts-service/templates/listtemplates.md): List available templates for the authenticated merchant. Returns both built-in system templates and merchant-uploaded custom templates.
 - [POST /templates](https://docs.nelnetpay.com/apis/receipts-service/templates/createtemplate.md): Upload a new custom Liquid template for receipt or email rendering. The template is created in DRAFT status and must be activated before use. Liquid syntax is validated on creation.
 - [GET /templates/{templateId}](https://docs.nelnetpay.com/apis/receipts-service/templates/gettemplate.md): Retrieve a single template by ID, including its full Liquid content.
 - [PUT /templates/{templateId}](https://docs.nelnetpay.com/apis/receipts-service/templates/updatetemplate.md): Update a custom template. System templates cannot be modified. Liquid syntax is re-validated on update. Increments the template version.
 - [DELETE /templates/{templateId}](https://docs.nelnetpay.com/apis/receipts-service/templates/deletetemplate.md): Delete a custom template. System templates cannot be deleted. If the template is set as the active template in the merchant's configuration, the response uses responseCode E409 in the NPS error envelo
 - [POST /templates/validate](https://docs.nelnetpay.com/apis/receipts-service/templates/validatetemplate.md): Validate Liquid template syntax without persisting. Returns validation results including any syntax errors and unrecognized variable references.
 - [POST /templates/{templateId}/preview](https://docs.nelnetpay.com/apis/receipts-service/templates/previewtemplate.md): Render a template with sample data and return the resulting HTML. Useful for previewing how a template will look before activating it.
 - [POST templateCreated](https://docs.nelnetpay.com/apis/receipts-service/templates/webhooktemplatecreated.md): Fired when a new custom Liquid template is created.
 - [POST templateUpdated](https://docs.nelnetpay.com/apis/receipts-service/templates/webhooktemplateupdated.md): Fired when a custom template is updated.
 - [POST templateActivated](https://docs.nelnetpay.com/apis/receipts-service/templates/webhooktemplateactivated.md): Fired when a template status changes to ACTIVE.
 - [POST templateArchived](https://docs.nelnetpay.com/apis/receipts-service/templates/webhooktemplatearchived.md): Fired when a template status changes to ARCHIVED.
 - [POST templateDeleted](https://docs.nelnetpay.com/apis/receipts-service/templates/webhooktemplatedeleted.md): Fired when a custom template is permanently deleted.
