SAP Knowledge Base Article - Public

3079355 - JobRequisition OData API entity picklist fields - SuccessFactors

Symptom

How do picklist fields of job requisitions appear in the JobRequisition OData API entity? How to get their information?

NOTE: Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP SuccessFactors HXM Suite
    • Recruiting OData API

Resolution

The picklist fields of a job requisition are represented as a navigation property to a PicklistOption record:

When performing queries to the JobRequisition API entity, you can access the picklist values by adding the field name to the query's $expand parameter.

Example

Let's say I want to query the following information of the job requisition record with ID 28:

  • jobReqId;
  • currency;
  • jobCode;
  • salaryBase
  • externalCode of the 'payType' picklist field

and I want to get the picklist value (externalCode) of the 'payType' field.

Request URL: https://<yourAPIURL>/odata/v2/JobRequisition('28')?$format=json&$expand=payType&$select=jobReqId,currency,jobCode,salaryBase,payType/externalCode

Response body:

{
    "d": {
        "__metadata": {
            "type": "SFOData.JobRequisition"
        },
        "jobReqId": "28",
        "salaryBase": "100000",
        "jobCode": "50070999",
        "currency": "USD",
        "payType": {
            "results": [
                {
                    "__metadata": {
                        "uri": "https://apisalesdemo4.successfactors.com:443/odata/v2/PicklistOption(8945L)",
                        "type": "SFOData.PicklistOption"
                    },
                    "externalCode": "PayType_Salaried"
                }
            ]
        }
    }
}
 
NOTE: Picklist fields will always be represented as a navigation property to a PicklistOption record in the JobRequisition entity which needs to be expanded to be accessed. It's not possible to configure it as a simple property which appears directly in the JobRequisition record.

Keywords

job, requisition, jobrequisition, api, entity, recruiting, rcm, odata, query, get, fetch, not, appear, appears, appearing, doesn't, visible, value, picklist, pick list , KBA , LOD-SF-RCM-API , Webservices & APIs , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , How To

Product

SAP SuccessFactors HXM Suite all versions ; SAP SuccessFactors Recruiting all versions