Method DeletePEAddrDetail

Type: FusionOSServices.Controllers.PEAddrDetailController

Summary

REST service that provides an interface to delete from the PEAddrDetail table

Example

DELETE 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.centralsquare.com/FusionOSServices/v2/ONESolution/PersonEntity/PEAddrDetail/{ID}/{addrCd}";

    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, "DELETE", "");

        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 deleted. Errors are returned as JSON objects with messages in the #text attribute, e.g.: { "#text": "Cannot find Record to update" }