REST service that provides an interface to insert into the PEVendorDetail table
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms){
string uri = "https://fusion.superion.com/FusionOSServices/v2/ONESolution/PersonEntity/PEVendorDetail";
string data =
@"[{
""peId"": ""V3596"",
""tin"": ""958523696"",
""vendAccount"": """",
""dueDays"": ""0"",
""eftFlag"": ""N"",
""bankRoute"": """",
""bankAcct"": """",
""noCheckFlag"": """",
""noCheckReas"": """",
""noInvFlag"": """",
""noInvReas"": """",
""noPrFlag"": """",
""noPrReas"": """",
""noPoFlag"": """",
""noPoReas"": """",
""discountPct"": ""3.00"",
""vend1099Flag"": """",
""vend1099Dflt"": """",
""addr1099Cd"": """",
""soleName"": """",
""dirSaleFlag"": """",
""tinFlag2"": """",
""contactId"": """",
""dbeMoFlag"": """",
""dbeWoFlag"": """",
""dbeSmFlag"": """",
""dbe8aFlag"": """",
""dbeHubFlag"": """",
""dbeDvFlag"": """",
""dbeLocFlag"": """",
""addendaType"": """",
""eftType"": """",
""createWho"": """",
""createWhen"": """",
""updateWho"": ""RESTAPI"",
""updateWhen"": ""10/16/2020 10:14:03 AM"",
""uniqueKey"": ""D6A344CC-B898-4F2D-B732-86A597BE2931"",
""contact"": """",
""bankType"": """",
""dupInvCheck"": """",
""discDays"": ""1"",
""discChangeResp"": """",
""paymentType"": ""CHK"",
""paymentExtId"": """",
""taxCd"": """",
""taxCd2"": """",
""taxStatus"": """",
""taxChangeResp"": """",
""vend1099Cd"": """",
""vendPmtTermsCd"": """"
}]";
using (WebClient wc = new WebClient())
{
wc.Headers.Add("Content-Type", "application/json");
// Replace "ID" with supplied AppID
wc.Headers.Set("X-APPID", "ID");
// Replace "KEY" with supplied AppKey
wc.Headers.Set("X-APPKEY", "KEY");
string result = wc.UploadString(uri, "POST", data);
JObject response;
if (!string.IsNullOrWhiteSpace(result))
response = JObject.Parse(result);
}
}
The JSON body can be copied from a GET and altered as needed.