Skip to main content

Classify a document

POST 

/api/v8/partner/classify

Veryfi's Classify a document endpoint allows you to classify a document.

Request

Body

    package_path string

    Possible values: non-empty

    A path to a file in an S3 bucket, e.g. 'some/receipt.jpg

    bucket string

    Possible values: non-empty

    An S3 bucket for 'package_path', e.g. 'documents'.

    file_data string

    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.

    file_url string

    Possible values: non-empty

    A URL to a publicly accessible document to be sent to Veryfi for processing.

    file_urls string[]

    Possible values: non-empty

    An array of URLs to publicly accessible documents to be sent to Veryfi for processing.

    file_name string

    Possible values: non-empty

    An optional filename. Useful to determine file type.

    external_id string

    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.

    file binary

    A binary file. Submitting zipped documents through this parameter is the fastest way to process any document.

Responses

Returns the document type prediction result.

Schema
    document_type objectrequired
    score number

    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.

    value stringrequired

    Possible values: [other, receipt, invoice, purchase_order, w9, statement, check, contract, w8, remittance_advice, bank_statement, w2, packing_slip, credit_note]

Loading...