Classify a document
POST/api/v8/partner/classify
Veryfi's Classify a document endpoint allows you to classify a document.
Request
- application/json
- multipart/form-data
Body
- Array [
- MOD1
- MOD2
- ]
Possible values: non-empty
A custom identification value. Use this if you would like to assign your own ID to documents. This parameter is useful when mapping this document to a service or resource outside Veryfi.
Possible values: non-empty
A path to a file in an S3 bucket, e.g. 'some/receipt.jpg
Possible values: non-empty
An S3 bucket for 'package_path', e.g. 'documents'.
Possible values: non-empty
Used to upload a document via base64 encoded string, could be raw or data URI scheme. This is the least effective way to upload a document for processing. See file_urls
or uploading zip files.
Possible values: non-empty
A URL to a publicly accessible document to be sent to Veryfi for processing.
Possible values: non-empty
An array of URLs to publicly accessible documents to be sent to Veryfi for processing.
Possible values: non-empty
An optional filename. Useful to determine file type.
document_types object[]
Possible values: >= 1
The types to classify the document into. If omitted, a preset set of types will be used.
string
string
Body
- Array [
- MOD1
- MOD2
- ]
Possible values: non-empty
A custom identification value. Use this if you would like to assign your own ID to documents. This parameter is useful when mapping this document to a service or resource outside Veryfi.
Possible values: non-empty
A path to a file in an S3 bucket, e.g. 'some/receipt.jpg
Possible values: non-empty
An S3 bucket for 'package_path', e.g. 'documents'.
Possible values: non-empty
Used to upload a document via base64 encoded string, could be raw or data URI scheme. This is the least effective way to upload a document for processing. See file_urls
or uploading zip files.
Possible values: non-empty
A URL to a publicly accessible document to be sent to Veryfi for processing.
Possible values: non-empty
An array of URLs to publicly accessible documents to be sent to Veryfi for processing.
Possible values: non-empty
An optional filename. Useful to determine file type.
A binary file. Submitting zipped documents through this parameter is the fastest way to process any document.
document_types object[]
Possible values: >= 1
The types to classify the document into. If omitted, a preset set of types will be used.
string
string
Responses
- 200
- 400
Returns the document type prediction result.
- application/json
- Schema
- Example (from schema)
Schema
- DocumentType
- CustomDocumentType
document_type object required
The type of the document. If a list of custom types is provided, CustomDocumentType will be the model for this field.
Possible values: <= 1
The score shows how confident the model is that the predicted value
belongs to the field. See confidence scores explained for more information.
Possible values: [other
, receipt
, invoice
, purchase_order
, w9
, statement
, check
, contract
, w8
, remittance_advice
, business_card
, bank_statement
, w2
, packing_slip
, credit_note
]
The type of the document.
Possible values: <= 1
The score shows how confident the model is that the predicted value
belongs to the field. See confidence scores explained for more information.
Possible values: non-empty
The custom type of the document.
{
"document_type": {}
}
User error
- application/json
- Schema
- Example (from schema)
Schema
- FAILED_TO_PREDICT_DOCUMENT_TYPE
- FAILED_TO_PARSE_PACKAGE
- MALFORMED_PARAMETERS
Default value: fail
Default value: Failed to predict document type
Default value: fail
Default value: Failed to parse package
Default value: fail
Default value: Malformed parameters
{}