I don’t really know how your application works, but based on my guess, you are running both microflows consecutively instead of separating them in different branch. Therefore, your previous validation gets overwritten by the next one.
Try to separate them, find a way to identify whether the data exists in the database or should be brought over from an API. If it exists in the database, run the database microflow. But if it’s being brought over from an API, run the API microflow.