[Route("api/CancelSlotAppointment")]
[HttpGet]
public string CancelSlotAppointment(string SlotID, bool Cancel)
{
var uri = new Uri("http://localhost:9200");
var settings = new ConnectionSettings(uri);
var client = new ElasticClient(settings);
var result = client.Update(SlotID, u => u
.Index("slot_booking")
.Doc(new
{
BookingCanceled = Cancel
}
));
return result.ToString();
}
{
"_index": "slot_booking",
"_type": "_doc",
"_id": "0NJZMYABHXYXREFD-lWQ",
"_score": 1.0,
"_source": {
"SlotID": "200",
"PracticeID": "100",
"BookingCanceled": false,
"Confirm": false
}
}