Skip to main content

Response Structure

All responses are returned as application/json. A successful response uses HTTP status 200 and contains a ValidResponse object. Error responses also use 200 with an error_code field — see Error Codes.

Top-Level Fields

FieldTypeDescription
blink_receipt_idstringThe unique receipt ID created for this submission.
isDuplicatebooleantrue if the submitted receipt was detected as a duplicate of a previously submitted receipt.
duplicateBlinkReceiptIdsarray of stringsThe Blink receipt IDs of existing records that matched this submission. Only present when isDuplicate is true.
productsarray of objectsThe submitted products, each enriched with product intelligence data.
qualifiedPromotionsarray of objectsPromotions that the basket qualified for. Present when promotion validation is enabled.
unqualifiedPromosarray of objectsPromotions that were evaluated but not satisfied. Present when promotion validation is enabled.

Product Fields

Each object in the products array contains the following fields. The rpn, rsd, qty, price, fullPrice, and totalPrice fields are confidence-wrapped objects (see below). The remaining fields are product intelligence enrichments returned as plain values.

Confidence-Wrapped Fields

These fields contain a value and a confidence score (0–100) indicating how certain the system is about the extracted value.

FieldValue TypeDescription
rpnstringReceipt product number (SKU) found on the receipt.
rsdstringReceipt product description found on the receipt.
qtynumberQuantity of the item. May represent a weight when combined with a unit of measure.
pricenumberActual unit price paid (after discounts).
fullPricenumberFull item price before any coupons or discounts.
totalPricenumberTotal price paid for this line item (price x qty).

Structure of each confidence-wrapped field:

{
"confidence": 99,
"value": "<the extracted value>"
}

Product Intelligence Fields

These fields are returned as plain values and are populated by the BlinkReceipt product intelligence database.

FieldTypeDescription
brandstringThe brand of the matched product.
categorystringThe product category.
image_urlstringURL of the product image.
product_namestringFull canonical product name.
sizestringPackage size (e.g. "5 oz").
upcstringUniversal Product Code.
possible_productsarray of objectsReturned when the match is ambiguous. Each entry is a candidate product with a probability score. See table below.

possible_products Object Fields

FieldTypeDescription
brandstringBrand of the candidate product.
categorystringCategory of the candidate product.
image_urlstringImage URL of the candidate product.
product_namestringFull name of the candidate product.
sizestringPackage size of the candidate product.
upcstringUPC of the candidate product.
probabilitynumberProbability (0–1) that this candidate matches the scanned item.

Qualified Promo Fields

Each object in qualifiedPromotions contains:

FieldTypeDescription
slugstringThe promotion slug that qualified.
rewardValuenumberThe monetary value of the reward.
rewardCurrencystringCurrency of the reward (e.g. "USD").
relatedProductIndexesarray of numbersZero-based indexes of the products in the products array that triggered this promotion.
qualificationsarray of arraysWhen a promo qualifies multiple times on the same receipt, each element is an array of product indexes for that qualifying instance.
qualifiedProductListsarray of objectsDetailed per-product qualification data. See table below.

qualifiedProductLists Object Fields

FieldTypeDescription
productIndexintegerIndex of the product in the products array.
productGroupsarray of stringsThe promotion product groups this product qualified for.

Unqualified Promo Fields

Each object in unqualifiedPromos contains:

FieldTypeDescription
slugstringThe promotion slug that failed to qualify.
errorCodenumberNumeric code indicating the reason for failure.
errorMessagestringHuman-readable description of why the promotion did not qualify.

Example Response

{
"blink_receipt_id": "394dc731-d77b-4eb9-93d2-d9612b3aa8c5",
"isDuplicate": false,
"duplicateBlinkReceiptIds": [],
"products": [
{
"rpn": { "confidence": 99, "value": "00021000658435" },
"rsd": { "confidence": 99, "value": "KRAFT MAC CHEESE" },
"qty": { "confidence": 99, "value": 2 },
"price": { "confidence": 99, "value": 1.99 },
"fullPrice": { "confidence": 99, "value": 2.49 },
"totalPrice": { "confidence": 99, "value": 3.98 },
"brand": "Kraft",
"category": "Microwaveable Meals",
"image_url": "https://www.domain.com/kraft-mac-cheese.png",
"product_name": "Kraft Macaroni & Cheese Original Flavor",
"size": "7.25 oz",
"upc": "021000658435",
"possible_products": []
},
{
"rpn": { "confidence": 99, "value": "00044600012618" },
"rsd": { "confidence": 99, "value": "CLOROX WIPES 75CT" },
"qty": { "confidence": 99, "value": 1 },
"price": { "confidence": 99, "value": 4.99 },
"fullPrice": { "confidence": 99, "value": 4.99 },
"totalPrice": { "confidence": 99, "value": 4.99 },
"brand": "Clorox",
"category": "Household Cleaning",
"image_url": "https://www.domain.com/clorox-wipes.png",
"product_name": "Clorox Disinfecting Wipes, Fresh Scent, 75 Count",
"size": "75 ct",
"upc": "044600012618",
"possible_products": []
}
],
"qualifiedPromotions": [
{
"slug": "clorox-spring-promo",
"rewardValue": 2.00,
"rewardCurrency": "USD",
"relatedProductIndexes": [1],
"qualifications": [[1]],
"qualifiedProductLists": [
{
"productIndex": 1,
"productGroups": ["Clorox Cleaning Products"]
}
]
}
],
"unqualifiedPromos": [
{
"slug": "buy2-kraft-promo",
"errorCode": 1,
"errorMessage": "Minimum quantity of 3 Kraft products not met"
}
]
}