2023 Nov 20 10:47 PM
Hi all.
We are trying to use the administrator account to take out leave for an employee by calling the Time off api, but the status of the request is directly in the auto-approved status, and we want the request to be approved by the employee's supervisor, so how should we do?
The following is the request message:
curl --location
'https://api15.sapsf.cn/odata/v2/EmployeeTime?%24format=JSON' <br>--header 'Authorization: Basic xxxxxxxxxx'<br>--header 'Content-Type: application/json' <br>--data '{ "__metadata" : {
"uri" : "<a href="https://api15.sapsf.cn/odata/v2/EmployeeTime">https://api15.sapsf.cn/odata/v2/EmployeeTime</a>",
"type": "SFOData.EmployeeTime"}, "startDate":
"/Date(1687482000000)/", "endDate": "/Date(1687514400000)/",
"externalCode": "systemcode_1", "userIdNav": {
"__metadata": { "uri": "<a href="https://api15.sapsf.cn/odata/v2/User%28'/''user111'/''%29">https://api15.sapsf.cn/odata/v2/User('\''user111'\'')</a>",<br>"type": "SFOData.User" }}, "timeTypeNav": {
"__metadata": { "uri": "<a href="https://api15.sapsf.cn/odata/v2/TimeType%28'/''2000'/''%29">https://api15.sapsf.cn/odata/v2/TimeType('\''2000'\'')</a>",
"type": "SFOData.TimeType" } } }'
2024 Jan 08 12:51 PM
You are creating employee time entry directly, which is approved only. Based on my understanding there is no option to create time off entry with approval as of now.