/member/transactions
Overview
This endpoint retrieves a member's purchase history. It provides detailed information about past transactions including items purchased, payment methods, and transaction metadata.
When to Use This Endpoint
Use this endpoint in the following cases:
- To display a member's purchase history in a loyalty app or portal
- To analyze member shopping behavior and patterns
- To provide detailed receipt information for past purchases
- To support customer service inquiries about previous transactions
Key Considerations
- By default, returns transactions from the last 90 days when no date range is specified
- Results can be filtered by custom date range using
fromDateandtoDate - Pagination is supported through the
limitparameter - Includes both completed and cancelled transactions (identified by the
cancelledflag)
Request Details
Method & URL
POST /member/transactions
See API Servers for the base URL to use in place of {{server}}.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | API key for authentication |
x-source-type | string | Yes | Origin of the request (e.g., POS, Web) |
x-source-name | string | Yes | Name of the client or integration system |
x-pos-id | string | Yes | POS terminal identifier |
x-branch-id | string | Yes | Branch or store location identifier |
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
member | object | Yes | — | Member identifier (see Member reference) |
limit | integer | No | 40 | Max number of records (1-100) |
offset | integer | No | 0 | Number of records to skip for pagination (≥0) |
fromDate | string | No | 90 days ago | Filter start date (ISO 8601 format) |
toDate | string | No | Now | Filter end date (ISO 8601 format) |
Request Example
curl --location --request POST 'https://{{server}}/v1/member/transactions' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{api-key}}' \
--header 'x-source-type: POS' \
--header 'x-source-name: pos_terminal_01' \
--header 'x-pos-id: POS001' \
--header 'x-branch-id: BR001' \
--data-raw '{
"member": {
"membershipKey": "abc123"
},
"limit": 10,
"offset": 0,
"fromDate": "2024-01-01T00:00:00Z",
"toDate": "2024-12-31T23:59:59Z"
}'
Success Response
{
"status": "success",
"transactions": [
{
"createdAt": "2024-06-15T15:00:00.000Z",
"openTime": "2024-06-15T14:00:00.000Z",
"transactionId": "TXN-001",
"totalAmount": 9990,
"tags": [],
"employee": "NONE",
"sourceName": "MyPOS",
"sourceVersion": "1.0.0",
"sourceType": "POS",
"cancelled": false,
"otherDiscountsTotal": 0,
"meansOfPayment": [
{
"type": "CASH",
"amount": 9990
}
],
"items": [
{
"lineId": 1,
"code": "ITEM-001",
"name": "Coffee",
"departmentCode": "BVRG",
"departmentName": "Beverages",
"quantity": 2,
"grossAmount": 990,
"netAmount": 990,
"tags": []
}
],
"branchId": "BRANCH-01",
"posId": "POS-01",
"usedGeneralMembership": false,
"membershipKey": "abc123",
"key": "purchase-nanoid",
"confirmation": "transactions-unique-id",
"deals": [
{
"key": "62261a65d66c6be0a63c051f",
"name": "Spring 10%",
"appliedAmount": 500
}
],
"posDeals": []
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Request status indicator |
transactions | array | Array of transaction objects |
createdAt | string | ISO 8601 timestamp when transaction was created |
openTime | string | ISO 8601 timestamp when transaction was opened |
transactionId | string | The POS order id sent on the sale |
totalAmount | number | Total transaction amount |
tags | array | Transaction-level tags |
employee | string | Employee identifier |
sourceName | string | Name of the source system |
sourceVersion | string | Version of the source system |
sourceType | string | Type of source (POS, KIOSK, etc.) |
cancelled | boolean | Whether the transaction was cancelled |
otherDiscountsTotal | number | Other discounts not managed by the loyalty engine |
meansOfPayment | array | Payment methods used |
items | array | List of purchased items |
branchId | string | Branch identifier where transaction occurred |
posId | string | POS terminal identifier |
usedGeneralMembership | boolean | Whether general membership was used |
membershipKey | string | The member's membership key |
key | string | Our internal id of the stored sale |
confirmation | string | Our code for the sale, returned by /submitPurchase. Earn and gift rows in /assets and /payments carry this same code |
deals | array | Loyalty deals applied to the sale, as reported on /submitPurchase. Each entry has key (the key the POS reported, normally the deal id), name (the deal name, empty when the key matches no deal of this business) and appliedAmount (the amount the POS reported for the deal, in the smallest currency unit, or null when it reported none) |
posDeals | array | POS deals applied to the sale, as reported on /submitPurchase. Same entry shape as deals |
Error Response Examples
Missing Required Header
{
"status": "error",
"error": {
"code": "101",
"message": "Missing X-Api-Key header"
}
}
Member Not Found
{
"status": "error",
"error": {
"code": "203",
"message": "Member not found"
}
}
Invalid Date Format
{
"status": "error",
"error": {
"code": "1002",
"message": "Invalid fromDate format. Use ISO 8601 format"
}
}
Internal Server Error
{
"status": "error",
"error": {
"code": "1020",
"message": "Internal server error"
}
}
Error Codes
| Code | Description |
|---|---|
101 | Missing X-Api-Key header |
102 | Missing X-Source-Type header |
103 | Missing X-Source-Name header |
104 | Missing X-Pos-Id header |
105 | Missing X-Branch-Id header |
203 | Member not found |
1002 | Invalid fromDate format |
1003 | Invalid toDate format |
1011 | Invalid limit (must be an integer between 1 and 100) |
1012 | Invalid offset (must be an integer of 0 or more) |
1020 | Internal server error |
Related Use Cases
- Displaying member purchase history in loyalty apps
- Generating member spending reports
- Supporting customer service with transaction lookups
- Analyzing member shopping patterns and preferences
- Providing detailed receipt information for past purchases