Before You Begin
This 20-minute tutorial shows you how to create, modify, and delete a worker's person information.
Add a Singular Resource to a Collection
Create a Singular Resource
Add a request to ##_WorkersCollection.
- Give the request the name Add National Identifier.
- Click Save to ##_WorkersCollection.
- Specify the method as POST.
Enter the url for the nationalIdentifiers collection or {{NID_href}} if you set global variables:
{{url}}/hcmRestApi/resources/11.13.18.05/workers/{id}/child/nationalIdentifiersGive the request the following headers:
Key Value REST-Framework-Version 4 Content-Type application/vnd.oracle.adf.resourceitem+json Add the request body. None is selected by default, raw must be used to add content.
Request Body:
{ "LegislationCode": "US", "NationalIdentifierType": "SSN", "NationalIdentifierNumber": "###-##-1234", "PrimaryFlag":true }Click Send.
- Click Save.
Create a Date Effective Singular Resource
Add a request to ##_WorkersCollection.
- Give the request the name Add Address.
- Click Save to ##_WorkersCollection.
- Specify the method as POST.
Enter the url for the addresses collection or {{Addresses_href}} if you set global variables:
{{url}}/hcmRestApi/resources/11.13.18.05/workers/{id}/child/addressesGive the request the following headers:
Key Value REST-Framework-Version 4 Content-Type application/vnd.oracle.adf.resourceitem+json effective-Of RangeStartDate={{4DaysAhead}} Add the request body. None is selected by default, raw must be used to add content.
Request Body:
{ "AddressType":"MAIL", "AddressLine1":"100 Bell Drive", "TownOrCity":"FREMONT", "Region1":"Alameda", "Region2":"CA", "Region3":"Bay Area", "PostalCode":"94539", "Country":"US", "PrimaryFlag":false }Click Send.
- Click Save.
Update a Singular Resource
Update a Singular Resource
Add a request to ##_WorkersCollection.
- Give the request the name Update Phone Number.
- Click Save to ##_WorkersCollection.
- Specify the method as PATCH.
Enter the url for the phones tiem or {{Phone_href}} if you set global variables:
{{url}}/hcmRestApi/resources/11.13.18.05/workers/{id}/child/phones/{id}Give the request the following headers:
Key Value REST-Framework-Version 4 Content-Type application/vnd.oracle.adf.resourceitem+json Add the request body. None is selected by default, raw must be used to add content.
Request Body:
{ "PhoneNumber":"4449876" }Click Send.
- Click Save.
Update a Date Effective Singular Resource
When updating a date effective resource, you must specify a RangeStartDate that is different than the effective date of the resource.
Add a request to ##_WorkersCollection.
- Give the request the name Update Address.
- Click Save to ##_WorkersCollection.
- Specify the method as PATCH.
Enter the url for the addresses collection or {{Address_href}} if you set global variables:
{{url}}/hcmRestApi/resources/11.13.18.05/workers/{id}/child/addresses/{id}Give the request the following headers:
Key Value REST-Framework-Version 4 Content-Type application/vnd.oracle.adf.resourceitem+json effective-Of RangeMode=UPDATE;RangeStartDate={{5DaysAhead}};RangeEndDate=4712-12-31 Add the request body. None is selected by default, raw must be used to add content.
Request Body:
{ "AddressLine1":"10023 Bell Drive", "AddressLine2":"APT 506" }Click Send.
- Click Save.
Correct a Date Effective Singular Resource
Add a request to ##_WorkersCollection.
- Give the request the name Correct Address.
- Click Save to ##_WorkersCollection.
- Specify the method as PATCH.
Enter the url for the addresses collection or {{Address_href}} if you set global variables:
{{url}}/hcmRestApi/resources/11.13.18.05/workers/{id}/child/addresses/{id}Give the request the following headers:
Key Value REST-Framework-Version 4 Content-Type application/vnd.oracle.adf.resourceitem+json effective-Of RangeMode=UPDATE;RangeStartDate={{5DaysAhead}};RangeEndDate=4712-12-31 Add the request body. None is selected by default, raw must be used to add content.
Request Body:
{ "AddressLine1":"10023 Bell Drive", "AddressLine2":"APT 506" }Click Send.
- Click Save.
Delete a Singular Resource
Add a request to ##_WorkersCollection.
- Give the request the name Delete Email Address.
- Click Save to ##_WorkersCollection.
- Specify the method as Delete.
Enter the url for the email item or {{extra_email_href}} if you set global variables:
{{url}}/hcmRestApi/resources/11.13.18.05/workers/{id}/child/emails/{id}Click Send.
The request should produce a 204 No Results response. You can re-run your get worker to verify the email address has been deleted.
- Click Save.
Next Tutorial
Managing a Workers Employment Information Using Workers REST API
Get Started with Workers REST API - Manage Worker's Person Information