Active out-of-office-service for a user from external service

What is the easiest way to activate the out-of-office-service for a user automatically by an external service? Is there a web service url where i can trigger ooo with user/startdate/enddate?

You can write Losscript agent that will populate OOO Profile & enable OOO.