Ramco Ramco

Ramco Ramco

  • 440
  • 3.4k
  • 527.5k

Error - awb is required

Jan 12 2023 6:30 AM

Hi

  I am getting below error - 

{"status":false,"message":"awb is required\n"}
var awb = "321896356723";
var client = new RestClient("htps://api.nimbuspost.com/v1/shipments/cancel");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = $@"{{ ""awb"": [ ""{awb} ""]}}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Thanks


Answers (2)