Report operation



Introduction

Once you have created a chat, you can take a report at any time


Operations

Generate report preview

HTTP Request

POST /api/v1/private/chat/{chatId}/report-preview

With the following information provided as JSON:

{
    "template": "certificate_chat",
    "languageCode": "es_es",
    "fromDate": "2024-06-17T14:43:40.000Z",
    "toDate": "2024-06-17T14:50:00.000Z",
    "additionalData": {
        "DOC_PURPOSES": [
            "'El uso de la marca XXX, propiedad de XXX con CIF XXXX, durante el año XXXX.'"
        ],
        "DOC_URL": "http://io.builders/document/",
        "DOC_QR": ""
    }
}
      }

Request body parameters

Parameter Mandatory Datatype Description
template yes string The name of the template. We have currently one template:"certificate_chat"
languageCode yes string The language of the report. We have currently two languages: "es_ES" and "en_EN"
fromDate yes timestamp The date from which you want the messages, do not send anything so that it takes from the creation of the chat.
toDate yes timestamp The date until which you want the messages, do not send anything so that they receive all the messages.
additionalData no object Some extra data for each template.

As response, you will get an HTML with the preview of the Report.

Generate signed report

HTTP Request

POST /api/v1/private/chats/{chatId}/reports

With the following information provided as JSON:

{
    "reportId": "a5b66d02-6b60-4c84-8fb5-886b0274347d",
    "template": "certificate_chat",
    "languageCode": "es_es",
    "fromDate": "2024-06-17T14:43:40.000Z",
    "toDate": "2024-06-17T14:50:00.000Z",
    "additionalData": {
        "DOC_PURPOSES": [
            "'El uso de la marca XXX, propiedad de XXX con CIF XXXX, durante el año XXXX.'"
        ],
        "DOC_URL": "http://io.builders/document/",
        "DOC_QR": "i"
    }
}
      }

Request body parameters

Parameter Mandatory Datatype Description
reportId yes UUID The ID of the report.
template yes string The name of the template. We have currently one template:"certificate_chat"
languageCode yes string The language of the report. We have currently two languages: "es_ES" and "en_EN"
fromDate yes timestamp The date from which you want the messages, do not send anything so that it takes from the creation of the chat.
toDate yes timestamp The date until which you want the messages, do not send anything so that they receive all the messages.
additionalData no object Some extra data for each template.

As response, you will get

201 Generated signed report

Get Report PDF URL

HTTP Request

GET /api/v1/private/reports/{reportId}/document

As response, you will get the temporary download URL.

Get Report ZIP URL

HTTP Request

GET /api/v1/private/reports/{reportId}/package

As response, you will get the temporary download URL.