This is not something you could obtain from the API. The API basically exposes some of the features of the site (e.g. search, writing posts, voting itself) in a programmatic way. For analysis like this, you'll need SEDE, the Stack Exchange Data Explorer and support for that is on Meta Stack Exchange; there's even a chatroom dedicated to SEDE.
That said, the ...
It's no different in the API than it is for the main site. From the FAQ:
you may change your vote within a five minute window from the time of the first vote you cast on that post. Note that after voting and undoing your vote 30 times, it will also be locked in.
Badges and new privileges are part of the /notifications method, which is a single call for all accounts across the network. The results show whether the notification is unread or not. There's also a separate method just for unread notifications: /notifications/unread.
For reputation changes, all I know are some site-specific methods (/me/reputation, /me/...
This evening, after being inspired by How to get (unread) achievements?, I did some analysis with mitmproxy. It turns out that the Stack Exchange mobile apps use an undocumented API v2.3 method for this: /me/achievements.
A GET call to https://api.stackexchange.com/2.3/me/achievements?pageSize=100&filter=*-t3H1VAnvpZbcZ&access_token=[ACCESS_TOKEN]&...