Genera Informes Docs Entrar Crear cuenta gratis

← Documentación

Referencia de la API

Español primero; English below.

Autenticación

Creá una clave en API (menú superior, con sesión). La clave se muestra una sola vez. Mandala en cada solicitud:

Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx

Generar un documento

POST /v1/documents con la clave (o el id) de la plantilla y los datos. La respuesta es el PDF binario.

curl -X POST https://TU-DOMINIO/v1/documents \
  -H "Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
        "template": "factura",
        "data": {
          "Cliente": "ACME S.A.",
          "Fecha": "31/07/2026",
          "Items": ["Primera línea", "Segunda línea"]
        }
      }' \
  --output documento.pdf

Respuestas

CódigoQué pasó
200El PDF. Tokens sin dato se reportan en el header X-Document-Warnings.
400El cuerpo no es JSON válido o falta template/data bien formado.
401Clave ausente, inválida o revocada.
402Se alcanzó el límite de documentos del mes del plan.
404No hay plantilla activa con esa clave/id en tu workspace.
429Más de 60 solicitudes por minuto con la misma clave.

API Reference (English)

Authentication

Create a key under API (top menu, signed in). The key is shown once. Send it with every request:

Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx

Generate a document

POST /v1/documents with the template key (or id) and your data. The response body is the binary PDF.

curl -X POST https://YOUR-DOMAIN/v1/documents \
  -H "Authorization: Bearer dm_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
        "template": "invoice",
        "data": {
          "Customer": "ACME Inc.",
          "Date": "2026-07-31",
          "Items": ["First line", "Second line"]
        }
      }' \
  --output document.pdf

Responses

StatusMeaning
200The PDF. Tokens with no data are reported in the X-Document-Warnings header.
400Body is not valid JSON, or template/data malformed.
401Missing, invalid or revoked key.
402Monthly document limit for the plan was reached.
404No active template with that key/id in your workspace.
429More than 60 requests per minute on the same key.