Reporting summary


https://dash.stannp.com/api/v1/reporting/summary/:startdate/:enddate

Retrieves a status summary on individual items within a date range. Use a start date and enddate in the following format: YYYY-MM-DD. The enddate will include everything on that day.

Tracking codes are currently in preview and should not be considered 100% reliable.

Status codes

receivedWe have received the request.
producingWe are printing or finishing the mailpiece.
handed_overWe have handed the mailpiece over to the delivery service (Royal Mail, etc).
local_deliveryThe item is at the final delivery office and will be delivered within 24 hours.
deliveredWe estimate the item has been successfully delivered.
returnedThe item was returned. Normally due to incorrect recipient details.
cancelledThe item has been cancelled before it was produced and posted.
Request
$ curl https://dash.stannp.com/api/v1/reporting/summary/2018-02-13/2018-02-13 \
-u {API_KEY}:
Response
{
    "success": true,
    "data": {
        "total": 2000,
        "received": 0,
        "printing": 0,
        "handed_over": 0,
        "local_delivery": 400,
        "delivered": 1599,
        "returned": 1,
        "cancelled": 0
    }
}

List mailpieces


https://dash.stannp.com/api/v1/reporting/list/:startdate/:enddate

You can use the offset and limit parameters in a query string for pagination as seen in the example request. Eg. ?offset=0&limit=100

Request
$ curl https://dash.stannp.com/api/v1/reporting/list/2018-02-11/2018-02-11 \
-u {API_KEY}:
Toggle Response
{
    "success": true,
    "data": {
        "singles": [
            {
                "id": "6829954",
                "timestamp": "2018-02-11 07:08:55",
                "status": "delivered",
                "type": "postcard",
                "format": "A6",
                "pdf_file": "https:\/\/dash.stannp.com\/api\/v1\/storage\/get\/bourbon\/1518386934\/pdf-production\/000000000000000-0000000.pdf",
                "dispatched": "2018-02-11 15:12:52",
                "country": "GB",
                "cost": "0.42",
                "insert_pdf": null,
                "insert_size": null,
                "addons": "",
                "tags": "",
                "postcode": "EX31 1JZ",
                "address": "Unit 12 Taw Trade Park"
            },
            {
                "id": "6829955",
                "timestamp": "2018-02-11 07:08:56",
                "status": "delivered",
                "type": "postcard",
                "format": "A6",
                "pdf_file": "https:\/\/dash.stannp.com\/api\/v1\/storage\/get\/bourbon\/1518386934\/pdf-production\/000000000000000-0000000.pdf",
                "dispatched": "2018-02-11 15:12:52",
                "country": "GB",
                "cost": "0.42",
                "insert_pdf": null,
                "insert_size": null,
                "addons": "",
                "tags": "",
                "postcode": "EX31 1JZ",
                "address": "Unit 12 Taw Trade Park"
            }
        ]
    }
}