Hi
How to create Shipping Order using NimbusPost Api in c# . Any ideas
Thanks
Hi
How to create Shipping Order using NimbusPost Api in c# . Any ideas
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Deepak TewatiaRank #143 · 15.9K reputationPosted Dec 21, 2022, 1:50 AM EST
Hi Ramco,
Use CreateShippingOrderAsync method of the NimbusPostClient class to create a new shipping order. This method takes an instance of the ShippingOrder class as a parameter, which you will need to populate with the relevant information for your shipping order. You can use the below code:
var shippingOrder = new ShippingOrder { Recipient = new Recipient { Name = "John Smith", AddressLine1 = "123 Main Street", City = "New York", State = "NY", PostalCode = "10001", Country = "US" }, Items = new List { new Item { Description = "T-shirt", Quantity = 2, Weight = 1.5, Value = 25 }, new Item { Description = "Jeans", Quantity = 1, Weight = 2.5, Value = 50 } }, ShippingMethod = "UPS Ground" }; var result = await client.CreateShippingOrderAsync(shippingOrder);This will create a new shipping order with the specified recipient and items, and will use the specified shipping method. you can change parameters according to your requirement.
Thanks
Ramco RamcoRank #462 · 5.4K reputationPosted Dec 21, 2022, 2:02 AM EST
Hi Deepak
I am trying below code . Will it not work. How to pass Textbox Values
var body = @"{" + "\n" + @" ""order_number"": ""+txtOrderNo.text""," + "\n" + @" ""shipping_charges"": 40," + "\n" + @" ""discount"": 100," + "\n" + @" ""cod_charges"": 30," + "\n" + @" ""payment_type"": ""cod""," + "\n" + @" ""order_amount"": 1000," + "\n" + @" ""package_weight"": 300," + "\n" + @" ""package_length"": 10," + "\n" + @" ""package_breadth"": 10," + "\n" + @" ""package_height"": 10," + "\n" + @" ""consignee"": {" + "\n" + @" ""name"": ""Customer Name""," + "\n" + @" ""address"": ""190, ABC Road""," + "\n" + @" ""address_2"": ""Near Bus Stand""," + "\n" + @" ""city"": ""Mumbai""," + "\n" + @" ""state"": ""Maharastra""," + "\n" + @" ""pincode"": ""400001""," + "\n" + @" ""phone"": ""9999999999""" + "\n" + @" }," + "\n" + @" ""pickup"": {" + "\n" + @" ""warehouse_name"": ""warehouse 1""," + "\n" + @" ""name"" : ""Vikalp Sharma""," + "\n" + @" ""address"": ""140, MG Road""," + "\n" + @" ""address_2"": ""Near metro station""," + "\n" + @" ""city"": ""Gurgaon""," + "\n" + @" ""state"": ""Haryana""," + "\n" + @" ""pincode"": ""122001""," + "\n" + @" ""phone"": ""9999999999""" + "\n" + @" }," + "\n" + @" ""order_items"": [" + "\n" + @" {" + "\n" + @" ""name"": ""product 1""," + "\n" + @" ""qty"": ""18""," + "\n" + @" ""price"": ""100""," + "\n" + @" ""sku"": ""sku001""" + "\n" + @" }" + "\n" + @" ]" + "\n" + @"}";Thanks