getbrevo/brevo-node

TransactionalEmailsApi.getEmailEventReport returns missing_parameter for EndDate even though no StartDate was given

LiFaytheGoblin opened this issue · 2 comments

I am calling this function: https://github.com/getbrevo/brevo-node/blob/07cc1ff8d503a93f17c62535df61da4d1d42796a/api/transactionalEmailsApi.ts#L726C18-L726C37

Like this:
transactionalEmailsApi.getEmailEventReport(1, 0, null, null, 1, EMAIL, 'delivered', null, null, 21);

As such, I am leaving out some params that I don't need for the query. However, I receive {"code":"missing_parameter","message":"Start date is missing"}

Expected behavior: Since neither start date nor end date is given, I should not receive an error.

Node v20.11.1

Oh, when I provide start and end date, it next tells me that the message id is missing!

It looks like I can get what I want with getTransacEmailsList(email, templateId)