We can list shared folders in Drive with their respective ID:
root@NAS-BACKUP:~# synowebapi --exec api=SYNO.SynologyDrive.TeamFolders method=list version=1 | jq '.data.items[] | "ID: \(.file_id) / Name: \(.name)"'
"ID: 795719640889204739 / Name: photo"
"ID: 781590850416189441 / Name: Share update"
"ID: 766719452698944079 / Name: Test Andrea 2"
Then, we can run a recycle bin deletion of only a specified team folder: