Definitions for Validate Receipts

This API is used to validate a receipt against a campaign's predefined settings

API Reference

Endpoint: POST https://api.taggun.io/api/validation/v1/campaign/receipt-validation/file

Request Definitions

FieldTypeDescriptionRequired
filefileThe receipt or invoice file for validation.Yes
campaignIdstringThe campaignId of the campaign you've set up and now validating against.Yes
referenceIdstringA unique reference for tracking purposes.No

Response Definitions

FieldTypeDescription
successfulbooleantrue if the receipt passed validation, false if it failed.
failedValidationsstring[]A list of validation checks that did not pass.
passedValidationsstring[]A list of validation checks that passed successfully.
productLineItemsobject[]All product items found on the receipt (name, price, quantity).
matchedProductLineItemsobject[]Product items that matched the campaign’s rules.
datestringThe transaction date on the receipt (in ISO 8601 format).
merchantNamestringThe name of the store or merchant.
merchantAddressstringThe address of the store or merchant.
merchantCitystringThe city of the store or merchant.
merchantPostalCodestringThe postal code of the store or merchant.
merchantStatestringThe state of the store or merchant.
merchantCountryCodestringThe country code of the store or merchant.
productCodesstring[]A list of product codes found on the receipt (if applicable).
balanceAmountnumber | nullThe remaining balance on the receipt (if applicable).
totalAmountnumberThe total amount of the receipt.
receiptNumberstring | nullThe receipt number (if available).
invoiceNumberstring | nullThe invoice number (if available).
similarReceiptsany[]A list of receipts that are similar (used for fraud detection).
trackingIdstringA unique ID to track this validation request.
targetRotationnumberThe degree of rotation applied to the receipt image during processing.

Product Line Item Object

FieldTypeDescription
namestringThe name of the product or service.
unitPricenumberThe price of a single unit of the product.
totalPricenumberThe total price for this product (unit price × quantity).
quantitynumberThe number of units purchased.

List of possiblefailedValiations or passedValidationsreasons

reasonDescription
date_validatedthe receipt date falls outside the allowed date range
merchant_name_validatedthe merchant name on the receipt does not match the expected store or is invalid
product_code_validatedthe product codes/SKUs on the receipt are invalid or do not match the expected description and values
matched_product_line_itemsthe products on the receipt do not match with the expected product name in the campaign settings
balance_amountthe balance amount or amount due on the receipt is more than the allowed value
fraud_detection_unique_receipt_validatedthe receipt has been previously submitted or appears to be a duplicate