Sending a local notification only after making an api call to the server, to check a condition is satisfied or not

I want to send a notification to the user, only if he hasn’t filled some checklists. How to make this work, as I’ll need to make an api call to check the status and then only generate the notification, if the checklists aren’t filled.