Saltar al contenido
Guías
CatálogoNotificaciones
notification:read

Previsualizar una plantilla con datos de ejemplo

Renders the stored template, or the content sent in the body, with the sample data of its event and the store branding used by real sends.

POST/v1/notifications/templates/{templateId}/preview

Previsualizar una plantilla con datos de ejemplo. Una solicitud exitosa devuelve HTTP 200 con el cuerpo de respuesta documentado.

Autorización

bearerAuth
AutorizaciónBearer <token>

Token de acceso OAuth 2.0 emitido por Ecomiq Auth.

Ubicación: header

Parámetros de ruta

templateId*string

Identificador de la plantilla.

Parámetros de cabecera

x-Store-Id?string

Tienda sobre la que actúa la solicitud. No hace falta cuando el token ya está vinculado a una tienda.

Authorization*string

Token bearer OAuth 2.0.

Cuerpo de la solicitud

application/json

Definiciones TypeScript

Usa esta definición en TypeScript.

Cuerpo de la respuesta

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/notifications/templates/7204558912004325301/preview" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>" \  -H "Content-Type: application/json" \  -d '{    "subjectTpl": "example",    "bodyTpl": "example",    "textTpl": "example"  }'
{  "subject": "example",  "body": "example",  "text": "example"}