# Templates

## Render one or more Liquid templates with the provided context.

> Applies the tenant-configured template engine to each submitted template using the\
> shared context payload. All templates are rendered with a single engine instantiation.\
> &#x20;           \
> The response is an array aligned with the request \`Templates\` array: \`Results\[i]\` is the rendered output of \`Templates\[i]\`.\
> &#x20;           \
> \## Authorization\
> Requires \`Core.Read\` scope.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Templates"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"RenderTemplateRequest":{"required":["templates"],"type":"object","properties":{"templates":{"type":"array","items":{"type":"string"},"description":"One or more Liquid template strings to render."},"context":{"type":["null","object"],"additionalProperties":{},"description":"Key/value pairs made available to every template during rendering."}},"additionalProperties":false,"description":"Request body for rendering Liquid templates."},"RenderTemplateResponse":{"required":["results"],"type":"object","properties":{"results":{"type":"array","items":{"type":"string"},"description":"Index-aligned rendered outputs. `Results[i]` corresponds to `Templates[i]`.\nThe value is `null` when the template at that index failed to render (see Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateResponse.Errors)."},"errors":{"type":["null","array"],"items":{"type":"string"},"description":"Index-aligned Liquid error messages. Only present when at least one template failed.\n`Errors[i]` is `null` when `Results[i]` rendered successfully."}},"additionalProperties":false,"description":"Response body returned by M:Neo.Web.Api.Template.Controllers.TemplatesController.Render(Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateRequest,System.Threading.CancellationToken)."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/templates/render":{"post":{"tags":["Templates"],"summary":"Render one or more Liquid templates with the provided context.","description":"Applies the tenant-configured template engine to each submitted template using the\nshared context payload. All templates are rendered with a single engine instantiation.\n            \nThe response is an array aligned with the request `Templates` array: `Results[i]` is the rendered output of `Templates[i]`.\n            \n## Authorization\nRequires `Core.Read` scope.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"List of template strings and an optional shared rendering context.","content":{"application/json":{"schema":{"description":"Request body for rendering Liquid templates.","$ref":"#/components/schemas/RenderTemplateRequest"}},"text/json":{"schema":{"description":"Request body for rendering Liquid templates.","$ref":"#/components/schemas/RenderTemplateRequest"}},"application/*+json":{"schema":{"description":"Request body for rendering Liquid templates.","$ref":"#/components/schemas/RenderTemplateRequest"}}}},"responses":{"200":{"description":"Templates rendered; check `errors` for per-template Liquid failures.","content":{"text/plain":{"schema":{"description":"Response body returned by M:Neo.Web.Api.Template.Controllers.TemplatesController.Render(Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateRequest,System.Threading.CancellationToken).","$ref":"#/components/schemas/RenderTemplateResponse"}},"application/json":{"schema":{"description":"Response body returned by M:Neo.Web.Api.Template.Controllers.TemplatesController.Render(Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateRequest,System.Threading.CancellationToken).","$ref":"#/components/schemas/RenderTemplateResponse"}},"text/json":{"schema":{"description":"Response body returned by M:Neo.Web.Api.Template.Controllers.TemplatesController.Render(Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateRequest,System.Threading.CancellationToken).","$ref":"#/components/schemas/RenderTemplateResponse"}}}},"400":{"description":"One or more templates are invalid or rendering failed.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Not authorized.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```
