Patch (Update)
AI-generatedSummary
Patch partially updates a document in Sanity.io by applying specified patch operations to the document identified by Document ID.
Inputs
- Document ID (required) — The ID of the existing document to patch.
- Document Data (required) — A JSON object specifying the patch operations to apply to the document.
- Options.returnDocuments — Boolean to determine if the full updated document(s) should be returned in the response; defaults to true.
- Options.apiVersion — The Sanity API version to use; defaults to 'v2024-06-21'.
Output shape
a list of documents reflecting the results of the patch operation (if 'Return Documents' option is true).
Each output item corresponds to one input item. If the patch operation fails for an input and 'Continue On Fail' is enabled, the output for that item includes an error message instead of a document.