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
Sets or updates your account configuration. All fields except results_endpoint are optional.
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 |
day_cutoff | integer | No* | — | How many days back to search for emails. Mutually exclusive with date_cutoff |
date_cutoff | integer | No* | — | UNIX timestamp representing the earliest email date to process. Mutually exclusive with day_cutoff |
use_aggregation | boolean | No | false | When true, combines multi-email order flows into a single receipt object |
return_eml | boolean | No | false | When true, includes the raw EML content in the ereceiptRawEML field of each result |
retailers | array | No | — | Array of retailer objects with per-retailer cutoff configuration |
You must specify either
day_cutoffordate_cutoffat the global level — not both, and not neither. The same rule applies per retailer in theretailersarray.
Retailer Object
Each object in the retailers array describes a specific sender address and its cutoff settings.
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Sender email address (e.g., auto-confirm@amazon.com) |
day_cutoff | integer | No* | Days back to search for this retailer |
date_cutoff | integer | No* | UNIX timestamp cutoff for this retailer |
Example Request
{
"results_endpoint": "https://your-server.com/webhooks/ereceipts",
"day_cutoff": 14,
"use_aggregation": true,
"return_eml": false,
"retailers": [
{
"email": "auto-confirm@amazon.com",
"day_cutoff": 7
},
{
"email": "noreply@ebay.com",
"day_cutoff": 30
}
]
}
Response
{
"success": true
}
On failure, the response includes an error object with a code and message. See error-handling.md for the full list of configuration-related error codes (100–114).
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 |
day_cutoff | integer | Global day cutoff setting |
date_cutoff | integer | Global date cutoff as UNIX timestamp |
use_aggregation | boolean | Whether aggregation is enabled |
return_eml | boolean | Whether raw EML is returned in results |
retailers | array | Array of configured retailer objects |
Example Response
{
"success": true,
"results_endpoint": "https://your-server.com/webhooks/ereceipts",
"day_cutoff": 14,
"use_aggregation": true,
"return_eml": false,
"retailers": [
{
"email": "auto-confirm@amazon.com",
"day_cutoff": 7
},
{
"email": "noreply@ebay.com",
"day_cutoff": 30
}
]
}
Notes
- Calling
POST /ereceipts/configoverwrites the previous configuration entirely. To add or update retailers without removing existing ones, first GET the current config and merge your changes before re-POSTing. - The
results_endpointmust be a valid, publicly reachable HTTPS URL. An invalid URL returns error code102. - For per-retailer configuration management (listing or deleting individual retailers), use the
/ereceipts/retailersendpoints described in endpoints.md.