Complete example request and canonical pass/fail responses for campaign-scoped receipt validation.
This page shows complete example requests and canonical responses for campaign validation — Upload File and URL. Open either page to send the same request from its interactive playground.
Example Requests
curl --request POST \
--url https://api.taggun.io/api/validation/v1/campaign/receipt-validation/file \
--header 'accept: application/json' \
--header 'apikey: YOUR_API_KEY' \
--header 'content-type: multipart/form-data' \
--form file='@example-image.jpeg' \
--form campaignId=october-cola-24Send the receipt as a URL instead of a file with the URL endpoint — everything else is identical:
curl --request POST \
--url https://api.taggun.io/api/validation/v1/campaign/receipt-validation/url \
--header 'accept: application/json' \
--header 'apikey: YOUR_API_KEY' \
--header 'content-type: application/json' \
--data '{
"campaignId": "october-cola-24",
"url": "https://example.com/receipts/receipt-123.jpg"
}'Both requests are checked against the rules stored under campaignId (october-cola-24 here) and return the same response. Optional fields — incognito, ipAddress, near, referenceId, userId, subAccountId, language — are described on the endpoint pages.
Example JSON Responses
Successful Validation
{
"successful": true,
"failedValidations": [],
"passedValidations": [
"merchant_name_validated",
"date_validated",
"product_line_items_validated",
"fraud_detection_unique_receipt_validated",
"is_credit_card"
],
"productLineItems": [
{ "name": "COCA COLA 12PK", "unitPrice": 6.99, "totalPrice": 13.98, "quantity": 2 },
{ "name": "DORITOS NACHO", "unitPrice": 4.99, "totalPrice": 4.99, "quantity": 1 }
],
"matchedProductLineItems": [
{ "name": "COCA COLA 12PK", "unitPrice": 6.99, "totalPrice": 13.98, "quantity": 2 }
],
"date": "2024-10-15T14:22:31.000Z",
"merchantName": "Walmart",
"productCodes": [],
"balanceAmount": null,
"smartValidate": { "is_credit_card": true },
"totalAmount": 23.97,
"receiptNumber": "0021556789",
"invoiceNumber": null,
"trackingId": "T-20241015-8834567",
"targetRotation": 0,
"similarReceipts": [],
"tamperDetection": { "isTampered": false }
}Failed Validation
{
"successful": false,
"failedValidations": [
"merchant_name_validated",
"product_line_items_validated",
"fraud_detection_unique_receipt_validated",
"is_credit_card"
],
"passedValidations": ["date_validated"],
"productLineItems": [
{ "name": "PEPSI 12PK", "unitPrice": 6.99, "totalPrice": 13.98, "quantity": 2 },
{ "name": "MTN DEW 2L", "unitPrice": 2.5, "totalPrice": 5.0, "quantity": 2 },
{ "name": "DORITOS NACHO", "unitPrice": 4.99, "totalPrice": 4.99, "quantity": 1 }
],
"matchedProductLineItems": [],
"date": "2024-10-15T14:22:31.000Z",
"merchantName": "Kroger",
"productCodes": [],
"balanceAmount": null,
"smartValidate": { "is_credit_card": false },
"totalAmount": 23.97,
"receiptNumber": "0021556789",
"invoiceNumber": null,
"trackingId": "T-20241015-8834567",
"targetRotation": 0,
"similarReceipts": [
{ "referenceId": null, "userId": null, "trackingId": "T-20250121-6165563", "similarityScore": 0.93 }
],
"tamperDetection": { "isTampered": false }
}Validation keys (merchant_name_validated, and so on) are the integration contract — the full key table lives in Validating Receipts. The is_credit_card result is a generic SmartValidate illustration, not a description of a particular production use case.
Understand the Response
- Validating Receipts — the validation flow and key reference.
- Setting Up Validation Campaigns — defining the rules receipts are checked against.