try { Cuerpo cuerpo = new Cuerpo() { token = textBox161.Text, documentoElectronico = new DocumentoElectronico() }; cuerpo.documentoElectronico.encabezado = new Encabezado() { identificacionDocumento = new IdentificacionDocumento() { tipoPago = textBox11.Text, tablaFormasPago = new List() }, emisor = new Emisor() { razonSocial = textBox20.Text, nombreComercial = textBox21.Text, sucursal = textBox22.Text, direccion = textBox23.Text, municipio = textBox24.Text, zonaVenta = textBox32.Text, }, comprador = new Comprador() { provincia = textBox46.Text, pais = textBox47.Text, fechaEntrega = textBox48.Text, fechaOrden = textBox52.Text, numeroOrden = textBox53.Text, codigoInterno = textBox54.Text, }, informacionesAdicionales = new InformacionesAdicionales() { numeroContenedor = textBox59.Text, numeroReferencia = textBox60.Text, }, totales = new Totales() { montoGravadoTotal = textBox94.Text, montoGravadoI1 = textBox95.Text, montoTotal = textBox107.Text, }, }; TablaFormasPago item = new TablaFormasPago() { forma = "1", monto = textBox107.Text }; cuerpo.documentoElectronico.encabezado.identificacionDocumento.tablaFormasPago.Add(item); cuerpo.documentoElectronico.encabezado.emisor.tablaTelefono.Add("809-472-7676"); cuerpo.documentoElectronico.encabezado.emisor.tablaTelefono.Add("809-491-1918"); DetallesItem detalles = new DetallesItem() { numeroLinea = "1", indicadorFacturacion = "1", nombre = "ASW DTU", indicadorBienoServicio = "1", cantidad = "15", unidadMedida = "31", precioUnitario = "400.00", monto = "6000.00", descripcion="Una descripcion normal" }; HttpClient cliente = new HttpClient(); cliente.BaseAddress = new Uri("https://emision.thefactoryhka.com.ve"); var resp = cliente.PostAsync("api/Enviar", content).Result; var resultado = resp.Content.ReadAsStringAsync(); string dame = resultado.Result; var Respuesta = JsonSerializer.Deserialize(dame); richTextBox1.Text = Respuesta.codigo.ToString() + "\r\n" + Respuesta.mensaje + "\r\n" + Respuesta.procesado.ToString() + "\r\n" + Encoding.UTF8.GetString(Respuesta.xmlBase64); } catch (Exception b) { MessageBox.Show(b.ToString()); }