@datafire/taggun
v5.0.0
Published
DataFire integration for TAGGUN Receipt OCR Scanning API
Downloads
19
Readme
@datafire/taggun
Client library for TAGGUN Receipt OCR Scanning API
Installation and Usage
npm install --save @datafire/taggun
let taggun = require('@datafire/taggun').create();
.then(data => {
console.log(data);
});
Description
Expects only running software, real reactions, and beautifully crafted APIs to serve your every desire to transcribe a piece of paper to digital form.
Actions
postApiAccountV1Feedback
Add manually verified receipt data to a given receipt for feedback and training purposes
taggun.postApiAccountV1Feedback({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body receiptFeedbackAddPayload
- apikey required
Output
- output Result
postApiAccountV1MerchantnameAdd
add a keyword to your account's model to predict merchant name
taggun.postApiAccountV1MerchantnameAdd({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body merchantNameAddPayload
- apikey required
Output
- output Result
postApiReceiptV1MatchFile
detect and match a receipt against keywords and metadata by uploading an image file
taggun.postApiReceiptV1MatchFile({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - file
string
,object
: file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF- content
string
- encoding
string
(values: ascii, utf8, utf16le, base64, binary, hex) - contentType
string
- filename
string
- content
- refresh
boolean
: Set true to force re-process image transcription if the receipt is already in storage - incognito
boolean
: Set true to avoid saving the receipt in storage - ipAddress
string
: IP Address of the end user - primaryKeywords
array
: An array of primary keywords to match - secondaryKeywords
array
: An array of secondary keywords to match (lower confidence level than primaryKeywords) - stopWords
array
: An array of stop words that negate the result to be UNLIKELY - language
string
(values: en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh): Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh
- apikey required
Output
- output receiptMatchResult
postApiReceiptV1SimpleEncoded
transcribe a receipt using base64 encoded image in json payload
taggun.postApiReceiptV1SimpleEncoded({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body jsonPayload
- apikey required
Output
- output receiptResult
postApiReceiptV1SimpleFile
transcribe a receipt by uploading an image file
taggun.postApiReceiptV1SimpleFile({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - file
string
,object
: file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF- content
string
- encoding
string
(values: ascii, utf8, utf16le, base64, binary, hex) - contentType
string
- filename
string
- content
- refresh
boolean
: Set true to force re-process image transcription if the receipt is already in storage - incognito
boolean
: Set true to avoid saving the receipt in storage - ipAddress
string
: IP Address of the end user - near
string
: A geo location to search for merchant. Typically in the format of city, state, country. - ignoreMerchantName
string
: Ignore this merchant name if detected on the receipt. Use this field to avoid detecting the customer name as the merchant name. - language
string
(values: en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh): Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh - extractTime
boolean
: Set true to return time if found on the receipt. Otherwise, the time is always set to 12:00:00.000. - subAccountId
string
: Tag a request with sub-account ID for billing purposes - referenceId
string
: Tag a request with a unique reference ID for feedback and training purposes
- apikey required
Output
- output receiptResult
postApiReceiptV1SimpleStorage
transcribe a receipt in storage
taggun.postApiReceiptV1SimpleStorage({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body storagePayload
- apikey required
Output
- output receiptResult
postApiReceiptV1SimpleUrl
transcribe a receipt from URL
taggun.postApiReceiptV1SimpleUrl({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body urlPayload
- apikey required
Output
- output receiptResult
postApiReceiptV1VerboseEncoded
transcribe a receipt using base64 encoded image in json payload and return detailed result
taggun.postApiReceiptV1VerboseEncoded({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body jsonPayload
- apikey required
Output
- output receiptVerboseResult
postApiReceiptV1VerboseFile
transcribe a receipt by uploading an image file and return detailed result
taggun.postApiReceiptV1VerboseFile({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - file
string
,object
: file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF- content
string
- encoding
string
(values: ascii, utf8, utf16le, base64, binary, hex) - contentType
string
- filename
string
- content
- refresh
boolean
: Set true to force re-process image transcription if the receipt is already in storage - incognito
boolean
: Set true to avoid saving the receipt in storage - ipAddress
string
: IP Address of the end user - near
string
: A geo location to search for merchant. Typically in the format of city, state, country. - ignoreMerchantName
string
: Ignore this merchant name if detected on the receipt. Use this field to avoid detecting the customer name as the merchant name. - language
string
(values: en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh): Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh - extractTime
boolean
: Set true to return time if found on the receipt. Otherwise, the time is always set to 12:00:00.000. - subAccountId
string
: Tag a request with sub-account ID for billing purposes - referenceId
string
: Tag a request with a unique reference ID for feedback and training purposes
- apikey required
Output
- output receiptVerboseResult
postApiReceiptV1VerboseStorage
transcribe a receipt in storage and return detailed result
taggun.postApiReceiptV1VerboseStorage({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body storagePayload
- apikey required
Output
- output receiptVerboseResult
postApiReceiptV1VerboseUrl
transcribe a receipt from URL and return detailed result
taggun.postApiReceiptV1VerboseUrl({
"apikey": ""
}, context)
Input
- input
object
- apikey required
string
: API authentication key. - body urlPayload
- apikey required
Output
- output receiptVerboseResult
Definitions
ABN
- ABN
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
IBAN
- IBAN
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
LocationResult
- LocationResult
object
- location location
Model1
- Model1
object
- x
number
- y
number
- x
Model2
- Model2
array
- items Model1
Model3
- Model3
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
Model4
- Model4
object
- confidenceLevel
number
- data
number
- keyword
string
- text
string
- confidenceLevel
Model5
- Model5
object
- productName productName
- quantity quantity
- unitPrice unitPrice
- wineVarietal wineVarietal
Model6
Model7
- Model7
object
- confidenceLevel
number
- data
number
- keyword
string
- text
string
- confidenceLevel
Result
- Result
object
- result
string
- result
badRequestError
- badRequestError
object
- error
string
- message
string
- statusCode
number
- error
belgiumVATNumbers
- belgiumVATNumbers
array
- items Model3
data
- data
array
- items
string
- items
data1
- data1
object
- metadata_type metadata_type
- quantity quantity
- unitPrice unitPrice1
data2
- data2
object
- countryCode
string
- vatNo
string
- verificationId
string
- vies vies
- countryCode
date
- date
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
date1
- date1
object
- confidenceLevel
number
- data
string
- confidenceLevel
entities
- entities
object
- ABN ABN
- IBAN IBAN
- belgiumVATNumbers belgiumVATNumbers
- excludeItems excludeItems
- fapiaoInvoice fapiaoInvoice
- fapiaoInvoiceCode fapiaoInvoiceCode
- fapiaoInvoiceNumber fapiaoInvoiceNumber
- fapiaoMerchantTaxId fapiaoMerchantTaxId
- geoNames geoNames
- invoiceNumber invoiceNumber
- lineItems lineItems
- merchantVerification merchantVerification
- qrCodeData qrCodeData
- receiptNumber receiptNumber
- shoppingMallName shoppingMallName
- wineListItems wineListItems
excludeItems
- excludeItems
array
- items Model4
fapiaoInvoice
- fapiaoInvoice
object
- confidenceLevel
number
- data
boolean
- keyword
string
- text
string
- confidenceLevel
fapiaoInvoiceCode
- fapiaoInvoiceCode
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
fapiaoInvoiceNumber
- fapiaoInvoiceNumber
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
fapiaoMerchantTaxId
- fapiaoMerchantTaxId
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
geoNames
- geoNames
array
- items Model7
headers
- headers
object
: Custom http headers can be set to forward to the target URL.- x-custom-key
string
- x-custom-key
invoiceNumber
- invoiceNumber
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
itemsCount
- itemsCount
object
- confidenceLevel
number
- data
number
- confidenceLevel
jsonPayload
- jsonPayload
object
- contentType required
string
- extractTime
boolean
: Set true to return time if found on the receipt. Otherwise, the time is always set to 12:00:00.000. - filename required
string
- ignoreMerchantName
string
: Ignore this merchant name if detected on the receipt. Use this field to avoid detecting the customer name as the merchant name. - image required
string
- incognito
boolean
: Set true to avoid saving the receipt in storage - ipAddress
string
: IP Address of the end user - language
string
(values: en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh): Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh - near
string
: A geo location to search for merchant. Typically in the format of city, state, country. - referenceId
string
: Tag a request with a unique reference ID for feedback and training purposes - refresh
boolean
: Set true to force re-process image transcription if the receipt is already in storage - subAccountId
string
: Tag a request with sub-account ID for billing purposes
- contentType required
lineAmounts
- lineAmounts
array
- items
string
- items
lineItems
- lineItems
array
- items Model6
location
- location
object
match
- match
object
- confidenceLevel
number
- data
string
(values: LIKELY, UNLIKELY): LIKELY or UNLIKELY - index
number
- keyword
string
- regions regions
- text
string
- confidenceLevel
merchantAddress
- merchantAddress
object
- confidenceLevel
number
- data
string
- confidenceLevel
merchantAddress1
- merchantAddress1
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
merchantCity
- merchantCity
object
- confidenceLevel
number
- data
string
- confidenceLevel
merchantCity1
- merchantCity1
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
merchantCountryCode
- merchantCountryCode
object
- confidenceLevel
number
- data
string
- confidenceLevel
merchantCountryCode1
- merchantCountryCode1
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
merchantName
- merchantName
object
- confidenceLevel
number
- data
string
- confidenceLevel
merchantName1
- merchantName1
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
merchantNameAddPayload
- merchantNameAddPayload
object
- merchantName required
string
- merchantName required
merchantPostalCode
- merchantPostalCode
object
- confidenceLevel
number
- data
string
- confidenceLevel
merchantPostalCode1
- merchantPostalCode1
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
merchantState
- merchantState
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
merchantTypes
- merchantTypes
object
- confidenceLevel
number
- data data
- confidenceLevel
merchantTypes1
merchantVerification
metadata_type
- metadata_type
object
- data
string
- text
string
- data
paymentType
- paymentType
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
productName
- productName
object
- confidenceLevel
number
- keyword
string
- text
string
- confidenceLevel
qrCodeData
- qrCodeData
object
- confidenceLevel
number
- data
string
- keyword
string
- text
string
- confidenceLevel
quantity
- quantity
object
- data
number
- text
string
- data
receiptFeedbackAddPayload
- receiptFeedbackAddPayload
object
- currencyCode
string
- date
string
- merchantName
string
- referenceId required
string
- taxAmount
number
- totalAmount
number
- currencyCode
receiptMatchResult
receiptNumber
- receiptNumber
object
- confidenceLevel
number
- data
string
- index
number
- keyword
string
- regions regions
- text
string
- confidenceLevel
receiptResult
- receiptResult
object
- confidenceLevel
number
: Overall confidence level - date date1
- error
string
- merchantAddress merchantAddress
- merchantCity merchantCity
- merchantCountryCode merchantCountryCode
- merchantName merchantName
- merchantPostalCode merchantPostalCode
- merchantState merchantCity
- merchantTypes merchantTypes
- taxAmount taxAmount
- totalAmount totalAmount
- confidenceLevel
receiptVerboseResult
- receiptVerboseResult
object
- amounts lineAmounts
- confidenceLevel
number
- date date
- elapsed
number
- entities entities
- error
string
- itemsCount itemsCount
- lineAmounts lineAmounts
- location LocationResult
- merchantAddress merchantAddress1
- merchantCity merchantCity1
- merchantCountryCode merchantCountryCode1
- merchantName merchantName1
- merchantPostalCode merchantPostalCode1
- merchantState merchantState
- merchantTypes merchantTypes1
- numbers lineAmounts
- paymentType paymentType
- taxAmount taxAmount1
- text text
- totalAmount totalAmount1
regions
- regions
array
- items Model2
shoppingMallName
- shoppingMallName
object
- confidenceLevel
number
- data
string
- index
number
- regions regions
- text
string
- confidenceLevel
storagePayload
- storagePayload
object
- contentType required
string
- extractTime
boolean
: Set true to return time if found on the receipt. Otherwise, the time is always set to 12:00:00.000. - ignoreMerchantName
string
: Ignore this merchant name if detected on the receipt. Use this field to avoid detecting the customer name as the merchant name. - ipAddress
string
: IP Address of the end user - language
string
(values: en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh): Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh - md5 required
string
: MD5 hash of the receipt - near
string
: A geo location to search for merchant. Typically in the format of city, state, country. - referenceId
string
: Tag a request with a unique reference ID for feedback and training purposes - refresh
boolean
: Refresh cache if exists - subAccountId
string
: Tag a request with sub-account ID for billing purposes
- contentType required
taxAmount
- taxAmount
object
- confidenceLevel
number
- data
number
- confidenceLevel
taxAmount1
- taxAmount1
object
- confidenceLevel
number
- currencyCode
string
- data
number
- index
number
- keyword
string
- regions regions
- text
string
- confidenceLevel
text
- text
object
- regions lineAmounts
- text
string
totalAmount
- totalAmount
object
- confidenceLevel
number
- data
number
- confidenceLevel
totalAmount1
- totalAmount1
object
- confidenceLevel
number
- currencyCode
string
- data
number
- index
number
- keyword
string
- regions regions
- text
string
- confidenceLevel
unitPrice
- unitPrice
object
- data
number
- text
string
- data
unitPrice1
- unitPrice1
object
- data
number
- text
string
- data
urlPayload
- urlPayload
object
- extractTime
boolean
: Set true to return time if found on the receipt. Otherwise, the time is always set to 12:00:00.000. - headers headers
- ignoreMerchantName
string
: Ignore this merchant name if detected on the receipt. Use this field to avoid detecting the customer name as the merchant name. - incognito
boolean
: Set true to avoid saving the receipt in storage - ipAddress
string
: IP Address of the end user - language
string
(values: en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh): Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh - near
string
: A geo location to search for merchant. Typically in the format of city, state, country. - referenceId
string
: Tag a request with a unique reference ID for feedback and training purposes - refresh
boolean
: Set true to force re-process image transcription if the receipt is already in storage - subAccountId
string
: Tag a request with sub-account ID for billing purposes - url required
string
: The target URL that contains a receipt file
- extractTime
vies
- vies
object
- address
string
- countryCode
string
- error
string
- name
string
- valid
boolean
- vatNumber
string
- address
wineListItems
- wineListItems
array
- items Model5
wineVarietal
- wineVarietal
object
- confidenceLevel
number
- keyword
string
- text
string
- confidenceLevel