tabscanner/phpsdk

Installs: 1 116

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 1

Open Issues: 0

Type:package

v1.0.4 2019-04-29 10:07 UTC

This package is auto-updated.

Last update: 2024-09-29 05:21:08 UTC


README

N|Solid

The world’s most advanced receipt scanning API technology.

The perfect OCR receipt scanning API for developers, utilizing state-of-the-art receipt optical character recognition. Technology designed from the ground up for receipt recognition and data extraction.

Tab Scanner is the world's first truly accurate check and receipt scanning technology. It utilises a highly crafted OCR system with state-of-the-art AI to ensure robust and reliable data extraction at lightning speeds.

  • Highly accurate data extraction
  • Sub-second processing speeds
  • Cross-platform API support
  • Easily integrates with your software
  • Flexible pricing plans

About this SDK

This is an official PHP development kit for Tab Scanner API. For more information about Tab Scanner API please visit https://www.tabscanner.com

Installation

The recommended way to install Tab Scanner PHP SDK is through Composer.

$ composer require tabscanner/phpsdk:1.0.2

Basic Usage

Visit Tab Scanner Admin for your API key

Note: The upload API can accept one of the following parameter:

  • array - single HTTP File Upload variable ($_FILES) (for array of files see upload_multiple method)
  • string - file path (used for fopen function)
  • object - a Laravel request file object https://laravel.com/docs/5.6/requests#files
use Tabscanner\Api;

$api = new Api('ApiKeyHere');

/**
 * Upload receipt to AI server to be processed
 *
 * @param $file array|string|object
 * array - single HTTP File Upload variable ($_FILES) (for array of files see upload_multiple method)
 * string - file path (used for fopen function)
 * object - a Laravel request file object (https://laravel.com/docs/5.6/requests#files)
 * 
 * @return array
 */
$file = 'receipt.jpg'; //direct grab from directory
$file2 = $_FILES['receipt']; //from upload form

$upload_response = $api->upload($file); //or $file2

//receipt token is generated from API after successful upload, else will receive error
$receipt_token = $upload_response['token'];

/**
 * Get result
 *
 * @param $token string
 * @return array - receipt data
 * - will receive status as pending or done
 * - one way to use this method is to create a loop until you get a "status done" response
 */
$result_response = $api->result($receipt_token);

Upcoming Methods

upload_multiple() //accepts multi-dimensional $_FILES