/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,
"membershipkeys": ["abc123"],
"key": "purchase-nanoid",
"confirmation": "transactions-unique-id"
}
]
}
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 | POS-generated transaction identifier |
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 | Internal purchase key |
confirmation | string | Unique identifier for the transaction |
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 |
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