LettrLabs API
API ReferenceOrders

Retrieve order analytics

Returns engagement statistics — including per-recipient QR code scans — for the orders named in the Id query parameter (a comma-separated list of order IDs). Orders that cannot be processed are reported per-order with an error status rather than failing the whole request.

GET
/v1/order/analytics

Returns engagement statistics — including per-recipient QR code scans — for the orders named in the Id query parameter (a comma-separated list of order IDs). Orders that cannot be processed are reported per-order with an error status rather than failing the whole request.

X-API-KEY<token>

In: header

Query Parameters

id*string

Comma-separated list of order IDs, e.g. 48213,48214. Sent as Id in earlier versions of this documentation; query parameter names are matched case-insensitively, so both spellings work.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/order/analytics?id=string"
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "orders": [      {        "orderId": 0,        "status": "Success",        "qrCode": {          "totalScans": 0,          "lastScan": "2019-08-24T14:15:22Z",          "recipients": [            {              "id": 0,              "firstName": "string",              "lastName": "string",              "totalScans": "string",              "lastScan": "2019-08-24T14:15:22Z"            }          ]        },        "totalCards": 0,        "mailed": 0,        "inTransit": 0,        "localFacility": 0,        "delivered": 0,        "undeliverable": 0,        "waitingUSPS": 0,        "paidDate": "string",        "maxEstimatedDeliveredDate": "string",        "minEstimatedDeliveredDate": "string",        "postageType": "Standard",        "orderStatus": "Draft",        "campaignName": "string",        "product": "string",        "productionSpeed": "Normal"      }    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "orders": [      {        "orderId": 0,        "status": "Success",        "qrCode": {          "totalScans": 0,          "lastScan": "2019-08-24T14:15:22Z",          "recipients": [            {              "id": 0,              "firstName": "string",              "lastName": "string",              "totalScans": "string",              "lastScan": "2019-08-24T14:15:22Z"            }          ]        },        "totalCards": 0,        "mailed": 0,        "inTransit": 0,        "localFacility": 0,        "delivered": 0,        "undeliverable": 0,        "waitingUSPS": 0,        "paidDate": "string",        "maxEstimatedDeliveredDate": "string",        "minEstimatedDeliveredDate": "string",        "postageType": "Standard",        "orderStatus": "Draft",        "campaignName": "string",        "product": "string",        "productionSpeed": "Normal"      }    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "orders": [      {        "orderId": 0,        "status": "Success",        "qrCode": {          "totalScans": 0,          "lastScan": "2019-08-24T14:15:22Z",          "recipients": [            {              "id": 0,              "firstName": "string",              "lastName": "string",              "totalScans": "string",              "lastScan": "2019-08-24T14:15:22Z"            }          ]        },        "totalCards": 0,        "mailed": 0,        "inTransit": 0,        "localFacility": 0,        "delivered": 0,        "undeliverable": 0,        "waitingUSPS": 0,        "paidDate": "string",        "maxEstimatedDeliveredDate": "string",        "minEstimatedDeliveredDate": "string",        "postageType": "Standard",        "orderStatus": "Draft",        "campaignName": "string",        "product": "string",        "productionSpeed": "Normal"      }    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}
Empty
{  "profile": {    "id": 0,    "aadId": "1cbad290-069a-4527-be23-a0c144b5302d",    "email": "string",    "firstName": "string",    "lastName": "string",    "company": "string",    "created": "2019-08-24T14:15:22Z",    "shouldProcessQrCodes": true  },  "payload": {    "orderId": 0,    "status": "Success",    "orders": [      {        "orderId": 0,        "status": "Success",        "qrCode": {          "totalScans": 0,          "lastScan": "2019-08-24T14:15:22Z",          "recipients": [            {              "id": 0,              "firstName": "string",              "lastName": "string",              "totalScans": "string",              "lastScan": "2019-08-24T14:15:22Z"            }          ]        },        "totalCards": 0,        "mailed": 0,        "inTransit": 0,        "localFacility": 0,        "delivered": 0,        "undeliverable": 0,        "waitingUSPS": 0,        "paidDate": "string",        "maxEstimatedDeliveredDate": "string",        "minEstimatedDeliveredDate": "string",        "postageType": "Standard",        "orderStatus": "Draft",        "campaignName": "string",        "product": "string",        "productionSpeed": "Normal"      }    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}