Asset
Overview
The asset object represents a redeemable item assigned to a member: gifts, vouchers, punch cards, and similar loyalty benefits. Each asset is campaign-based and has validity constraints and status tracking.
This is the object to use for gift redemption. It is not the same as a Discount, which only reports a deal the POS already applied and cannot redeem anything.
When to Use This Object
The asset object is returned in responses from member-related endpoints when:
- Retrieving member details via
/member/details - Listing all members via
/members - Viewing transaction history with asset redemptions
Assets are issued by campaigns, not created by clients, and the full asset object is only ever returned to you, never sent. To redeem one, you do send a reference to it, in the usedAssets[] array. See Redeeming an asset below.
Field Reference
| Field | Type | Description |
|---|---|---|
campaignId | string | Unique identifier of the campaign that issued this asset |
assetKey | string | Unique identifier for this specific asset instance |
assignDate | string | ISO 8601 timestamp when the asset was assigned to the member |
status | string | Asset status: "active" (available for use) or "inactive" (expired or used) |
validFrom | string | ISO 8601 timestamp indicating when the asset becomes valid |
validUntil | string | ISO 8601 timestamp indicating when the asset expires |
assetDetails | object | Metadata object containing campaign and promotional information |
AssetDetails Object
The assetDetails object contains human-readable information about the asset:
| Field | Type | Description |
|---|---|---|
campaignId | string | Campaign identifier (matches parent asset's campaignId) |
kind | string | Asset type (e.g., "gift", "punchCard") |
name | string | Human-readable name of the asset (e.g., "Buy 1 Get 1 Free") |
description | string | Detailed description of what the asset provides |
image | string | URL to the asset's promotional image |
Sample Asset Object
{
"campaignId": "6a21b682bd293321900aad44",
"assetKey": "6OtRspANcZcM87WSEWHz",
"assignDate": "2025-02-01T09:01:02.123Z",
"status": "active",
"validFrom": "2025-11-09T23:00:00.000Z",
"validUntil": "2030-11-10T22:59:59.999Z",
"assetDetails": {
"campaignId": "6a21b682bd293321900aad44",
"kind": "gift",
"name": "Buy 1 Get 1 Free",
"description": "Buy any coffee and get another one for free. Valid for all coffee drinks.",
"image": "https://vault.uye.app/hub/assets/basicGift.png"
}
}
Asset Status Values
| Status | Description |
|---|---|
active | Asset is valid and available for redemption during qualifying transactions |
inactive | Asset has expired or been fully used and is no longer redeemable |
Asset Kinds
Common asset kind values include:
| Kind | Description |
|---|---|
gift | Promotional gift or benefit that can be redeemed once |
punchCard | Loyalty punch card asset that tracks multiple redemptions until completion |
Redeeming an asset
Redemption is two steps.
1. Read the member's assets. Call /member/details with the header x-return-assets: active. Active assets come back in member.assets[], each with its own assetKey.
2. Redeem it on the transaction. Send the asset in the usedAssets[] array of /transaction.
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Conditional | The assetKey from member.assets[]. Required unless code is sent |
code | string | Conditional | A redemption code for the asset. Required unless key is sent |
appliedAmount | number | No | Value applied, in the smallest currency unit (e.g., cents or kuruş) |
Send either key or code, not both. Sending both is rejected.
"usedAssets": [
{
"key": "6OtRspANcZcM87WSEWHz",
"appliedAmount": 500
}
]
The same usedAssets[] array can also be sent to /member/details to check a redemption before committing it. When you do, the transaction object becomes required on that request.
Do not use appliedDeals[] for this. That array only reports a deal the POS already applied, and has no redemption effect.
Best Practices
- Filter by status: When displaying assets to end users, consider filtering for
"active"assets unless the UI is designed to show historical or expired benefits - Check validity windows: Respect
validFromandvalidUntiltimestamps to ensure assets are presented within their effective date range - Display assetDetails: Use the
name,description, andimagefields fromassetDetailsto provide context to frontend applications - Track redemptions: Monitor which assets are used in transactions via
/member/transactionsor/member/member-assetsendpoints - Handle expired assets: Transition assets from
"active"to"inactive"when theirvalidUntiltimestamp passes
Related Objects
member— Contains theassetsarray in the loyalty member profiletransaction: Carries theusedAssets[]array that redeems an assetdiscount: Reports a deal the POS applied. Does not redeem anything, and is a common wrong turn when looking for gifts
Related Endpoints
/member/details— Returns member information including active and inactive assets/members— Lists all members with their assigned assets