Required. The name of the document to update. Format: projects/{projectNumber}/locations/{location}/documents/{documentId} or projects/{projectNumber}/locations/{location}/documents/referenceId/{referenceId}. It takes the form projects/{project}/locations/{location}/documents/referenceId/{referenceid}.
Request body
The request body contains data with the following structure:
Request Option for processing Cloud AI Document in Document Warehouse. This field offers limited support for mapping entities from Cloud AI Document to Warehouse Document. Please consult with product team before using this field and other available options.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-08 UTC."],[[["\u003cp\u003eThis endpoint updates an existing document specified by its \u003ccode\u003ename\u003c/code\u003e, which must match the document's existing name or be empty to avoid an \u003ccode\u003eINVALID_ARGUMENT\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eThe request is made via an HTTP \u003ccode\u003ePATCH\u003c/code\u003e method to a URL that includes the document's project number, location, and document ID or reference ID.\u003c/p\u003e\n"],["\u003cp\u003eThe request body includes the updated \u003ccode\u003edocument\u003c/code\u003e, \u003ccode\u003erequestMetadata\u003c/code\u003e, \u003ccode\u003ecloudAiDocumentOption\u003c/code\u003e, and \u003ccode\u003eupdateOptions\u003c/code\u003e objects, defining the changes and related information.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful updates return an \u003ccode\u003eUpdateDocumentResponse\u003c/code\u003e, while authorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope and the \u003ccode\u003econtentwarehouse.documents.update\u003c/code\u003e IAM permission.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.documents.referenceId.patch\n\nUpdates a document. Returns INVALID_ARGUMENT if the name of the document is non-empty and does not equal the existing name.\n\n### HTTP request\n\n`PATCH https://contentwarehouse.googleapis.com/v1/{name}`\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [UpdateDocumentResponse](/document-warehouse/docs/reference/rest/v1/UpdateDocumentResponse).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `contentwarehouse.documents.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]