You can post data in WebApi like below
public class Bag
{
public string Name{get;set;}
}
var dataJSON = { bags: [{ Name: "Bag1", Name: "Bag2" },
{ Name: "Bag4", Name: "Bag3" }] };
$.ajax({
type: 'POST',
url: 'specify the url here',
data: JSON.stringify(dataJSON),
contentType: 'application/json; charset=utf-8',
dataType: 'json'
});
public void Post(List<Bag> bags)
{
}
Hope this helps