using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
public static void Main()
string url = "https://api-stg.liftit-sandbox.com/v1/delivery_bags";
string data = "{\"order\": {\"hub_id\": "+816+",\"initial_delivery_time\": \"2018-01-07 03:00:00\",\"finish_delivery_time\": \"2018-01-07 15:00:00\",\"latitude\": "+4+",\"longitude\":"+74+",\"neighborhood\": \"Suba\",\"city\": \"Bogota\",\"state\": \"Bogota\",\"order_number\": \"33215355\",\"promise\": \"7-13\",\"observations\": \"El edificio es de color rosa\",\"customer\": {\"name\": \"Daniel\",\"contact\": \"Felipe\",\"phone\": \"54576452\",\"identification_number\": \"900000000\",\"email\": \"daniikpando1234@hotmail.com\",\"address\": \"calle 19 # 31\",\"extra_address\": \"torre 1 apto 503\",\"internal_id\": \"20\"},\"items\": [{\"description\": \"TV 65\",\"sku\": \"24022\",\"barcode\": \"77742466666\",\"quantity\": "+2+",\"unit_weight\": "+10+",\"unit_volume\": "+300+",\"unit_price\": "+1000000+",\"total_price\": "+200000+"}]}}";
WebRequest myReq = WebRequest.Create(url);
myReq.ContentLength = data.Length;
myReq.Headers["Authorization"] = "SFMyNTY.g3QAAAACZAAEZGF0YXQAAAAGbQAAABJvcmdhbml6YXRpb25faG9zdHNkAANuaWxtAAAAD29yZ2FuaXphdGlvbl9pZGIAAAQRbQAAAAVyb2xlc2wAAAABbQAAAAVhZG1pbmptAAAACnNlc3Npb25faWRkAANuaWxtAAAAB3VzZXJfaWRiAAAanW0AAAAJdXNlcl90eXBlbQAAAANhcGlkAAZzaWduZWRuBgDJLyANaQE.trM-hAhY1_LQ2YANtTEq3KFzqn4siybVgDTXcZGFGTg";
myReq.ContentType = "application/json; charset=UTF-8";
UTF8Encoding enc = new UTF8Encoding();
using (Stream ds = myReq.GetRequestStream())
ds.Write(enc.GetBytes(data), 0, data.Length);
WebResponse wr = myReq.GetResponse();
Stream receiveStream = wr.GetResponseStream();
StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8);
string content = reader.ReadToEnd();