LettrLabs API
API ReferenceOrders

Retrieve order transactions

Returns the financial transactions recorded for the orders named in the Id query parameter (a comma-separated list of order IDs), including transaction type, amounts, and discounts. Orders that cannot be processed are reported per-order with an error status rather than failing the whole request.

GET
/v1/order/transaction

Returns the financial transactions recorded for the orders named in the Id query parameter (a comma-separated list of order IDs), including transaction type, amounts, and discounts. 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/transaction?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",        "volume": 0,        "totalPrice": 0.1,        "costPerPiece": 0.1,        "email": "string",        "product": "string",        "orderStatus": "Draft",        "orderUpdatedDate": "2019-08-24T14:15:22Z",        "paidDate": "2019-08-24T14:15:22Z",        "profileId": 0,        "isCredit": true,        "transactionType": "LineItemDebit",        "transactionSubType": "HandWrittenPostCard",        "createdDate": "2019-08-24T14:15:22Z",        "detail": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "discount": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "transactions": [          {            "id": 0,            "orderId": 0,            "customerSubscriptionId": 0,            "amount": 0.1,            "description": "string",            "createdDate": "2019-08-24T14:15:22Z",            "updatedDate": "2019-08-24T14:15:22Z",            "profileId": 0,            "transactionType": "LineItemDebit",            "transactionSubType": "HandWrittenPostCard",            "isCredit": true,            "recipientSearchId": 0,            "recipientEnrichmentOrderId": 0,            "radiusMailOrderId": 0,            "hailTraceOrderId": 0          }        ]      }    ]  },  "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",        "volume": 0,        "totalPrice": 0.1,        "costPerPiece": 0.1,        "email": "string",        "product": "string",        "orderStatus": "Draft",        "orderUpdatedDate": "2019-08-24T14:15:22Z",        "paidDate": "2019-08-24T14:15:22Z",        "profileId": 0,        "isCredit": true,        "transactionType": "LineItemDebit",        "transactionSubType": "HandWrittenPostCard",        "createdDate": "2019-08-24T14:15:22Z",        "detail": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "discount": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "transactions": [          {            "id": 0,            "orderId": 0,            "customerSubscriptionId": 0,            "amount": 0.1,            "description": "string",            "createdDate": "2019-08-24T14:15:22Z",            "updatedDate": "2019-08-24T14:15:22Z",            "profileId": 0,            "transactionType": "LineItemDebit",            "transactionSubType": "HandWrittenPostCard",            "isCredit": true,            "recipientSearchId": 0,            "recipientEnrichmentOrderId": 0,            "radiusMailOrderId": 0,            "hailTraceOrderId": 0          }        ]      }    ]  },  "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",        "volume": 0,        "totalPrice": 0.1,        "costPerPiece": 0.1,        "email": "string",        "product": "string",        "orderStatus": "Draft",        "orderUpdatedDate": "2019-08-24T14:15:22Z",        "paidDate": "2019-08-24T14:15:22Z",        "profileId": 0,        "isCredit": true,        "transactionType": "LineItemDebit",        "transactionSubType": "HandWrittenPostCard",        "createdDate": "2019-08-24T14:15:22Z",        "detail": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "discount": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "transactions": [          {            "id": 0,            "orderId": 0,            "customerSubscriptionId": 0,            "amount": 0.1,            "description": "string",            "createdDate": "2019-08-24T14:15:22Z",            "updatedDate": "2019-08-24T14:15:22Z",            "profileId": 0,            "transactionType": "LineItemDebit",            "transactionSubType": "HandWrittenPostCard",            "isCredit": true,            "recipientSearchId": 0,            "recipientEnrichmentOrderId": 0,            "radiusMailOrderId": 0,            "hailTraceOrderId": 0          }        ]      }    ]  },  "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",        "volume": 0,        "totalPrice": 0.1,        "costPerPiece": 0.1,        "email": "string",        "product": "string",        "orderStatus": "Draft",        "orderUpdatedDate": "2019-08-24T14:15:22Z",        "paidDate": "2019-08-24T14:15:22Z",        "profileId": 0,        "isCredit": true,        "transactionType": "LineItemDebit",        "transactionSubType": "HandWrittenPostCard",        "createdDate": "2019-08-24T14:15:22Z",        "detail": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "discount": {          "basePrice": 0.1,          "doubleSided": 0.1,          "postagePrice": 0.1,          "extraText": 0.1,          "expedited": 0.1        },        "transactions": [          {            "id": 0,            "orderId": 0,            "customerSubscriptionId": 0,            "amount": 0.1,            "description": "string",            "createdDate": "2019-08-24T14:15:22Z",            "updatedDate": "2019-08-24T14:15:22Z",            "profileId": 0,            "transactionType": "LineItemDebit",            "transactionSubType": "HandWrittenPostCard",            "isCredit": true,            "recipientSearchId": 0,            "recipientEnrichmentOrderId": 0,            "radiusMailOrderId": 0,            "hailTraceOrderId": 0          }        ]      }    ]  },  "errorCode": "UNAUTHENTICATED",  "errors": [    "string"  ],  "hasErrors": true,  "warnings": [    "string"  ],  "hasWarnings": true,  "errorDetails": [    null  ],  "metadata": {    "property1": null,    "property2": null  }}