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/{document}.
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 API endpoint is used to update an existing document, identified by its name.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the document's name, following the format: \u003ccode\u003eprojects/{projectNumber}/locations/{location}/documents/{documentId}\u003c/code\u003e or \u003ccode\u003eprojects/{projectNumber}/locations/{location}/documents/referenceId/{referenceId}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include the updated document, as well as optional fields for request metadata, Cloud AI Document options, and update operation settings.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful updates will return an \u003ccode\u003eUpdateDocumentResponse\u003c/code\u003e instance, providing feedback on the operation's outcome.\u003c/p\u003e\n"],["\u003cp\u003eUpdating a document necessitates the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003econtentwarehouse.documents.update\u003c/code\u003e on the target resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.documents.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)."]]