Retrieves a status summary on individual items within a date range. Use a start date and end date in the following format: YYYY-MM-DD. The end date will include everything on that day.
| Parameter | Details | Description |
|---|---|---|
| startdate | path date required | Start date of the reporting period (format: YYYY-MM-DD). |
| enddate | path date required | End date of the reporting period (format: YYYY-MM-DD). |
curl "https://api-us1.stannp.com/v1/reporting/summary/:startdate/:enddate" \
-u {API_KEY}:
{
"success": true,
"data": {
"total": 2000,
"received": 0,
"printing": 0,
"handed_over": 0,
"local_delivery": 400,
"delivered": 1599,
"returned": 1,
"cancelled": 0
}
}Retrieves a list of mailpiece objects sent within the specified date range.
| Parameter | Details | Description |
|---|---|---|
| startdate | path date required | Start date of the reporting period (ISO 8601 format: YYYY-MM-DDTHH:MM:SS.SSSZ). |
| enddate | path date required | End date of the reporting period (ISO 8601 format: YYYY-MM-DDTHH:MM:SS.SSSZ). |
| status | query str optional | Status filter (e.g., handed_over, delivered, returned, etc.). |
| engaged | query str optional | Filter by engagement: "has_engaged" or leave blank for all. |
| type | query str optional | Filter by type: "campaigns" or "api". |
| tag | query str optional | Tag filter for searching by custom tags. |
| sort_by | query str optional | Field to sort by (e.g., "created", "status", etc.). |
| order_by | query str optional | Sort order: "asc" or "desc". |
| offset | query integer optional | Number of records to skip for pagination. |
| limit | query integer optional | Maximum number of records to return. |
curl "https://api-us1.stannp.com/v1/reporting/directMail/list/:startdate/:enddate" \
-u {API_KEY}:
{
"success": true,
"data": [
{
"id": 1234567890,
"timestamp": "YYYY-MM-DD HH:MM:SS",
"status": "handed_over",
"type": "postcard",
"format": "6X9",
"pdf_file": "PDF_URL_LINK",
"dispatched": "YYYY-MM-DD HH:MM:SS",
"country": "US",
"cost": 0.7,
"insert_pdf": null,
"insert_size": null,
"addons": "",
"tags": "api-send",
"postcode": "80111",
"address": "6312 S Fiddlers Green Cir",
"transactional": 0,
"track_ref": "AUY-API-28-10-25",
"campaign_id": 0,
"template_id": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
}
]
}