Carrier RestAPI - set response as a variable

I do it like that:

var bodyrl = new {
      trackingNumber = ShipHead.TrackingNumber,
      printWholeConsignment = true
};

requestrl.AddJsonBody(bodyrl); // Anonymous type object is converted to Json body

I don’t think serialization is needed when using RestSharp