Skip to main content

/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 member object is required in the request body to identify the member (by phoneNumber, email, membershipKey, commonExtId, shortCode, etc.)
  • The assetType parameter determines whether to retrieve gift, punch card, or all asset transactions
  • Results can be filtered by date range using fromDate and toDate
  • Pagination is supported through limit and offset parameters
  • The response does not include membershipKey since it is scoped to a single member
  • The type field reflects the campaign kind (Gift or PunchCard)

Request Details​

Method & URL​

POST /member/assets

See API Servers for the base URL to use in place of {{server}}.

Headers​

HeaderTypeRequiredDescription
x-api-keystringYesAPI key for authentication
x-source-typestringYesOrigin of the request (e.g., POS, Web)
x-source-namestringYesName of the client or integration system
x-pos-idstringYesPOS terminal identifier
x-branch-idstringYesBranch or store location identifier

Request Body​

FieldTypeRequiredDefaultDescription
memberobjectYes—Member identifier object (at least one of: membershipKey, phoneNumber, email, commonExtId, shortCode, temporaryToken, cardNumber, customIdentifier)
assetTypestringYes—Type of asset: gift, punchCard, or all
limitintegerNo40Max number of records (1–100)
offsetintegerNo0Records to skip for pagination (≥0)
fromDatestringNo—Filter start date (ISO 8601 format)
toDatestringNo—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​

FieldTypeDescription
statusstringRequest status indicator
transactionsarrayArray of transaction objects
transactionIdstringUnique identifier for the transaction (confirmation or DB _id)
confirmationstringUnique identifier for the transaction (transactionId)
createdAtstringISO 8601 timestamp of the transaction
operationstringOperation type: Punched, ReceiveAsset, RedeemAsset
typestringCampaign kind with capital letter: Gift or PunchCard
amountnumberTransaction amount
assetIdstringThe 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​

CodeDescription
101Missing X-Api-Key header
102Missing X-Source-Type header
103Missing X-Source-Name header
104Missing X-Pos-Id header
105Missing X-Branch-Id header
301Missing or invalid member object
1006Invalid or missing assetType. Must be gift, punchCard, or all
1002Invalid fromDate format. Use ISO 8601 format
1003Invalid toDate format. Use ISO 8601 format
1011Invalid limit (must be an integer between 1 and 100)
1012Invalid offset (must be an integer of 0 or more)
1010Internal server error
  • 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