Ramco Ramco

Ramco Ramco

  • 441
  • 3.4k
  • 522.5k

API error message

Jan 11 2023 5:55 AM

Hi

  Below error is returned by API . I want to display this message

{"status":false,"message":"The Consignee Address field must be at least 5 characters in length.\n"}

***************** Below is the API
var body = new JavaScriptSerializer().Serialize(objShippingOrdr);
                    var client = new RestClient("htts://api.nimbuspost.com/v1/shipments");
                    client.Timeout = -1;
                    var request = new RestRequest(Method.POST);
                    request.AddHeader("content-type", "application/json");
                    request.AddParameter("application/json", body, ParameterType.RequestBody);
                    var response = client.Execute(request);

*****************
public class RootShipment
        {
            public bool status { get; set; }
            public DataShipment data { get; set; }

        }

Thanks


Answers (1)