Skip to Content
1
May 16, 2020 at 07:04 AM

API call to fetch data based on Current Month in CPI

908 Views

Hi Experts,

I have a requirement to make an API call to get the invoices if they are created on that current month.

But, the created date in the invoice is in Unix timestamp.

My approach is as below:

* Convert the first day and last of the current month range to Unix Timestamp and store it in a property.

*Use that property in the API query to fetch. So this will be a dynamic API call for each run of the IFlow.

So, looking for groovy scripts or any better alternative approaches, If any.

Regards,

Pavan G