Skip to Content
0
Jul 08, 2016 at 06:55 AM

[SF] Odata upsert JobRequisition

259 Views

Hello All,

I'm new in Success Factor OData API, so I look at the official documentation here : http://help.sap.com/saphelpiis_cloud4hr/EN/SuccessFactors_HCM_Suite_OData_API_Reference_en.pdf

I try to do some sample for reading and all is OK. But when I want to update/upsert JobRequisition (such as page 259), I try to do the example provided :

../odata/v2/upsert {

"__metadata":{

"type":"SFOData.JobRequisition",

"uri":"JobRequisition(1234)" },

"location":"San Matao, CA",

"jobReqLocale": { "jobTitle": "bbbb", "locale": "en_GB" },

"interviewGuide":{ "module":"RECRUITING", "fileContent":"XXXXXXXXXXXAAAAA", "fileName":"Test.doc" }

}

And I get the error :

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
    <entry>
        <content type="application/xml">
            <m:properties>
                <d:key m:null="true"></d:key>
                <d:status>ERROR</d:status>
                <d:editStatus>UPSERTED</d:editStatus>
                <d:message>unknown property location for JobRequisition</d:message>
                <d:index m:type="Edm.Int32">0</d:index>
                <d:httpCode m:type="Edm.Int32">400</d:httpCode>
                <d:inlineResults m:type="Bag(SFOData.UpsertResult)"></d:inlineResults>
            </m:properties>
        </content>
    </entry>
</feed>

In fact, the metadata of the JobRequsition doesn't show me this property. So I assume that the sample is outdated. And I try some other sample for update data and it seams that many example are outated.

Is there someone with a working code ?

Kind Regards,

Joseph