Method: humanReviewConfig.reviewDocument

Stay organized with collections Save and categorize content based on your preferences.

Full name: projects.locations.processors.humanReviewConfig.reviewDocument

Send a document for Human Review. The input document should be processed by the specified processor.

HTTP request

POST https://{endpoint}/v1beta3/{humanReviewConfig}:reviewDocument

Where {endpoint} is one of the supported service endpoints.

Path parameters

Parameters
humanReviewConfig

string

Required. The resource name of the HumanReviewConfig that the document will be reviewed with. It takes the form projects/{project}/locations/{location}/processors/{processor}/humanReviewConfig.

Authorization requires the following IAM permission on the specified resource humanReviewConfig:

  • documentai.humanReviewConfigs.review

Request body

The request body contains data with the following structure:

JSON representation
{
  "document": {
    object (Document)
  },
  "enableSchemaValidation": boolean,
  "priority": enum (Priority),
  "documentSchema": {
    object (DocumentSchema)
  },
  "inlineDocument": {
    object (Document)
  }
}
Fields
document
(deprecated)

object (Document)

The document that needs human review.

enableSchemaValidation

boolean

Whether the validation should be performed on the ad-hoc review request.

priority

enum (Priority)

The priority of the human review task.

documentSchema

object (DocumentSchema)

The document schema of the human review task.

inlineDocument

object (Document)

An inline document proto.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the humanReviewConfig resource:

  • documentai.humanReviewConfigs.review

For more information, see the IAM documentation.

Priority

The priority level of the human review task.

Enums
DEFAULT The default priority level.
URGENT The urgent priority level. The labeling manager should allocate labeler resource to the urgent task queue to respect this priority level.

DocumentSchema

The schema defines the output of the processed document by a processor.

JSON representation
{
  "displayName": string,
  "description": string,
  "entityTypes": [
    {
      object (EntityType)
    }
  ],
  "metadata": {
    object (Metadata)
  }
}
Fields
displayName

string

Display name to show to users.

description

string

Description of the schema.

entityTypes[]

object (EntityType)

Entity types of the schema.

metadata

object (Metadata)

Metadata of the schema.

EntityType

EntityType is the wrapper of a label of the corresponding model with detailed attributes and limitations for entity-based processors. Multiple types can also compose a dependency tree to represent nested types.

JSON representation
{
  "displayName": string,
  "name": string,
  "baseTypes": [
    string
  ],
  "properties": [
    {
      object (Property)
    }
  ],
  "entityTypeMetadata": {
    object (EntityTypeMetadata)
  },
  "enumValues": {
    object (EnumValues)
  }
}
Fields
displayName

string

User defined name for the type.

name

string

Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - use snake_casing - name matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters [a-z0-9_-]. (For backward compatibility internal infrastructure and tooling can handle any ascii character) - The '/' is sometimes used to denote a property of a type. For example line_item/amount. This convention is deprecated, but will still be honored for backward compatibility.

baseTypes[]

string

The entity type that this type is derived from. For now, one and only one should be set.

properties[]

object (Property)

Describing the nested structure, or composition of an entity.

entityTypeMetadata

object (EntityTypeMetadata)

Metadata for the entity type.

enumValues

object (EnumValues)

If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is >10 or could change frequently use the EntityType.value_ontology field and specify a list of all possible values in a value ontology file.

EnumValues

Defines the a list of enum values.

JSON representation
{
  "values": [
    string
  ]
}
Fields
values[]

string

The individual values that this enum values type can include.

Property

Defines properties that can be part of the entity type.

JSON representation
{
  "name": string,
  "valueType": string,
  "occurrenceType": enum (OccurrenceType),
  "propertyMetadata": {
    object (PropertyMetadata)
  }
}
Fields
name

string

The name of the property. Follows the same guidelines as the EntityType name.

valueType

string

A reference to the value type of the property. This type is subject to the same conventions as the Entity.base_types field.

occurrenceType

enum (OccurrenceType)

Occurrence type limits the number of instances an entity type appears in the document.

propertyMetadata

object (PropertyMetadata)

Any additional metadata about the property can be added here.

OccurrenceType

Types of occurrences of the entity type in the document. Note: this represents the number of instances of an entity types, not number of mentions of a given entity instance.

Enums
OCCURRENCE_TYPE_UNSPECIFIED Unspecified occurrence type.
OPTIONAL_ONCE There will be zero or one instance of this entity type.
OPTIONAL_MULTIPLE The entity type will appear zero or multiple times.
REQUIRED_ONCE The entity type will only appear exactly once.
REQUIRED_MULTIPLE The entity type will appear once or more times.

PropertyMetadata

Metadata about a property.

JSON representation
{
  "inactive": boolean,
  "humanReviewMetadata": {
    object (HumanReviewValidationMetadata)
  },
  "humanReviewLabelingMetadata": {
    object (HumanReviewLabelingMetadata)
  }
}
Fields
inactive

boolean

Whether the property should be considered as "inactive".

humanReviewMetadata

object (HumanReviewValidationMetadata)

Human review validation config on the property.

humanReviewLabelingMetadata

object (HumanReviewLabelingMetadata)

Human review labeling config on the property.

HumanReviewValidationMetadata

Metadata for Human Review config.

JSON representation
{
  "enableValidation": boolean,
  "confidenceThreshold": number
}
Fields
enableValidation

boolean

Whether to enable human review validation.

confidenceThreshold

number

The confidence threshold if human review validation is enabled.

HumanReviewLabelingMetadata

Metadata for human review labeling config.

JSON representation
{
  "enableNormalizationEditing": boolean
}
Fields
enableNormalizationEditing

boolean

Whether to enable normalization editing.

EntityTypeMetadata

Metadata about an entity type.

JSON representation
{
  "inactive": boolean,
  "humanReviewMetadata": {
    object (HumanReviewValidationMetadata)
  },
  "humanReviewLabelingMetadata": {
    object (HumanReviewLabelingMetadata)
  }
}
Fields
inactive

boolean

Whether the entity type should be considered as "inactive".

humanReviewMetadata

object (HumanReviewValidationMetadata)

Human review config on the entity type.

humanReviewLabelingMetadata

object (HumanReviewLabelingMetadata)

Human review labeling config on the property.

Metadata

Metadata for global schema behavior.

JSON representation
{
  "documentSplitter": boolean,
  "documentAllowMultipleLabels": boolean,
  "prefixedNamingOnProperties": boolean,
  "skipNamingValidation": boolean
}
Fields
documentSplitter

boolean

If true, a document entity type can be applied to subdocument ( splitting). Otherwise, it can only be applied to the entire document (classification).

documentAllowMultipleLabels

boolean

If true, on a given page, there can be multiple document annotations covering it.

prefixedNamingOnProperties

boolean

If set, all the nested entities must be prefixed with the parents.

skipNamingValidation

boolean

If set, we will skip the naming format validation in the schema. So the string values in DocumentSchema.EntityType.name and DocumentSchema.EntityType.Property.name will not be checked.