SAP Knowledge Base Article - Public

3031890 - When creating a new Job Application via OData API the error "Candidate upsert failed: fieldName invalid" is returned - Recruiting Management


When creating a new Job Application via API, the system is returning an error specifically for a picklist field saying the value is invalid:
"message": "Candidate upsert failed: fieldName invalid, with the index 0"


SAP SuccessFactors Recruiting Management

Reproducing the Issue

  1. Create a new Job Application for a candidate via OData API;
  2. Error is returned saying the field is invalid with the index 0.


The field appointed as invalid on the upsert by the API response, is a field that is not present on the currently in use JobApplication Template for the Job Requisition.


  1. Let's JobApplication_Template_1 has the picklist field "timeAllocation";
  2. Now JobApplication_Template_2 does not have this field on the template definition;
  3. If you attempt to create a new Application for a candidate, in a Job Requisition using JobApplication_Template_2, and added the field "timeAllocation" into your payload, even if with a valid value, the system would return the following error message: "Candidate upsert failed: timeAllocation invalid, with the index 0"


To avoid facing this error, there are two possible options:

  1. In case you are not creating Application via OData API into all Job Requisitions, an option could be to only use one template for the requisitions where the integration would be use. This way you would have a specific template, with always the same set of fields, and would avoid running into this error;
  2. Another option is to adapt the Integration that is running, to either remove this field from the payload, or make sure that before upserting the application, read from the Job Requisition which templates are being used, to make sure the field exist, and in case the field is not part of the template, remove it from the payload as well.

Those are not the definitive solutions for this error, some other options can be suggested as well by your Implementation Partner, or even by the Third Party company that is executing the integration.


invalid, with, index,0, job application, candidate, upsert, odata, api, error , KBA , LOD-SF-RCM-API , Webservices & APIs , Problem


SAP SuccessFactors Recruiting all versions