Skip to main content

Making Requests

Endpoint

POST https://scan.blinkreceipt.com/purchase_validation/v14

Supported Content Types

The endpoint accepts two content types:

Content-TypeNotes
application/x-www-form-urlencodedProducts are passed as indexed fields, e.g. products[0][product_description]
application/jsonProducts are passed as a JSON array under the products key

Request Fields

The table below documents all accepted fields. When using form-encoding, replace the products[n] object keys with indexed bracket notation (e.g. products[0][unit_price]).

FieldTypeRequiredDescription
license_keystringRequiredYour BlinkReceipt API license key.
purchased_datestringRequired (form)Purchase date from the scanned receipt in mm/dd/yyyy format.
productsarrayRequired (JSON)Array of product objects (see product fields below). At minimum one product with product_description and unit_price is required.
products[n][product_description]stringRequired (form)The description of the product as it appears on the receipt.
products[n][unit_price]numberRequired (form)The unit price of the product as it appears on the receipt.
banner_idintegerOptionalThe banner ID returned by the initial scan.
client_user_idstringOptionalClient-side identifier for the end user submitting the receipt.
long_transaction_idstringOptionalThe long transaction ID for this receipt.
merchant_namestringOptionalThe merchant name as it was originally scanned.
products[n][product_number]stringOptionalThe SKU of the product as it appears on the receipt.
products[n][quantity]numberOptionalThe quantity of this product on the receipt (may be a weight).
products[n][regular_price]numberOptionalThe regular (pre-discount) price of the product.
promo_slugsstringOptionalComma-separated list of promotion slugs to validate against. Leave blank to validate against all promotions.
purchased_timestringOptionalPurchase time from the scanned receipt in hh:mm format.
statestringOptionalTwo-letter state abbreviation as it was originally scanned.
subtotalnumberOptionalReceipt subtotal as it was originally scanned.
totalnumberOptionalReceipt total as it was originally scanned.
transaction_idstringOptionalThe transaction ID for this receipt.
zipstringOptionalZip code as it was originally scanned.

Example Request

The following example uses JSON encoding and submits a two-product basket for full promotion validation.

{
"license_key": "YOUR_LICENSE_KEY",
"banner_id": 1042,
"transaction_id": "TXN-20240301-0042",
"purchased_date": "03/01/2024",
"purchased_time": "14:23",
"merchant_name": "Target",
"state": "CA",
"zip": "90210",
"total": 7.47,
"subtotal": 6.98,
"client_user_id": "user-abc-123",
"products": [
{
"product_description": "KRAFT MAC CHEESE",
"product_number": "00021000658435",
"unit_price": 1.99,
"regular_price": 2.49,
"quantity": 2
},
{
"product_description": "CLOROX WIPES 75CT",
"product_number": "00044600012618",
"unit_price": 4.99,
"regular_price": 4.99,
"quantity": 1
}
]
}

Equivalent Form-Encoded Request

curl -X POST https://scan.blinkreceipt.com/purchase_validation/v14 \
-d "license_key=YOUR_LICENSE_KEY" \
-d "banner_id=1042" \
-d "transaction_id=TXN-20240301-0042" \
-d "purchased_date=03/01/2024" \
-d "purchased_time=14:23" \
-d "merchant_name=Target" \
-d "state=CA" \
-d "zip=90210" \
-d "total=7.47" \
-d "subtotal=6.98" \
-d "client_user_id=user-abc-123" \
-d "products[0][product_description]=KRAFT MAC CHEESE" \
-d "products[0][product_number]=00021000658435" \
-d "products[0][unit_price]=1.99" \
-d "products[0][regular_price]=2.49" \
-d "products[0][quantity]=2" \
-d "products[1][product_description]=CLOROX WIPES 75CT" \
-d "products[1][product_number]=00044600012618" \
-d "products[1][unit_price]=4.99" \
-d "products[1][regular_price]=4.99" \
-d "products[1][quantity]=1"