Find the answer to your question
I am getting error 291 with ReviseItem call:
ReviseItem will response with Error 291 'You are not allowed to revise ended auctions' when the ItemID specified in the ReviseItem request is not currently active. A seller is only allowed to make changes to a currently active item listing.
Before sending ReviseItem call, you can make GetItem call to verify if the given item is alive. You can't Revise an item if the item listing status is flaged as ended in the GetItem response: