Definitions for Validate Receipts
This API is used to validate a receipt against a campaign's predefined settings
Endpoint: POST https://api.taggun.io/api/validation/v1/campaign/receipt-validation/file
Request Definitions
Field | Type | Description | Required |
---|---|---|---|
file | file | The receipt or invoice file for validation. | Yes |
campaignId | string | The campaignId of the campaign you've set up and now validating against. | Yes |
referenceId | string | A unique reference for tracking purposes. | No |
Response Definitions
Field | Type | Description |
---|---|---|
successful | boolean | true if the receipt passed validation, false if it failed. |
failedValidations | string[] | A list of validation checks that did not pass. |
passedValidations | string[] | A list of validation checks that passed successfully. |
productLineItems | object[] | All product items found on the receipt (name, price, quantity). |
matchedProductLineItems | object[] | Product items that matched the campaign’s rules. |
date | string | The transaction date on the receipt (in ISO 8601 format). |
merchantName | string | The name of the store or merchant. |
productCodes | string[] | A list of product codes found on the receipt (if applicable). |
balanceAmount | number | null | The remaining balance on the receipt (if applicable). |
totalAmount | number | The total amount of the receipt. |
receiptNumber | string | null | The receipt number (if available). |
invoiceNumber | string | null | The invoice number (if available). |
similarReceipts | any[] | A list of receipts that are similar (used for fraud detection). |
trackingId | string | A unique ID to track this validation request. |
targetRotation | number | The degree of rotation applied to the receipt image during processing. |
Product Line Item Object
Field | Type | Description |
---|---|---|
name | string | The name of the product or service. |
unitPrice | number | The price of a single unit of the product. |
totalPrice | number | The total price for this product (unit price × quantity). |
quantity | number | The number of units purchased. |
Updated about 23 hours ago