Method GetPEEmailDetail

Type: FusionOSServices.Controllers.PEEmailDetailController

Summary

REST service that provides an interface to read the PEEmailDetail table

Example

GET https://fusion.centralsquare.com/FusionOSServices/v2/ONESolution/PersonEntity/PEEmailDetail/00000001/01/01

Parameters

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

Sample Code

using System.Net;

public void MethodName(parms){
    string uri = "https://fusion.centralsquare.com/FusionOSServices/v2/ONESolution/PersonEntity/PEEmailDetail/00000001/01/01";
    WebClient wc = new WebClient();
    Common.SetResponseType(wc, "json");
    Common.SetLicenseKey(wc);
    string stringResult = wc.DownloadString(new Uri(uri));
    
    JObject response = JObject.Parse(stringResult);
    foreach(var addressRec in response["RequestResponse"]["DATA"]["PEEMAILDETAIL"])
    {
       // TODO
    }
}

$.get('https://fusion.centralsquare.com/FusionOSServices/v2/ONESolution/PersonEntity/PEEmailDetail/00000001/01/01', function(response) {
    $('#resultDiv).html(response); 
 });

Sample Responses


                        
            {
              "RequestResponse": {
                "Count": "1",
                "DATA": {
                  "PEEMAILDETAIL": [
                    {
                      "peId": "00000001",
                      "emailTypeCd": "01",
                      "addrCd": "01",
                      "emailAddr": "nayana1@sungard.com",
                      "createWho": "NAYANA.THI~2",
                      "createWhen": "4/15/2012 10:28:49 PM",
                      "updateWho": "NAYANA.THI~2",
                      "updateWhen": "4/15/2012 10:28:49 PM",
                      "uniqueKey": "AD73344B-65DA-4FD8-815D-6DE512CAAC40"
                    }
                 ]
              }
            }
            
        

Remarks

The first logical directory after /PEAssocDetail is the PE ID. After that, the next directory is the email code, followed by the address code. If all are specified, and a corresponding record exists, that record will be returned in the PEEmailDetail array of size 1 (see below). If the address code is left off the URL, then all records for that PE ID and email code will be returned in the array. If the email code and address codes are left off, then all records for that PE ID will be returned. Errors are returned as JSON objects with messages in the #text attribute, e.g.: { "#text": "No ID found in path" }