This seems to work for me with the .NET SDK:
RetrieveCatalogObjectResponse retrieveResponse = await catalogApi.RetrieveCatalogObjectAsync(objectId);
CatalogObject catalogObject = retrieveResponse.MObject.ToBuilder()
.AbsentAtLocationIds(locationList) // field or fields you want to change
.Build();
UpsertCatalogObjectRequest upsertRequest = new UpsertCatalogObjectRequest.Builder(Guid.NewGuid().ToString(), catalogObject)
.Build();
UpsertCatalogObjectResponse upsertResponse = await catalogApi.UpsertCatalogObjectAsync(upsertRequest);
My application is a web app so I’m using the Async methods, but that’s not necessary depending on the type of application you’re developing. It should be the same with the non-async methods (and the awaits omitted of course).