Symptom
How to do Odata API Update / Upsert using SFOdata.OnboardingCandidateInfo, OnboardingCandidateInfo
Environment
SAP Successfactors HCM Suite
Resolution
There are 2 ways to trigger an update on an MDF entity via Odata.
1. One is the Post with X-HTTP-Method: MERGE naming the key in the Url and in the body + the fields(that should be updated).
2. Via /upsert without the X-HTTP-Method in the header.
example 1)
url: https://<localhost:8080>/odata/v2/OnboardingCandidateInfo(applicantId=XXX)
body:
{
"__metadata":
{ "uri":"OnboardingCandidateInfo(applicantId='XXX')",
"type" : "SFOData.OnboardingCandidateInfo"
},
"readyToHire":true
}
example 2)
url: http://localhost:8080/odata/v2/upsert
body:
{
"__metadata":
{ "uri":"OnboardingCandidateInfo(applicantId='XXX')",
"type" : "SFOData.OnboardingCandidateInfo"
},
"readyToHire":true
}
Note : The upsert is more generic and can be used in this manner for all MDF entities. applicantId is the external code of the OnboardingCandidateInfo. So, in case another MDF entity is called, the external code of that entity must be used instead.
See Also
- '<localhost:8080>' denotes the API endpoint which is dependent on the location of your API instance / Company Instance refer to 2215682 - Successfactors API URLs for different Data Centers
- For more info See SAP SuccessFactors HCM Suite OData API: Reference Guide
Keywords
- SFOdata.OnboardingCandidateInfo, OnboardingCandidateInfo
- COE_MISSING_REQUIRED_PROPERTIES</code><message lang="en-US">[COE0027]Required property managerIdNav is missing</message></error>
- COE_PROPERTY_NOT_EDITABLE</code><message lang="en-US">[COE0030]Property managerId is not insertable</message></error>
- upsert OnboardingCandidateInfo