Skip to main content

Response Structure

The POST /api_scan/v14 endpoint returns a JSON object. In the event of an unexpected error, only the error field will be returned. All other fields are optional and will be present only when the corresponding data was successfully extracted from the receipt image.

A SHA-256 HMAC hash of the raw JSON response is returned in the X-BlinkReceipt-Hash response header (keyed with your client secret), which you can use to verify the integrity of the response.


Top-Level Fields

Session & Identity

FieldTypeDescription
errorstringPresent only on unexpected errors. Contains the error message.
blink_receipt_idstringUnique identifier for this scan session. When scanning multiple frames across separate requests, capture this value from the first response and pass it in all subsequent requests. Example: "0d527efb-c97f-4678-a0dd-a9f89922b121"

Transaction Metadata

FieldTypeFormat / ExampleDescription
dateobject{ "confidence": 99, "value": "01/01/2019" }Purchase date in mm/dd/yyyy format
timeobject{ "confidence": 99, "value": "15:30" }Purchase time in 24-hour hh:mm format
time_secondsobject{ "confidence": 99, "value": "05" }Seconds component of the purchase time, if detected
subtotalobject{ "confidence": 99, "value": 95.15 }Receipt subtotal
totalobject{ "confidence": 99, "value": 102.37 }Receipt total
taxesobject{ "confidence": 99, "value": 7.22 }Tax amount
cashierobject{ "confidence": 99, "value": "52" }Cashier identifier
registerobject{ "confidence": 99, "value": "3" }Register identifier
transactionobject{ "confidence": 99, "value": "1234" }Transaction identifier
long_transactionobject{ "confidence": 99, "value": "ABCDEFGH12345678" }Long transaction identifier (Poland only)
storeobject{ "confidence": 99, "value": "1001" }Store identifier
tax_idobject{ "confidence": 99, "value": "98765432" }Tax identifier for this retailer (non-US)
last4ccobject{ "confidence": 99, "value": "1234" }Last 4 digits of the credit card used, if any
cashbacknumber20Cashback amount, if any
purchase_typestring"In-Store"Purchase type (e.g. In-Store, Dine-In)
barcodestring"350606291014501186"Barcode detected on the receipt, if any

Merchant Information

FieldTypeFormat / ExampleDescription
merchant_namestring"Walmart"The name of the merchant
merchant_confidencenumber99Confidence score for merchant_name (0–100)
store_streetobject{ "confidence": 99, "value": "123 Main St" }Street address of the store
store_cityobject{ "confidence": 99, "value": "Albuquerque" }City of the store
store_stateobject{ "confidence": 99, "value": "NM" }State of the store
store_zipobject{ "confidence": 99, "value": "12345" }ZIP code of the store
purchase_countrystring"FR"Detected 2-character ISO country code
channelobject{ "confidence": 99, "value": "Food" }Retail channel

Quality & Classification

FieldTypeDescription
is_receiptbooleanWhether the submitted image(s) appear to be a valid receipt
is_blurrybooleanWhether the image(s) are too blurry to extract data
is_screenbooleanWhether the image(s) appear to be a photo of a screen rather than a physical receipt
ocr_confidencenumberAverage OCR confidence for characters on this receipt (e.g. 95.0)
trip_confidencenumberConfidence score for trip-level (header) fields (e.g. 95)
item_confidencenumberConfidence score for item-level (line item) fields (e.g. 100)

Loyalty & Membership

FieldTypeDescription
loyalty_programbooleanWhether the receipt shows evidence of the shopper belonging to the retailer's loyalty program
member_numberstringThe consumer's membership number with this retailer, if detected

Raw OCR Data

FieldTypeDescription
raw_textstringRaw OCR text for a single-frame scan
raw_text_arrayarray of stringArray of raw OCR text, one element per image frame, for multi-URL scans

Duplicate Detection

These fields are only present when detect_duplicates: true is passed in the request.

FieldTypeDescription
isDuplicatebooleanWhether the submitted receipt is a duplicate of a previously submitted receipt
isFraudulentbooleanWhether the submitted receipt is believed to be fraudulent
duplicateBlinkReceiptIdsarray of stringIf isDuplicate is true, the blink_receipt_id values of the matching prior receipts

products Array

The products field is an array of line-item objects representing each product detected on the receipt.

{
"products": [
{
"rpn": { "confidence": 99, "value": "1010101010" },
"rsd": { "confidence": 99, "value": "BANANAS", "original_case_value": "Bananas" },
"qty": { "confidence": 99, "value": 1.55 },
"price": { "confidence": 99, "value": 0.99 },
"fullPrice": { "confidence": 99, "value": 1.25 },
"totalPrice": { "confidence": 99, "value": 1.53 },
"uom": { "confidence": 99, "value": "pounds" },
"brand": "Kraft",
"category": "Microwaveable Meals",
"image_url": "https://www.domain.com/image.png",
"product_name": "Kraft Macaroni & Cheese",
"size": "5 oz",
"upc": "012345678901",
"item_type": "retail_product",
"line": 10
}
]
}

OCR-Extracted Fields

FieldTypeFormat / ExampleDescription
rpnobject{ "confidence": 99, "value": "1010101010" }Receipt Product Number — the SKU/product number as printed on the receipt
rsdobject{ "confidence": 99, "value": "BANANAS", "original_case_value": "Bananas" }Receipt Short Description. value is uppercased; original_case_value preserves original casing
qtyobject{ "confidence": 99, "value": 1.55 }Quantity of this item. May represent weight when combined with uom
priceobject{ "confidence": 99, "value": 0.99 }Actual unit price paid
fullPriceobject{ "confidence": 99, "value": 1.25 }Full item price before any coupons or discounts were applied
totalPriceobject{ "confidence": 99, "value": 1.53 }Total price paid for this line item (price × qty)
uomobject{ "confidence": 99, "value": "pounds" }Unit of measurement (e.g. "pounds", "ounces")

Product Intelligence Fields

These fields are populated by the BlinkReceipt Product Intelligence service and do not include a confidence score.

FieldTypeDescription
brandstringBrand of the product (e.g. "Kraft")
categorystringProduct category (e.g. "Microwaveable Meals")
image_urlstringURL of the product image
product_namestringFull product name (e.g. "Kraft Macaroni & Cheese")
sizestringProduct size (e.g. "5 oz")
upcstringUniversal Product Code (e.g. "012345678901")
item_typestringClassification of the item type (e.g. "retail_product")
fuel_typestringFor fuel receipts, the type of fuel purchased (e.g. "DIESEL")

Prefix / Postfix Fields

Some merchants prepend or append characters to product numbers and descriptions on their receipts. These fields expose those affixes so you can reconstruct or strip them.

FieldTypeDescription
rsd_prefixstringPrefix the merchant prepends to RSDs
rsd_postfixstringPostfix the merchant appends to RSDs
rpn_prefixstringPrefix the merchant prepends to RPNs
rpn_postfixstringPostfix the merchant appends to RPNs

Other Product Fields

FieldTypeDescription
lineintegerInternal line number for this product within the receipt
attributesarray of objectsAdditional attributes for this item. Each element is an object with a single key-value pair specific to the attribute.

infoLines (within each product)

Any additional text lines on the receipt that were associated with this product (e.g. member pricing notices).

FieldTypeFormat / ExampleDescription
lineinteger10Line number of the associated text
textobject{ "confidence": 99, "value": "Member Price" }The associated text content

subProducts (within each product)

Some receipt formats nest sub-items under a parent product (e.g. bundled items). Each sub-product has the following fields:

FieldTypeFormat / ExampleDescription
rpnobject{ "confidence": 99, "value": "1234" }Receipt Product Number of the sub-item
rsdobject{ "confidence": 99, "value": "ITEM NAME" }Receipt Short Description of the sub-item
qtyobject{ "confidence": 99, "value": 1 }Quantity of the sub-item
priceobject{ "confidence": 99, "value": 0.99 }Unit price of the sub-item
totalPriceobject{ "confidence": 99, "value": 0.99 }Total price of the sub-item
lineinteger11Internal line number for the sub-item

possible_products (within each product)

When Product Intelligence cannot narrow the scanned item to a single product, it returns a ranked list of candidates.

FieldTypeDescription
brandstringCandidate product brand
categorystringCandidate product category
image_urlstringCandidate product image URL
product_namestringCandidate product name
sizestringCandidate product size
upcstringCandidate product UPC
item_typestringCandidate item type classification
attributesarray of objectsCandidate product attributes
probabilitynumberProbability (0–1) that this candidate matches the scanned item (e.g. 0.95)

discounts Array

The discounts field is an array of coupon and discount objects detected on the receipt.

{
"discounts": [
{
"description": { "confidence": 99, "value": "Save 75%" },
"sku": { "confidence": 99, "value": "999" },
"price": { "confidence": 99, "value": 0.25 },
"relatedProductIndex": 2,
"line": 10
}
]
}
FieldTypeFormat / ExampleDescription
descriptionobject{ "confidence": 99, "value": "Save 75%" }Human-readable description of the coupon or discount
skuobject{ "confidence": 99, "value": "999" }SKU associated with this coupon
priceobject{ "confidence": 99, "value": 0.25 }Amount of the discount (positive value)
desc_prefixstring"*"Prefix the merchant prepends to coupon descriptions
desc_postfixstring"*"Postfix the merchant appends to coupon descriptions
sku_prefixstring"*"Prefix the merchant prepends to coupon SKUs
sku_postfixstring"*"Postfix the merchant appends to coupon SKUs
relatedProductIndexinteger2Zero-based index of the associated product in the products array, if any
lineinteger10Internal line number for this discount

phones Array

An array of phone numbers detected anywhere on the receipt.

{
"phones": [
{ "confidence": 99, "value": "123-456-7890" }
]
}

Each element is an object with confidence (number, 0–100) and value (string) containing the detected phone number.


paymentMethods Array

An array of payment method objects detected on the receipt. There may be multiple entries if the transaction was split across payment methods.

{
"paymentMethods": [
{
"method": { "confidence": 99, "value": "Credit Card" },
"cardType": { "confidence": 99, "value": "Mastercard" },
"cardIssuer": { "confidence": 99, "value": "Target" },
"amount": { "confidence": 99, "value": 102.37 }
}
]
}
FieldTypeFormat / ExampleDescription
methodobject{ "confidence": 99, "value": "Credit Card" }Payment method label (e.g. "Cash", "Credit Card", "EBT")
cardTypeobject{ "confidence": 99, "value": "Mastercard" }Card network (e.g. "Visa", "Mastercard", "American Express")
cardIssuerobject{ "confidence": 99, "value": "Target" }For co-branded cards, the issuing institution (e.g. "Target", "Chase")
amountobject{ "confidence": 99, "value": 102.37 }Amount paid by this payment method

qualifiedPromos Array

Present only when validate_promotions: true is passed in the request. Lists every promotion slug that the receipt qualified for.

{
"qualifiedPromos": [
{
"slug": "buy1get1",
"rewardValue": 1.99,
"rewardCurrency": "USD",
"relatedProductIndexes": [4, 7],
"qualifications": [[4], [7]],
"qualifiedProductLists": [
{
"productIndex": 4,
"productGroups": ["Group 1"]
}
]
}
]
}
FieldTypeDescription
slugstringThe promotion slug that qualified
rewardValuenumberMonetary value of the reward (e.g. 1.99)
rewardCurrencystringISO currency code for the reward (e.g. "USD")
relatedProductIndexesarray of numberZero-based indexes of all products in the products array that caused this promo to qualify
qualificationsarray of array of numberWhen a promo qualifies multiple times on the same receipt, each element is an array of product indexes for one qualifying instance
qualifiedProductListsarray of objectsDetailed per-product qualification data (see below)

qualifiedProductLists entries

FieldTypeDescription
productIndexintegerZero-based index of the qualifying product in the products array
productGroupsarray of stringThe product groups this product qualified for within the promotion

unqualifiedPromos Array

Present only when validate_promotions: true is passed. Lists every evaluated promotion slug that did not qualify, along with the reason.

{
"unqualifiedPromos": [
{
"slug": "buy1get1",
"errorCode": 1,
"errorMessage": "No Clorox products purchased"
}
]
}
FieldTypeDescription
slugstringThe promotion slug that failed to qualify
errorCodenumberNumeric error code identifying the reason for disqualification
errorMessagestringHuman-readable explanation of why the promotion did not qualify

Response Header

HeaderTypeDescription
X-BlinkReceipt-HashstringSHA-256 HMAC hash of the raw JSON response body, computed using your client secret as the key. Use this to verify response integrity.

Example Response

The following is an abbreviated example showing the structure of a successful response:

{
"blink_receipt_id": "0d527efb-c97f-4678-a0dd-a9f89922b121",
"is_receipt": true,
"is_blurry": false,
"is_screen": false,
"ocr_confidence": 95.0,
"merchant_name": "Walmart",
"merchant_confidence": 99,
"date": { "confidence": 99, "value": "01/15/2024" },
"time": { "confidence": 99, "value": "14:22" },
"store_street": { "confidence": 99, "value": "123 Main St" },
"store_city": { "confidence": 99, "value": "Albuquerque" },
"store_state": { "confidence": 99, "value": "NM" },
"store_zip": { "confidence": 99, "value": "87101" },
"subtotal": { "confidence": 99, "value": 95.15 },
"taxes": { "confidence": 99, "value": 7.22 },
"total": { "confidence": 99, "value": 102.37 },
"trip_confidence": 95,
"item_confidence": 100,
"products": [
{
"rpn": { "confidence": 99, "value": "1234567" },
"rsd": { "confidence": 99, "value": "KRAFT MAC & CHEESE", "original_case_value": "Kraft Mac & Cheese" },
"qty": { "confidence": 99, "value": 2 },
"price": { "confidence": 99, "value": 1.99 },
"totalPrice": { "confidence": 99, "value": 3.98 },
"brand": "Kraft",
"category": "Microwaveable Meals",
"product_name": "Kraft Macaroni & Cheese",
"size": "7.25 oz",
"upc": "021000011896",
"item_type": "retail_product",
"line": 5
}
],
"discounts": [
{
"description": { "confidence": 99, "value": "MEMBER SAVINGS" },
"price": { "confidence": 99, "value": 0.50 },
"relatedProductIndex": 0,
"line": 6
}
],
"paymentMethods": [
{
"method": { "confidence": 99, "value": "Credit Card" },
"cardType": { "confidence": 99, "value": "Visa" },
"amount": { "confidence": 99, "value": 102.37 }
}
],
"loyalty_program": true,
"isDuplicate": false
}