Ending a Visit using REST

I’d like to end a visit via a rest call.

Is this supposed to be done via setting the stopDatetime or is there something else that needs to be done to end it?

Yes it is done by setting current date as stopDate.

check this VisitServiceImpl (OpenMRS 2.5.0-SNAPSHOT API)

method that end visits basically does the same.