Method PutPEVendorDetail

Type: FusionOSServices.Controllers.PEVendorDetailController

Summary

REST service that provides an interface to update the PEVendorDetail table

Example

PUT https://fusion.centralsquare.com/FusionOSServices/v2/ONESolution/PersonEntity/PEVendorDetail/00000001

Parameters

TypeDescription
System.String the employee ID

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms){
    string ID = "00000001";
    string uri = $"https://fusion.superion.com/FusionOSServices/v2/ONESolution/PersonEntity/PEVendorDetail/{ID}";
    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, "PUT", data);

        JObject response;
        if (!string.IsNullOrWhiteSpace(result))
             response = JObject.Parse(result);
    }
}

Remarks

The logical directory after /PEVendorDetail is the PE ID. If a corresponding record exists, that record will be updated with the data in the request body. The body must contain the same ID as the path. The JSON body can be copied from a GET and altered as needed. Errors are returned as JSON objects with messages in the #text attribute, e.g.: { "#text": "Cannot find Record to update" }