I assumed a single call with a list for each selected but the call per document is interesting as well.
Sorry have not got an answer for you. I will ponder further.
On first thought: With the looping in the picker, I like how the called function could be simple and handle one thing at a time.