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 aList<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 aList<Point>
): Represents the bounding box containing the field in the image
The library uses the following classes to represents common field types
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 typejava.lang.String
\ - The
extraFields
is a map of typeMap<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 typejava.lang.String
- Language code in ISO 639-1 format as seen on the document.
The following language codes are supported:ca
,de
,en
,es
,fr
,it
,nl
andpt
.country
of typejava.lang.String
- Currency code in ISO 4217 format as seen on the document.
The following country codes are supported:CAD
,CHF
,GBP
,EUR
,USD
.currency
of typejava.lang.String
- Country code in 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
andUS
.
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 typejava.lang.String
swift
of typejava.lang.String
routingNumber
of typejava.lang.String
accountNumber
of typejava.lang.String
Tax
This field type captures tax information
value
of typejava.lang.Double
represents the tax amount.code
of typejava.lang.String
represents The tax code (HST, GST, City Tax, State tax for US, etc..).rate
of typejava.lang.Double
represents the tax rate.
Time
The value
attribute is of type java.time.LocalTime
Questions?
Updated 5 months ago