Skip to Content
0

SuccessFactors OData API : Update single attribute with OData MERGE

Aug 24, 2017 at 09:44 AM

272

avatar image
Former Member

Hello,

I need to update a single attribute of the User Object. As descripted in https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/PRODUCTION/en-US/4332a5cdc9764af6ad04e76d0608aba8.html

URL : https://apisalesdemo2.successfactors.eu/odata/v2/User('101007')

Method : MERGE

Message body :

{

"email" : "test@test.com"

}

I use the "Advanced REST client" within Google Chrome to create the request.

The response is just :

<?xml version="1.0" encoding="utf-8" ?> <error><code>ServerErrorException

</code>

<messagelang="en-US"/>

</error>

Any one an idea ? Regards Gerald
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Aug 24, 2017 at 10:52 AM
0

Thanks to Bhargav Gogineni :


https://api8.successfactors.com:443/odata/v2/upsert?$format=json&purgeType=incremental

User:
{
"__metadata": {
"uri": "User(userId='80005598')"
},
"userId": "80005598",

"email": "email@email.com",
"hr": {
"__metadata": {
"uri": "User(userId='NO_HR')"
}
}
}

Share
10 |10000 characters needed characters left characters exceeded