I am surprised if you get it to work at all, the ListItemAllFields method returns a Read-Only copy of the ListItem (see the R/W table here). Use the values you get from here to get the Item ID and save that in your code, then use that to do your MERGE to https://mysite.sharepoint.com/teams/myTeam/_api/web/lists/getbytitle('Shared Documents')/items(<item ...
Please refer the following code snippet to create publishing page and set multi-value managed metadata based on another item:
public static string ...
The CAML Query as below.
<FieldRef Name='ManagedMetadata' /><Value Type='Text'>HFM</Value>
The following example PowerShell Script about getting file items ...