Method PutPEAddrDetail

Type: FusionOSServices.Controllers.PEAddrDetailController

Summary

REST service that provides an interface to update the PEAddrDetail table

Example

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

Parameters

TypeDescription
System.String the employee ID
System.String the address code

Sample Code

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

public void MethodName(parms){
    string ID = "00000001", addrCd = "BL";
    string uri = $"https://fusion.superion.com/FusionOSServices/v2/ONESolution/PersonEntity/PEAddrDetail/{ID}/{addrCd}";
    string data = 
    @"[{
      ""peId"": ""00000001"",
      ""addr1"": ""667 State St"",
      ""addr2"": """",
      ""addr3"": """",
      ""addr4"": """",
      ""city"": ""CHICO"",
      ""stateCd"": ""CA"",
      ""zip"": ""95973"",
      ""countryCd"": """",
      ""url"": """",
      ""addrCd"": ""BL"",
      ""uniqueKey"": """",
      ""address1Pc"": """",
      ""address2Pc"": """",
      ""address3Pc"": """",
      ""address4Pc"": """",
      ""cityPc"": """",
      ""cassStatusCd"": """",
      ""cassDt"": """",
      ""postalLot"": """",
      ""postalMvCd"": """",
      ""postalMvDt"": """",
      ""carrierRte"": """",
      ""carrierType"": """",
      ""deliveryPt"": """",
      ""addressStatCd"": """",
      ""contactId"": """",
      ""createWho"": """",
      ""createWhen"": """",
      ""updateWho"": """",
      ""updateWhen"": """",
      ""addrAttn"": """",
      ""locationLat"": ""0.000000"",
      ""locationLong"": ""0.000000""
    }]";

    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 first logical directory after /PEAddrDetail is the PE ID. After that, the next directory is the address code. Both must be specified, and if a corresponding record exists, that record will be updated with the data in the request body. The body must contain the same ID and address code 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" }