sharepoint graph api patch with nested json

%3CLINGO-SUB%20id%3D%22lingo-sub-2094110%22%20slang%3D%22en-US%22%3Esharepoint%20graph%20api%20patch%20with%20nested%20json%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2094110%22%20slang%3D%22en-US%22%3E%3CP%3Eo%20update%20a%20'simple'%20field%20item%20in%20sharepoint%20we%20can%20patch%20using%20the%20graph%20api%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fsites%2F%257Bsite-id%257D%2Flists%2F%257Blist-id%257D%2Fitems%2F%257Bitem-id%257D%2Ffields%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fsites%2F%7Bsite-id%7D%2Flists%2F%7Blist-id%7D%2Fitems%2F%7Bitem-id%7D%2Ffields%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eusing%3C%2FP%3E%3CP%3E%7B%20%22td_documentLookupId%22%3A%2222%22%20%7D%3C%2FP%3E%3CP%3EBut%20how%20to%20perform%20an%20update%20if%20the%20required%20structure%20is%20a%20nested%20json%60enter%20code%20here%3A%3C%2FP%3E%3CPRE%3E%7B%20%20%20%20%20%20%20%20%20%0A%20%20%20%22td_documentLookupId%22%3A%2222%22%2C%0A%20%20%20%22td_object%22%3A%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22LookupId%22%3A7%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22LookupValue%22%3A%22title%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%7D%3C%2FPRE%3E%3CP%3EThis%20returns%20an%20invalid%20request.%20Any%20help%20is%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

o update a 'simple' field item in sharepoint we can patch using the graph api: https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/fields using

{ "td_documentLookupId":"22" }

But how to perform an update if the required structure is a nested json`enter code here:

{         
   "td_documentLookupId":"22",
   "td_object":{
                "LookupId":7,
                "LookupValue":"title"
                }
}

This returns an invalid request. Any help is appreciated!

0 Replies