@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api TAGGUN Receipt OCR Scanning API
@base https://api.taggun.io/
@version 1.16.102
@auth ApiKey apikey in header
@common_fields {apikey: any # API authentication key.}
@endpoints 23
@hint download_for_search
@toc api(23)

@endpoint GET /api/account/v1/known-merchants/export
@desc Export a list of merchant names and addresses to normalise and match in CSV format
@errors {400: Bad Request}

@endpoint GET /api/account/v1/known-product-codes/export
@desc Export a list of product codes to normalise and match in CSV format
@errors {400: Bad Request}

@endpoint GET /api/account/v1/product-categories/export
@desc Export a list of product categories and descriptions to match in CSV format
@errors {400: Bad Request}

@endpoint GET /api/validation/v1/campaign/settings/list
@desc list all campaign setting IDs for a client
@errors {400: Bad Request}

@endpoint GET /api/validation/v1/campaign/settings/{campaignId}
@desc get campaign settings for a client
@required {campaignId: any # The ID of the campaign to validate the receipt}
@errors {400: Bad Request}

@endpoint POST /api/account/v1/feedback
@desc Add manually verified receipt data to a given receipt for feedback and training purposes
@optional {body: map}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/account/v1/known-merchants/import
@desc Import a list of merchant names and addresses to normalise and match in CSV to TSV format.
@optional {file: any # file less than 20MB. Accepted file types: CSV, TSV}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/account/v1/known-product-codes/import
@desc Import a list of product codes to normalise in and match in CSV to TSV format.
@optional {file: any # file less than 20MB. Accepted file types: CSV, TSV}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/account/v1/merchantname/add
@desc Add a keyword to your account's model to predict merchant name. Changes in your account's model are updated daily.
@optional {body: map}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/account/v1/product-categories/import
@desc Import a list of product categories and descriptions to match in CSV to TSV format.
@optional {file: any # file less than 20MB. Accepted file types: CSV, TSV}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/receipt/v1/simple/encoded
@desc transcribe a receipt using base64 encoded image in json payload
@optional {body: map}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/receipt/v1/simple/file
@desc transcribe a receipt by uploading an image file
@optional {file: any # file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF, HEIC, refresh: any # Set true to force re-process image transcription if the receipt is already in storage, incognito: any # Set true to avoid saving the receipt in storage, ipAddress: any # IP Address of the end user, near: any # A geo location to search for merchant. Typically in the format of city, state, country., ignoreMerchantName: any # Ignore this merchant name if detected on the receipt. Use this field to avoid detecting the customer name as the merchant name., language: any # Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh, th, ar, extractTime: any # Set true to return time if found on the receipt. Otherwise, the time is always set to 12:00:00.000., subAccountId: any # Tag a request with sub-account ID for billing purposes, referenceId: any # Tag a request with a unique reference ID for feedback/training and receipt similarity check purposes, userId: any # Tag a request with a user ID so that duplicate receipts by the same user can be detected, containerId: any # Tag a request with a container ID for fraud detection purposes}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/receipt/v1/simple/url
@desc transcribe a receipt from URL
@optional {body: map}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/receipt/v1/verbose/encoded
@desc transcribe a receipt using base64 encoded image in json payload and return detailed result
@optional {body: map}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/receipt/v1/verbose/file
@desc transcribe a receipt by uploading an image file and return detailed result
@optional {file: any # file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF, HEIC, refresh: any # Set true to force re-process image transcription if the receipt is already in storage, incognito: any # Set true to avoid saving the receipt in storage, ipAddress: any # IP Address of the end user, near: any # A geo location to search for merchant. Typically in the format of city, state, country., ignoreMerchantName: any # Ignore this merchant name if detected on the receipt. Use this field to avoid detecting the customer name as the merchant name., language: any # Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh, th, ar, extractTime: any # Set true to return time if found on the receipt. Otherwise, the time is always set to 12:00:00.000., subAccountId: any # Tag a request with sub-account ID for billing purposes, referenceId: any # Tag a request with a unique reference ID for feedback/training and receipt similarity check purposes, userId: any # Tag a request with a user ID so that duplicate receipts by the same user can be detected, containerId: any # Tag a request with a container ID for fraud detection purposes, extractLineItems: any # Set true to return product line itmes in an array if found on the receipt.}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/receipt/v1/verbose/url
@desc transcribe a receipt from URL and return detailed result
@optional {body: map}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/validation/v1/campaign/file
@desc validate and match a receipt against a receipt validation settings by uploading an image file
@required {campaignId: any # The ID of the campaign to validate the receipt}
@optional {file: any # file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF, HEIC, incognito: any # Set true to avoid saving the receipt in storage, ipAddress: any # IP Address of the end user, near: any # A geo location to search for merchant. Typically in the format of city, state, country., referenceId: any # Tag a request with a unique reference ID for feedback/training and receipt similarity check purposes, userId: any # Tag a request with a user ID so that duplicate receipts by the same user can be detected, subAccountId: any # Tag a request with a subAccountId, language: any # Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh, th, ar}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/validation/v1/campaign/product-validation/file
@desc validate if user-submitted info like serial number are detected an image file
@required {productVerificationNumber: any # The number of the product to validate the receipt}
@optional {file: any # file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF, HEIC, incognito: any # Set true to avoid saving the receipt in storage, subAccountId: any # Tag a request with sub-account ID for billing purposes, referenceId: any # Tag a request with a unique reference ID for feedback and training purposes}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/validation/v1/campaign/receipt-validation/file
@desc validate and match a receipt against a receipt validation settings by uploading an image file
@required {campaignId: any # The ID of the campaign to validate the receipt}
@optional {file: any # file less than 20MB. Accepted file types: PDF, JPG, PNG, GIF, HEIC, incognito: any # Set true to avoid saving the receipt in storage, ipAddress: any # IP Address of the end user, near: any # A geo location to search for merchant. Typically in the format of city, state, country., referenceId: any # Tag a request with a unique reference ID for feedback/training and receipt similarity check purposes, userId: any # Tag a request with a user ID so that duplicate receipts by the same user can be detected, subAccountId: any # Tag a request with a subAccountId, language: any # Set language as a hint. Leave empty for auto detect. Supported languages: , en, es, fr, jp, he, iw, et, lv, lt, fi, el, zh, th, ar}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/validation/v1/campaign/receipt-validation/url
@desc validate and match a receipt against a receipt validation settings from URL
@optional {body: map}
@returns(200) Success
@errors {400: Bad Request}

@endpoint POST /api/validation/v1/campaign/settings/create/{campaignId}
@desc create campaign settings for a client
@required {campaignId: any # The ID of the campaign to validate the receipt}
@optional {body: map}
@errors {400: Bad Request}

@endpoint PUT /api/validation/v1/campaign/settings/update/{campaignId}
@desc update campaign settings for a client
@required {campaignId: any # The ID of the campaign to validate the receipt}
@optional {body: map}
@errors {400: Bad Request}

@endpoint DELETE /api/validation/v1/campaign/settings/delete/{campaignId}
@desc delete campaign settings for a client
@required {campaignId: any # Remove campaign settings with a campaign ID}
@errors {400: Bad Request}

@end
