Client

Client

new Client(client_id, client_secret, username, api_key, base_url, api_version, timeout)

Create instance of a Client
Parameters:
Name Type Default Description
client_id string Your Veryfi client id
client_secret string Your Veryfi client secret
username string Your Veryfi username
api_key string Your Veryfi API key
base_url string https://api.veryfi.com/api/
api_version string v7
timeout Number 120
Source:

Methods

delete_document(document_id)

Delete document from Veryfi
Parameters:
Name Type Description
document_id Number ID of the document you'd like to delete
Source:

get_document(document_id) → {JSON}

Retrieve document by ID
Parameters:
Name Type Description
document_id Number ID of the document you'd like to retrieve
Source:

get_documents() → {JSON}

Get JSON of documents
Source:

process_document(file_path, categories, delete_after_processing, kwargs) → {JSON}

Process a document and extract all the fields from it
Parameters:
Name Type Description
file_path String Path on disk to a file to submit for data extraction
categories Array List of categories Veryfi can use to categorize the document
delete_after_processing Boolean Delete this document from Veryfi after data has been extracted
kwargs Object Additional request parameters
Source:
Example
veryfi_client.process_document('file/path',
                               ['Entertainment','Food'], 
                               true, 
                               {"extra":"parameters"})

process_document_url(file_url, file_urls, categories, delete_after_processing, max_pages_to_process, boost_mode, external_id, kwargs) → {JSON}

Process document from url and extract all the fields from it.
Parameters:
Name Type Description
file_url string Required if file_urls isn't specified. Publicly accessible URL to a file, e.g. "https://cdn.example.com/receipt.jpg".
file_urls Array Required if file_url isn't specified. List of publicly accessible URLs to multiple files, e.g. ["https://cdn.example.com/receipt1.jpg", "https://cdn.example.com/receipt2.jpg"]
categories Array List of categories to use when categorizing the document
delete_after_processing boolean Delete this document from Veryfi after data has been extracted
max_pages_to_process int When sending a long document to Veryfi for processing, this parameter controls how many pages of the document will be read and processed, starting from page 1.
boost_mode int Flag that tells Veryfi whether boost mode should be enabled. When set to 1, Veryfi will skip data enrichment steps, but will process the document faster. Default value for this flag is 0
external_id string Optional custom document identifier. Use this if you would like to assign your own ID to documents
kwargs Object Additional request parameters
Source:

update_document(document_id, kwargs) → {JSON}

Update data for a previously processed document, including almost any field like `vendor`, `date`, `notes` and etc.
Parameters:
Name Type Description
document_id Number ID of the document you'd like to update
kwargs Object fields to update
Source:
Example
veryfi_client.update_document(id, {date:"2021-01-01 12:00:00", notes:"look what I did"})