End-to-end implementation of a REST API POST method
End-to-end implementation of a REST API POST method
End-to-end implementation of a REST API POST method using PeopleCode and JSON to fetch employee
details from a third-party system and update a custom record in PeopleSoft, you will need to follow
several steps. This involves setting up a REST API integration, handling JSON data, and updating
PeopleSoft records. Below is a detailed guide:
o Click Add a New Value and enter a name for your service operation.
3. Create a Message:
4. Create a Route:
o Ensure this record has fields that match the data returned by the third-party system.
import PS_PTRESTClient:RESTClient;
import PS_PTRESTClient:RESTResponse;
&jsonPayload = CreateObject("PS_JSON:JSON");
&jsonPayload.SetValue("employeeId", &employeeId);
&jsonPayload.SetValue("doj", &doj);
/* Loop through the employee data and update the custom record */
For &i = 1 To &employeeData.GetItemCount()
&item = &employeeData.GetItem(&i);
&emplId = &item.GetValue("EMPLID");
&firstName = &item.GetValue("FIRST_NAME");
&lastName = &item.GetValue("LAST_NAME");
&email = &item.GetValue("EMAIL");