How to void an observation

Hi guys! I created a fork of this https://github.com/OpenHMIS/openmrs-contrib-android-client and I’m improving a few things.

One quick question:

I would like to void an observation using the Obervation resource an ObservationService to make the REST calls

Doing:

Observation obs = encounter.getObeservations().get(0);

obs.setVoided(true);

observationService.update(observation, new DataService.GetSingleCallback<Observation>() {
            @Override
            public void onCompleted(Observation entity) {
                //this line outputs the same object I am sending. Np changes even the server
            }

            @Override
            public void onError(Throwable t) {
                ConsoleLogger.dump("error occured");                
            }
        });

I am making POST calls to /obs/ObsUuid. I am using OpenMRS ver 1.11.x

It does not void the given obs.

Q: What is the right way to void an observation?

Thanks

Did you try this? https://qa-refapp.openmrs.org/openmrs/module/webservices/rest/apiDocs.htm#!/obs/deleteObs

Wow! Thanks a bunch.