Response Structure
Scraped Forwarded Emails
Response from GET /api/emails/scraped_forwarded_emails.
Top-Level Fields
| Field | Type | Description |
|---|---|---|
data | array | List of forwarded email objects |
Email Object Fields
| Field | Type | Description |
|---|---|---|
sender | string | Email address of the receipt owner who forwarded the email |
merchant | string | Merchant name detected from the email |
email_date | string | Timestamp of the original email (ISO 8601) |
blink_receipt_id | string | Unique identifier for this receipt |
scraped_data | object | Parsed receipt data (see below) |
scraped_data Fields
| Field | Type | Description |
|---|---|---|
index | integer | Position of this result in the response array |
blinkReceiptId | string | Unique receipt identifier |
merchantName | string | Name of the merchant |
ereceiptOrderNum | string | Order number from the e-receipt |
taxes | decimal | Tax amount |
total | decimal | Order total |
products | array | Line items (see below) |
qualifiedPromotions | array | Promotions that qualified for this receipt (see below) |
unqualifiedPromotions | array | Promotions that did not qualify (see below) |
products Array
| Field | Type | Description |
|---|---|---|
productDescription | string | Raw product description from the e-receipt |
productNumber | string | Product SKU or identifier |
unitOfMeasure | string | Unit of measurement (e.g. "lbs") |
quantity | decimal | Quantity purchased |
unitPrice | decimal | Price per unit |
totalPrice | decimal | Total price for this line item |
shippingStatus | string | Shipping status for this item, if applicable |
productName | string | Enriched product name |
upc | string | Universal Product Code |
imgUrl | string | Product image URL |
category | string | Product category path (e.g. `"Grocery |
brand | string | Product brand |
size | string | Product size |
qualifiedPromotions Array
| Field | Type | Description |
|---|---|---|
slug | string | Promotion identifier |
rewardValue | decimal | Monetary value of the reward |
rewardCurrency | string | Currency of the reward (e.g. "dollars") |
qualifications | array | Array of qualifying product index arrays — each element represents one qualifying instance |
relatedProductIndices | array | Indexes of products in the products array that triggered this promotion |
unqualifiedPromotions Array
| Field | Type | Description |
|---|---|---|
slug | string | Promotion identifier |
errorCode | integer | Numeric error code for the disqualification reason |
errorMessage | string | Human-readable explanation of why the promotion did not qualify |
Example Response
{
"data": [
{
"sender": "receipt_owner@domain.com",
"merchant": "Walmart Grocery",
"email_date": "2019-08-08T00:39:30.000Z",
"blink_receipt_id": "ABCDEFGH-IJKL-MNOP-QRST-UVWXYZ123456",
"scraped_data": {
"index": 0,
"blinkReceiptId": "ABCDEFGH-IJKL-MNOP-QRST-UVWXYZ123456",
"merchantName": "Walmart Grocery",
"ereceiptOrderNum": "312312312312",
"taxes": 4.25,
"total": 178.44,
"products": [
{
"productDescription": "Banana",
"productNumber": "123123123123",
"unitOfMeasure": null,
"quantity": 2.0,
"unitPrice": 0.49,
"totalPrice": 0.98,
"shippingStatus": null,
"productName": "Yellow Bananas",
"upc": "4011",
"imgUrl": null,
"category": "Grocery|Produce|Fresh Fruit|Bananas",
"brand": null,
"size": null
}
],
"qualifiedPromotions": [
{
"slug": "a-promotion-1",
"rewardValue": 0.1,
"rewardCurrency": "dollars",
"qualifications": [[10]],
"relatedProductIndices": [10]
}
],
"unqualifiedPromotions": [
{
"slug": "a-promotion-2",
"errorCode": 99999,
"errorMessage": "Retailer Error: Receipt retailer is Merchant A. Promotion is only valid for the following retailer(s): Merchant B"
}
]
}
}
]
}
Scraped Forwarded Stats
Response from GET /api/emails/scraped_forwarded_stats.
Top-Level Fields
| Field | Type | Description |
|---|---|---|
data | array | List of stat objects |
Stat Object Fields
| Field | Type | Description |
|---|---|---|
scraped_successfully | boolean | Whether the email was successfully scraped |
attachment_type | string | Type of attachment in the email, if any |
attachment_count | integer | Number of attachments |
senders | string | JSON-encoded array of sender email addresses detected in the email |
qualified_promotions | integer | Number of promotions that qualified |
promotion_value_dollar | number | Total dollar value of qualified promotions |
fail_reason | integer | Failure reason code, if scraping failed |
user_error_type | integer | User-level error type code, if applicable |
Example Response
{
"data": [
{
"scraped_successfully": true,
"attachment_type": null,
"attachment_count": null,
"senders": "[\"grocery-wmt@walmart.com\", \"an_email@aol.com\", \"grocery@walmart.com\"]",
"qualified_promotions": 3,
"promotion_value_dollar": "0.7",
"fail_reason": null,
"user_error_type": null
}
]
}