Saltar al contenido principal
POST
/
v1
/
templates
Subir una plantilla
curl --request POST \
  --url https://reporter.sandbox.lerian.net/v1/templates \
  --header 'Content-Type: multipart/form-data' \
  --form template=@example-file \
  --form outputFormat=TXT \
  --form 'description=Lista de titulares'
{
"id": "0196b270-a315-7137-9408-3f16af2685e1",
"outputFormat": "TXT",
"description": "Lista de titulares",
"filename": "0196b270-a315-7137-9408-3f16af2685e1.tpl",
"createdAt": "2025-05-09T00:27:28.405080783Z"
}
¿Necesitas un ejemplo para probar este punto de conexión? Haz clic aquí para descargar un archivo .tpl de ejemplo.

Headers

Authorization
string

The authorization token. Important: This header is required if your environment has the Access Manager plugin enabled.

Content-Type
string

Tipo de contenido de la solicitud. Importante: para este endpoint debe ser multipart/form-data.

X-Organization-id
string

The unique identifier of the Organization associated with the request.

Body

multipart/form-data
template
file
required

Archivo .tpl que creaste como definición de la plantilla.

outputFormat
enum<string>
required

Formato del informe que generará la plantilla.

Opciones disponibles:
HTML,
CSV,
XML,
PDF,
TXT
Example:

"TXT"

description
string
required

Descripción breve de la plantilla.

Example:

"Lista de titulares"

Response

Indica que el recurso se creó correctamente y que la operación se completó según lo esperado.

Detalles de la plantilla que se creó.

id
string

ID único que identifica la plantilla (formato UUID).

outputFormat
string

Formato de salida generado (por ejemplo, HTML, CSV, PDF, TXT, XML).

description
string

Describe brevemente para qué sirve la plantilla o qué contiene.

fileName
string

Nombre del archivo de plantilla tal como está guardado en el sistema. Sigue el formato <template_id>.tpl.

createdAt
string

Marca de tiempo que indica cuándo se creó la plantilla.