/member/assets
Overview
This endpoint retrieves asset transaction history (punch cards and gifts) for a specific identified member. Unlike /assets, this endpoint requires a specific member to be resolved and returns only that member's transactions.
When to Use This Endpoint
Use this endpoint in the following cases:
- To retrieve a specific member's gift or punch card transaction history
- To display asset history on a member-facing screen or POS terminal
- To audit or review asset activity for a particular loyalty member
- To filter a member's asset transactions by type and date range
Key Considerations
- A
memberobject is required in the request body to identify the member (byphoneNumber,email,membershipKey,commonExtId,shortCode, etc.) - The
assetTypeparameter determines whether to retrieve gift, punch card, or all asset transactions - Results can be filtered by date range using
fromDateandtoDate - Pagination is supported through
limitandoffsetparameters - The response does not include
membershipKeysince it is scoped to a single member - The
typefield reflects the campaign kind (GiftorPunchCard)
Request Details
Method & URL
POST /member/assets
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 object (at least one of: membershipKey, phoneNumber, email, commonExtId, shortCode, temporaryToken, cardNumber, customIdentifier) |
assetType | string | Yes | — | Type of asset: gift, punchCard, or all |
limit | integer | No | 40 | Max number of records (1–100) |
offset | integer | No | 0 | Records to skip for pagination (≥0) |
fromDate | string | No | — | Filter start date (ISO 8601 format) |
toDate | string | No | — | Filter end date (ISO 8601 format) |
Request Example
curl --location --request POST 'https://{{server}}/v1/member/assets' \
--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": { "phoneNumber": "905551234567" },
"assetType": "punchCard",
"limit": 20,
"offset": 0,
"fromDate": "2024-01-01T00:00:00Z",
"toDate": "2024-12-31T23:59:59Z"
}'
Success Response
{
"status": "success",
"transactions": [
{
"transactionId": "transactions-uuid-or-db-id",
"confirmation": "transactions-uuid",
"createdAt": "2024-06-15T14:30:00.000Z",
"operation": "Punched",
"type": "PunchCard",
"amount": 1,
"assetId": "campaign-object-id"
},
{
"transactionId": "transactions-uuid-or-db-id",
"confirmation": "transactions-uuid",
"createdAt": "2024-05-20T09:00:00.000Z",
"operation": "RedeemAsset",
"type": "PunchCard",
"amount": 1,
"assetId": "campaign-object-id"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Request status indicator |
transactions | array | Array of transaction objects |
transactionId | string | Unique identifier for the transaction (confirmation or DB _id) |
confirmation | string | Unique identifier for the transaction (transactionId) |
createdAt | string | ISO 8601 timestamp of the transaction |
operation | string | Operation type: Punched, ReceiveAsset, RedeemAsset |
type | string | Campaign kind with capital letter: Gift or PunchCard |
amount | number | Transaction amount |
assetId | string | The campaign/asset ID the transaction belongs to |
Error Response Examples
Missing Required Header
{
"status": "error",
"error": {
"code": "101",
"message": "Missing X-Api-Key header"
}
}
Missing or Invalid Member Object
{
"status": "error",
"error": {
"code": "301",
"message": "Missing or invalid member object"
}
}
Invalid Asset Type
{
"status": "error",
"error": {
"code": "1006",
"message": "Invalid or missing assetType. Must be 'gift', 'punchCard', or 'all'"
}
}
Invalid Date Format
{
"status": "error",
"error": {
"code": "1002",
"message": "Invalid fromDate format. Use ISO 8601 format"
}
}
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 |
301 | Missing or invalid member object |
1006 | Invalid or missing assetType. Must be gift, punchCard, or all |
1002 | Invalid fromDate format. Use ISO 8601 format |
1003 | Invalid toDate format. Use ISO 8601 format |
1010 | Internal server error |
Related Use Cases
- Displaying a member's gift and punch card history on a POS screen
- Auditing a specific member's asset redemptions and distributions
- Filtering a member's asset activity by type and date range for customer service
- Reviewing loyalty program engagement for a specific customer