Class SplitServices

java.lang.Object
veryfi.NetworkClient
veryfi.services.SplitServices

public class SplitServices extends NetworkClient
API services for PDF Split Processing
  • Constructor Details

    • SplitServices

      protected SplitServices(Credentials credentials, int apiVersion)
      Creates an instance of SplitServices.
      Parameters:
      credentials - the Credentials provided by Veryfi.
      apiVersion - the int api version to use Veryfi.
    • SplitServices

      protected SplitServices(Credentials credentials, int apiVersion, HttpClient httpClient)
      Creates an instance of SplitServices.
      Parameters:
      credentials - the Credentials provided by Veryfi.
      apiVersion - the int api version to use Veryfi.
      httpClient - HttpClient for the Veryfi API
  • Method Details

    • splitDocument

      protected String splitDocument(String filePath, org.json.JSONObject parameters)
      Split document PDF from url and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/split-and-process-a-pdf/
      Parameters:
      filePath - Path on disk to a file to submit for data extraction.
      parameters - Additional request parameters.
      Returns:
      the data extracted from the document String
    • splitDocumentAsync

      protected CompletableFuture<String> splitDocumentAsync(String filePath, org.json.JSONObject parameters)
      Split document PDF from url and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/split-and-process-a-pdf/
      Parameters:
      filePath - Path on disk to a file to submit for data extraction.
      parameters - Additional request parameters.
      Returns:
      the data extracted from the document CompletableFuture<String>
    • splitDocument

      protected String splitDocument(String fileName, String fileData, org.json.JSONObject parameters)
      Split document PDF from url and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/split-and-process-a-pdf/
      Parameters:
      fileName - Name of the file to upload to the Veryfi API
      fileData - Base64 encoded file data
      parameters - Additional request parameters.
      Returns:
      the data extracted from the document String
    • splitDocumentAsync

      protected CompletableFuture<String> splitDocumentAsync(String fileName, String fileData, org.json.JSONObject parameters)
      Split document PDF from url and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/split-and-process-a-pdf/
      Parameters:
      fileName - Name of the file to upload to the Veryfi API
      fileData - Base64 encoded file data
      parameters - Additional request parameters.
      Returns:
      the data extracted from the document CompletableFuture<String>
    • splitDocumentUrl

      protected String splitDocumentUrl(String fileUrl, List<String> fileUrls, org.json.JSONObject parameters)
      Split document PDF from url and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/split-and-process-a-pdf/
      Parameters:
      fileUrl - Required if file_urls isn't specified. Publicly accessible URL to a file, e.g. "https://cdn.example.com/receipt.jpg".
      fileUrls - Required if file_url isn't specifies. List of publicly accessible URLs to multiple files, e.g. ["https://cdn.example.com/receipt1.jpg", "https://cdn.example.com/receipt2.jpg"]
      parameters - Additional request parameters.
      Returns:
      the data extracted from the document String
    • splitDocumentUrlAsync

      protected CompletableFuture<String> splitDocumentUrlAsync(String fileUrl, List<String> fileUrls, org.json.JSONObject parameters)
      Split document PDF from url and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/split-and-process-a-pdf/
      Parameters:
      fileUrl - Required if file_urls isn't specified. Publicly accessible URL to a file, e.g. "https://cdn.example.com/receipt.jpg".
      fileUrls - Required if file_url isn't specifies. List of publicly accessible URLs to multiple files, e.g. ["https://cdn.example.com/receipt1.jpg", "https://cdn.example.com/receipt2.jpg"]
      parameters - Additional request parameters.
      Returns:
      the data extracted from the document CompletableFuture<String>
    • getSplitDocuments

      protected String getSplitDocuments(int page, int pageSize, boolean boundingBoxes, boolean confidenceDetails, org.json.JSONObject parameters)
      Veryfi's Get a Submitted PDF endpoint allows you to retrieve a collection of previously processed documents. https://docs.veryfi.com/api/receipts-invoices/get-submitted-pdf/
      Parameters:
      page - The page number. The response is capped to maximum of 50 results per page.
      pageSize - The number of Documents per page.
      boundingBoxes - A field used to determine whether or not to return bounding_box and bounding_region for extracted fields in the Document response.
      confidenceDetails - A field used to determine whether or not to return the score and ocr_score fields in the Document response.
      parameters - Additional request parameters.
      Returns:
      JSON object of previously processed documents String
    • getSplitDocumentsAsync

      protected CompletableFuture<String> getSplitDocumentsAsync(int page, int pageSize, boolean boundingBoxes, boolean confidenceDetails, org.json.JSONObject parameters)
      Veryfi's Get a Submitted PDF endpoint allows you to retrieve a collection of previously processed documents. https://docs.veryfi.com/api/receipts-invoices/get-submitted-pdf/
      Parameters:
      page - The page number. The response is capped to maximum of 50 results per page.
      pageSize - The number of Documents per page.
      boundingBoxes - A field used to determine whether or not to return bounding_box and bounding_region for extracted fields in the Document response.
      confidenceDetails - A field used to determine whether or not to return the score and ocr_score fields in the Document response.
      parameters - Additional request parameters.
      Returns:
      JSON object of previously processed documents String
    • getSplitDocument

      protected String getSplitDocument(String documentId)
      Veryfi's Get a Documents from PDF endpoint allows you to retrieve a collection of previously processed documents. https://docs.veryfi.com/api/receipts-invoices/get-documents-from-pdf/
      Parameters:
      documentId - ID of the document you'd like to retrieve.
      Returns:
      the data extracted from the document String
    • getSplitDocumentAsync

      protected CompletableFuture<String> getSplitDocumentAsync(String documentId)
      Veryfi's Get a Documents from PDF endpoint allows you to retrieve a collection of previously processed documents. https://docs.veryfi.com/api/receipts-invoices/get-documents-from-pdf/
      Parameters:
      documentId - ID of the document you'd like to retrieve.
      Returns:
      the data extracted from the document CompletableFuture<String>