I did use the FileRef and FileLeafRef to get the item path and new item path
Using the HTTP Call below to get the root folder.
GET _api/Lists/GetByTitle('LMA_Leave_Request_Test')/RootFolder
Stored the root folder into the variable RootFolder, see code below:
body('GetRootFolder')['d']['ServerRelativeUrl'] which returned the value "/sites/apps/test/elrtest/Lists/LMA_Leave_Request_Test"
Using the HTTP Call below I got the FileRef and FileLeafRef.
_api/Lists/GetByTitle('LMA_Leave_Request_Test')/Items(items('For_each')?['ID'])?$select=*,FileRef,FileLeafRef
Stored the 'FileLeafRef' in the variable ItemFileName, see code below:
body('GetItem')['d']['FileLeafRef']
Value returned: "94943_.000"
Stored the 'FileRef' in the variable ItemUrl, see code below:
body('GetItem')['d']['FileRef']
Value returned: "/sites/apps/test/elrtest/Lists/LMA_Leave_Request_Test/94943_.000"
Stored new item location in the variable NewItemUrl, see code below:
concat(variables('RootFolder'),'/',variables('varEmpID'),'/',variables('ItemFileName'))
Value returned: "/sites/apps/test/elrtest/Lists/LMA_Leave_Request_Test/4216/94943_.000"
HTTP Call to move file:
POST _api/Web/getFileByServerRelativeURL('variables('ItemUrl')')/moveTo(newurl='variables('NewItemUrl')',flags=1)