> For the complete documentation index, see [llms.txt](https://docs.mindee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindee.com/v1/integration/java-ocr-sdk/java-field.md).

# Java Library: Output Fields

## Java Library: Output Fields

## Field Objects

Each `Field` contains attributes representing the data that is returned from the API. The exact data structure depends on the type of the field. Most `Field` classes have an attribute named `value`. The data type of the `value` attribute varies between field types.

All Field classes contain some common data types

* `confidence` (Double): The confidence score of the field prediction.
* `polygon` (`Polygon` containing a `List<Point>`): Contains the relative vertices coordinates (points) of a polygon containing the field in the image.
* `reconstructed` (Boolean): True if the field was reconstructed or computed using other fields.
* `rawValue` (String): A string representing the field that was returned.
* `boundingBox` (`Polygon` containing a `List<Point>`): Represents the [bounding box](https://en.wikipedia.org/wiki/Minimum_bounding_box) containing the field in the image

The library uses the following classes to represents common field types

* [Amount](#amount)
* [Date](#date)
* [Field](#field)
* [Locale](#locale)
* [Orientation](#orientation)
* [PaymentDetails](#payment-details)
* [Tax](#tax)
* [Time](#time)

#### Amount

Used to represent sum totals, monetary value etc. The `value` attribute is of type `java.lang.Double`

#### Date

The `value` attribute is of type `java.Time.LocalDate`

#### Field

Used to represent text fields and fields whose value is captured as `String`. This type also has a map attribute `extraFields` that represents any additional fields returned from the api.

* The `value` attribute is of type `java.lang.String`\\
* The `extraFields` is a map of type `Map<String,String>`

#### Locale

The `value` attribute is of type `java.util.Locale`\
This class also contains additional attributes containing String representations of the available locale information returned by the API.

* `language` of type `java.lang.String` - Language code in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format as seen on the document. The following language codes are supported: `ca`, `de`, `en`, `es`, `fr`, `it`, `nl` and `pt`.
* `country` of type `java.lang.String` - Currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format as seen on the document. The following country codes are supported: `CAD`, `CHF`, `GBP`, `EUR`, `USD`.
* `currency` of type `java.lang.String` - Country code in [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) alpha-2 format as seen on the document. The following country codes are supported: `CA`, `CH`, `DE`, `ES`, `FR,` `GB`, `IT`, `NL`, `PT` and `US`.

#### Orientation

The orientation field is only available at the page level as it describes whether the page image should be rotated to be upright.

If the page requires rotation for correct display, the orientation field gives a prediction among these 3 possible outputs:

* 0 degrees: the page is already upright
* 90 degrees: the page must be rotated clockwise to be upright
* 270 degrees: the page must be rotated counterclockwise to be upright

The `value` attribute of type `java.lang.Integer` is set to one of 0, 90, or 270

#### Payment Details

This field type captures information related to the payment details for vendors

* `iban` of type `java.lang.String`
* `swift` of type `java.lang.String`
* `routingNumber` of type `java.lang.String`
* `accountNumber` of type `java.lang.String`

#### Tax

This field type captures tax information

* `value` of type `java.lang.Double` represents the tax amount.
* `code` of type `java.lang.String` represents The tax code (HST, GST, City Tax, State tax for US, etc..).
* `rate` of type `java.lang.Double` represents the tax rate.

#### Time

The `value` attribute is of type `java.time.LocalTime`

##


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mindee.com/v1/integration/java-ocr-sdk/java-field.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
