Making Requests
Endpoint
POST https://scan.blinkreceipt.com/purchase_validation/v14
Supported Content Types
The endpoint accepts two content types:
| Content-Type | Notes |
|---|---|
application/x-www-form-urlencoded | Products are passed as indexed fields, e.g. products[0][product_description] |
application/json | Products 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]).
| Field | Type | Required | Description |
|---|---|---|---|
license_key | string | Required | Your BlinkReceipt API license key. |
purchased_date | string | Required (form) | Purchase date from the scanned receipt in mm/dd/yyyy format. |
products | array | Required (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] | string | Required (form) | The description of the product as it appears on the receipt. |
products[n][unit_price] | number | Required (form) | The unit price of the product as it appears on the receipt. |
banner_id | integer | Optional | The banner ID returned by the initial scan. |
client_user_id | string | Optional | Client-side identifier for the end user submitting the receipt. |
long_transaction_id | string | Optional | The long transaction ID for this receipt. |
merchant_name | string | Optional | The merchant name as it was originally scanned. |
products[n][product_number] | string | Optional | The SKU of the product as it appears on the receipt. |
products[n][quantity] | number | Optional | The quantity of this product on the receipt (may be a weight). |
products[n][regular_price] | number | Optional | The regular (pre-discount) price of the product. |
promo_slugs | string | Optional | Comma-separated list of promotion slugs to validate against. Leave blank to validate against all promotions. |
purchased_time | string | Optional | Purchase time from the scanned receipt in hh:mm format. |
state | string | Optional | Two-letter state abbreviation as it was originally scanned. |
subtotal | number | Optional | Receipt subtotal as it was originally scanned. |
total | number | Optional | Receipt total as it was originally scanned. |
transaction_id | string | Optional | The transaction ID for this receipt. |
zip | string | Optional | Zip 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"