Reports documentation

Authorization

El servicio requiere un cabecera de autorizacion, debemos poner el token que nos faciliten como cabecera de la peticion siguiendo este esquema:

lzrmsrpt-auth: auth token

V1

Crear informe sincrono

Para crear un informe es necesario pegar al endpoint "/v1/create-report-sync" por post mandando el body como texto plano

Headers y footer

El header y footer del documento pdf debe manejarse en los syles del html que viene como texto plano en la petición, para ello debemos usar las reglas de estilos de los pdfs de los navegadores. Adjunto un ejemplo

curl --location
'http://lzrms-report.lazarustechservices.com/v1/create-report-sync' \ --header
'lzrmsrpt-auth: 1234567890abcdefghijklmnopq' \ --header 'Content-Type:
text/plain' \ --data '<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>
    <body>
        <h1>
            Hello world!
        </h1>
    </body>
</html>'

Crear informe asincrono

Para crear un informe es necesario pegar al endpoint "/v1/create-report-sync" por post mandando el body como texto plano

Body:

curl --location 'http://url/v1/create-report-async' \
--header 'lzrmsrpt-auth: 1234567890abcdefghijklmnopq' \
--header 'Content-Type: application/json' \
--data '{
    "html_data": "PGh0bWw+DQogICAgPGhlYWQ+DQogICAgICAgIDxtZXRhIGNoYXJzZXQ9IlVURi04IiAvPg0KICAgICAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0aWFsLXNjYWxlPTEuMCIgLz4NCiAgICA8L2hlYWQ+DQogICAgPGJvZHk+DQogICAgICAgIDxoMT4NCiAgICAgICAgICAgIEhlbGxvIHdvcmxkIQ0KICAgICAgICA8L2gxPg0KICAgIDwvYm9keT4NCjwvaHRtbD4=",
    "webhook_url": "www.your-webhook-url.com",
}'

Obtener la lista de informes

curl --location --request GET 'https://lzrms-report.lazarustechservices.com/v1/get-reports-list' \
--header 'lzrmsrpt-auth: 1234567890abcdefghijklmnopq' \

Obtener un informe por su report_id

curl --location --request GET 'https://lzrms-report.lazarustechservices.com/v1/get-report-by-report-id/${report_id}' \
--header 'lzrmsrpt-auth: 1234567890abcdefghijklmnopq' \