W9 V1
Sample Code:
from mindee import Client, PredictResponse, product
# Init a new client
mindee_client = Client(api_key="my-api-key")
# Load a file from disk
input_doc = mindee_client.source_from_path("/path/to/the/file.ext")
# Load a file from disk and parse it.
# The endpoint name must be specified since it cannot be determined from the class.
result: PredictResponse = mindee_client.parse(product.us.W9V1, input_doc)
# Print a summary of the API result
print(result.document)
# Print the document-level summary
# print(result.document.inference.prediction)
- class W9V1(raw_prediction)
W9 API version 1 inference prediction.
- static get_endpoint_info(klass)
Retrives the endpoint information for an Inference.
Should never retrieve info for CustomV1, as a custom endpoint should be created to use CustomV1.
- Parameters:
klass (
Type
[Inference
]) – product subclass to access endpoint information.- Return type:
Dict
[str
,str
]
- endpoint_name: Optional[str] = 'us_w9'
Name of the endpoint.
- endpoint_version: Optional[str] = '1'
Version of the endpoint.
- is_rotation_applied: Optional[bool]
Whether the document has had any rotation applied to it.
- page_id: Optional[int]
Optional page id for page-level predictions.
-
prediction:
W9V1Document
Document-level prediction.
- product: Product
Name and version of a given product, as sent back by the API.
- class W9V1Document(raw_prediction, page_id=None)
W9 API version 1.0 document data.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- class W9V1Page(raw_prediction, page_id=None)
W9 API version 1.0 page data.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
-
address:
StringField
The street address (number, street, and apt. or suite no.) of the applicant.
-
business_name:
StringField
The business name or disregarded entity name, if different from Name.
-
city_state_zip:
StringField
The city, state, and ZIP code of the applicant.
-
ein:
StringField
The employer identification number.
-
name:
StringField
Name as shown on the applicant’s income tax return.
-
signature_date_position:
PositionField
Position of the signature date on the document.
-
signature_position:
PositionField
Position of the signature on the document.
-
ssn:
StringField
The applicant’s social security number.
-
tax_classification:
StringField
The federal tax classification, which can vary depending on the revision date.
-
tax_classification_llc:
StringField
Depending on revision year, among S, C, P or D for Limited Liability Company Classification.
-
tax_classification_other_details:
StringField
Tax Classification Other Details.
-
w9_revision_date:
StringField
The Revision month and year of the W9 form.