Specify revision ID for updating pull requests

Hi,
I was wondering if there was a way to specify a revision ID when updating Pull Requests? I ask because we have a bot accepting webhooks from PRs and updating the PR in certain ways, i.e. adding / removing labels, some auto merging functionality… and the PR may change while the bot is processing the request, and when it updates the requests it will overwrite changes added while it was processing.

If the Patch …/pulls/:number api accepted a revision ID or something like that this situation could be avoided.