Configuration
The configuration endpoints let you set global scraping behavior for your account and inspect the currently active settings. You must configure at least a results_endpoint before creating jobs.
POST /ereceipts/config
Replaces your account configuration.
A POST replaces the whole configuration. Any field you omit is reset to its default rather than keeping its stored value. The one exception is retailers — see Retailers below.
Method: POST
Path: /ereceipts/config
Content-Type: application/json
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
api-key | string | Yes | Your BlinkReceipt API key |
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
results_endpoint | string | Yes | — | Webhook URL where parsed results are POSTed. Must be a valid, publicly reachable HTTPS URL; an invalid URL returns error code 102 |
day_cutoff | integer | No* | null | How many days back to search for emails. Mutually exclusive with date_cutoff |
date_cutoff | integer | No* | null | Earliest email date to process, as a UNIX timestamp in seconds. Mutually exclusive with day_cutoff |
return_eml | boolean | No | false | When true, includes the raw EML content in the ereceiptRawEML field of each result |
enable_pii_scrubbing | boolean | No | false | When true, PII is redacted from ereceiptEmailSubject and ereceiptRawHTMLtext, and the email body is delivered as plain text in ereceiptRawHTMLtext instead of raw HTML in ereceiptRawHTML |
use_only_retailer_emails | boolean | No | false | When true, only the senders in your retailers list are searched. When false, default_retailer_country_list also applies |
default_retailer_country_list | array of strings | No | [] | Country codes whose retailers are searched in addition to your retailers list. See Country Codes |
retailers | array | No | stored list is kept | Array of retailer objects with per-retailer cutoff configuration |
You must specify either
day_cutoffordate_cutoffat the global level — not both, and not neither.
Country Codes
default_retailer_country_list accepts the following values. It applies only when use_only_retailer_emails is false.
| Code | Country |
|---|---|
US | United States |
UK | United Kingdom |
CA | Canada |
AU | Australia |
FR | France |
DE | Germany |
ZA | South Africa |
BE | Belgium |
NL | Netherlands |
US also covers retailers that are not assigned to a country.
Coverage varies by country. US and UK have the broadest retailer coverage; the rest are smaller. Any code outside this list is accepted but matches no retailers.
Retailers
retailers is the only field that is not reset when omitted:
| You send | Result |
|---|---|
No retailers key, or null | Stored retailer list is left untouched |
[] | All retailers are removed |
| An array of retailer objects | Stored list is replaced by what you sent |
Duplicate email values within one request are ignored after the first.
Retailer Object
Each object in the retailers array describes a specific sender and its cutoff settings.
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Sender email address (e.g., auto-confirm@amazon.com) or bare domain (e.g., amazon.com) |
day_cutoff | integer | No* | Days back to search for this retailer |
date_cutoff | integer | No* | Earliest email date for this retailer, as a UNIX timestamp in seconds |
A retailer may specify
day_cutoffordate_cutoff, but not both. A retailer with neither inherits the global cutoff.
Example Request
{
"results_endpoint": "https://your-server.com/webhooks/ereceipts",
"day_cutoff": 14,
"return_eml": false,
"enable_pii_scrubbing": true,
"retailers": [
{
"email": "auto-confirm@amazon.com",
"day_cutoff": 7
},
{
"email": "noreply@ebay.com",
"day_cutoff": 30
}
]
}
Response
Returns the stored configuration, in the same shape as GET /ereceipts/config.
{
"results_endpoint": "https://your-server.com/webhooks/ereceipts",
"return_eml": false,
"default_retailer_country_list": [],
"enable_pii_scrubbing": true,
"use_only_retailer_emails": false,
"date_cutoff": null,
"date_cutoff_iso": null,
"day_cutoff": 14,
"retailers": [
{
"email": "auto-confirm@amazon.com",
"day_cutoff": 7
},
{
"email": "noreply@ebay.com",
"day_cutoff": 30
}
]
}
On failure, the response carries a code and a message. See error-handling.md for the full list of configuration error codes.
GET /ereceipts/config
Returns the currently active configuration for your account.
Method: GET
Path: /ereceipts/config
Request Headers
| Header | Type | Required | Description |
|---|---|---|---|
api-key | string | Yes | Your BlinkReceipt API key |
Response
| Field | Type | Description |
|---|---|---|
results_endpoint | string | Configured webhook URL |
return_eml | boolean | Whether raw EML is returned in results |
default_retailer_country_list | array of strings | Configured country codes |
enable_pii_scrubbing | boolean | Whether PII is redacted from ereceiptEmailSubject and ereceiptRawHTMLtext |
use_only_retailer_emails | boolean | Whether only the retailers list is searched |
date_cutoff | integer or null | Global date cutoff as a UNIX timestamp in seconds |
date_cutoff_iso | string or null | The same cutoff as an ISO 8601 string, for readability |
day_cutoff | integer or null | Global day cutoff setting |
retailers | array | Array of configured retailer objects |
Only one of date_cutoff / date_cutoff_iso and day_cutoff is set; the other is null. The same applies to each retailer object.
If use_only_retailer_emails is false and default_retailer_country_list is not empty, the returned retailers array also includes the retailers matched by those countries. Those entries carry your global cutoff.
Example Response
{
"results_endpoint": "https://your-server.com/webhooks/ereceipts",
"return_eml": false,
"default_retailer_country_list": ["US", "UK"],
"enable_pii_scrubbing": false,
"use_only_retailer_emails": false,
"date_cutoff": 1719792000,
"date_cutoff_iso": "2024-07-01T00:00:00.000Z",
"day_cutoff": null,
"retailers": [
{
"email": "auto-confirm@amazon.com",
"day_cutoff": 7
},
{
"email": "noreply@ebay.com",
"date_cutoff": 1719792000,
"date_cutoff_iso": "2024-07-01T00:00:00.000Z"
}
]
}
Notes
POST /ereceipts/configreplaces your configuration. Send every field you want to keep, not just the ones you are changing. The exception isretailers, which is preserved when omitted.- For listing or deleting individual retailers, use the
/ereceipts/retailersendpoints described in endpoints.md.