SAP Knowledge Base Article - Public

2627985 - How to : OnboardingCandidateInfo Odata API Upsert / Update - SF Odata API

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

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
, KBA , LOD-SF-OBD-API , Webservices & API's , LOD-SF-INT-ADD , Talent Hybrid AddOn Solution , How To

Product

SAP SuccessFactors HXM Suite all versions