-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabscanner Receipt OCR (Independent Publisher) #3756
base: dev
Are you sure you want to change the base?
Changes from 5 commits
401089e
9d721d0
9f3b3f3
3d3bba3
32d65ce
de00d74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,213 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Tabscanner Receipt OCR", | ||
"version": "1.0.0", | ||
"description": "The Tabscanner API provides powerful Optical Character Recognition (OCR) technology to extract structured data from images of receipts with high accuracy.\nDesigned for developers and businesses, this API simplifies the process of digitizing receipts, enabling seamless integration with financial systems, expense tracking platforms, and data analytics solutions.\n", | ||
"contact": { | ||
"name": "Ben Smith", | ||
"url": "https://github.com/tokyoben", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"host": "api3.tabscanner.com", | ||
"basePath": "/", | ||
"schemes": [ | ||
"https" | ||
], | ||
"paths": { | ||
"/api/2/processbase64": { | ||
"post": { | ||
"tags": [ | ||
"default" | ||
], | ||
"summary": "Submit a receipt for processing", | ||
"description": "Submit JSON data to the Tabscanner system.", | ||
"operationId": "Process", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"image": { | ||
"type": "string", | ||
"description": "Base64-encoded receipt image. Can accept JPG and PNG file formats.", | ||
"example": "data:image/jpeg;base64,/9j/4AAQ..." | ||
}, | ||
"region": { | ||
"type": "string", | ||
"description": "The 2-alpha ISO country code of the supported country. This will take into consideration number and date formats and language configurations among other configurations to improve the accuracy of the results. Listed below are the iso codes along with any custom fields that are available for the given region.", | ||
"example": "hk" | ||
}, | ||
"documentType": { | ||
"type": "string", | ||
"description": "Accepts a string value. Must be receipt, invoice or auto. The default is receipt. Specify the type of document to be processed. If set to auto Tabscanner will attempt to auto-detect the document type.", | ||
"example": "receipt" | ||
}, | ||
"defaultDateParsing": { | ||
"type": "string", | ||
"description": "Accepts a string value. Must be m/d or d/m. In the case of an ambiguous date eg. 02/03/2019 this parameter determines if the date is understood as day followed by month or month followed by day.", | ||
"example": "m/d" | ||
}, | ||
"decimalPlaces": { | ||
"type": "string", | ||
"description": "Accepts an integer value should be 0, 1 or 3. A hint for what to look for on the receipt. It can improve accuracy if you know the number of decimal places in advance. This is not related to number formatting.", | ||
"example": 2 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successful response", | ||
"schema": { | ||
"$ref": "#/definitions/Process" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/api/result/{token}": { | ||
"get": { | ||
"tags": [ | ||
"default" | ||
], | ||
"summary": "Retrieve the result of a receipt image submitted for processing", | ||
"description": "This operation returns the result of the processed receipt image.", | ||
"operationId": "Result", | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "token", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "Unique token to identify the processing request." | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successful response", | ||
"schema": { | ||
"$ref": "#/definitions/Result" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"Process": { | ||
"type": "object", | ||
"properties": { | ||
"message": { | ||
"type": "string", | ||
"example": "SUCCESS: Image uploaded successfully" | ||
}, | ||
"status": { | ||
"type": "string", | ||
"example": "success" | ||
}, | ||
"status_code": { | ||
"type": "integer", | ||
"format": "int32", | ||
"example": 2 | ||
}, | ||
"token": { | ||
"type": "string", | ||
"example": "WdoHFx2fojq9b0Qd" | ||
}, | ||
"success": { | ||
"type": "boolean", | ||
"example": true | ||
}, | ||
"code": { | ||
"type": "integer", | ||
"format": "int32", | ||
"example": 200 | ||
}, | ||
"duplicate": { | ||
"type": "boolean", | ||
"example": true | ||
}, | ||
"duplicateToken": { | ||
"type": "string", | ||
"example": "kV96aAhXeuE8iDkO" | ||
} | ||
} | ||
}, | ||
"Result": { | ||
"type": "object", | ||
"properties": { | ||
"URL": { | ||
"type": "string", | ||
"example": "TARGET.COM" | ||
}, | ||
"tax": { | ||
"type": "integer", | ||
"format": "int32", | ||
"example": 0 | ||
}, | ||
"tip": { | ||
"type": "integer", | ||
"format": "int32", | ||
"example": 0 | ||
}, | ||
"url": { | ||
"type": "string", | ||
"example": "target.com" | ||
}, | ||
"total": { | ||
"type": "number", | ||
"example": 28.1 | ||
}, | ||
"address": { | ||
"type": "string", | ||
"example": "West Hollywood, Santa Monica Blvd, West Hollywood, CA 90046" | ||
}, | ||
"date": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"api_key": { | ||
"type": "apiKey", | ||
"in": "header", | ||
"name": "apikey" | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"api_key": [] | ||
} | ||
], | ||
"x-ms-connector-metadata": [ | ||
{ | ||
"propertyName": "Website", | ||
"propertyValue": "https://www.tabscanner.com" | ||
}, | ||
{ | ||
"propertyName": "Privacy policy", | ||
"propertyValue": "https://tabscanner.com/privacy-policy/" | ||
}, | ||
{ | ||
"propertyName": "Categories", | ||
"propertyValue": "Data;Productivity" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"properties": { | ||
"connectionParameters": { | ||
"apikey": { | ||
"type": "securestring", | ||
"uiDefinition": { | ||
"displayName": "API Key", | ||
"description": "The API Key for this api", | ||
"tooltip": "Provide your API Key", | ||
"constraints": { | ||
"required": "true" | ||
} | ||
} | ||
} | ||
}, | ||
"iconBrandColor": "#28ace2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please refer the below link and update the iconbrandcolor. |
||
"capabilities": [ | ||
"actions" | ||
], | ||
"publisher": "Ben Smith", | ||
"stackOwner": "Tabscanner" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Tabscanner Receipt OCR | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please refer the below link and update/add all the required sections. |
||
|
||
## Publisher: Ben Smith | ||
|
||
## Prerequisites | ||
An API Key is Required. Please create an account at [Tabscanner](https://tabscanner.com) to get your API key. | ||
|
||
## Supported Operations | ||
### Submit a receipt image for processing | ||
Upload a receipt image in base64 format for transcription. | ||
|
||
### Retreive the result of a processed receipt image | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you please correct typo "Retreive" ? |
||
The result contains the receipt transcription. | ||
|
||
## Obtaining Credentials | ||
An API Key is Required. Please create an account at [Tabscanner](https://tabscanner.com) to get your API key. | ||
|
||
## Known Issues and Limitations | ||
No known issues and limitations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would suggest you keep all parameters descriptions short to fit in the text box. please see here.