This documentation is currently under development. Certain sections are not yet complete and will be added shortly.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Templates

Render Liquid templates against one shared context.

post
/api/{tenantId}/templates/render

Uses the tenant's Liquid tags and filters. A failing template does not fail the request: it is reported in errors at its index and the others still render. Nothing is stored.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired
Authorization URL:
Path parameters
tenantIdstringRequired
Body

Request body for rendering Liquid templates.

culturestring · nullableOptional

BCP 47 culture tag (en, fr-FR) the templates are rendered in: it drives date and number formatting and picks the language of localized values. Omitted or empty, en-US is used.

templatesstring[]Required

Liquid templates to render, each independently of the others.

contextobject · nullableOptional

Variables available to every template, by name. Nested objects and arrays are reachable with Liquid's dot and index syntax.

Responses
200

Templates processed; check errors for per-template Liquid failures.

Response body returned by M:Neo.Web.Api.Template.Controllers.TemplatesController.Render(Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateRequest,System.Threading.CancellationToken).

resultsstring[]Required

Rendered outputs, trimmed of leading and trailing whitespace. results[i] is the output of templates[i], or null when that template failed (see Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateResponse.Errors).

errorsstring[] · nullableOptional

Liquid error messages, aligned with Neo.Web.Api.Template.Controllers.TemplatesController.RenderTemplateResponse.Results; absent when every template rendered. errors[i] is null when templates[i] rendered.

post/api/{tenantId}/templates/render
POST /api/{tenantId}/templates/render HTTP/1.1
Host: app.neostore.cloud
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "culture": null,
  "templates": [
    "text"
  ],
  "context": null
}
{
  "results": [
    "text"
  ],
  "errors": [
    "text"
  ]
}

Last updated