Skip to main content

getBonusHistory

Getting bonus transaction history of the current user. 🔐 This method requires authorization.

Description

This method retrieves the bonus transaction history for the currently authenticated user with filtering by type, date range, discount, module and admin flag. It returns a Promise that resolves to an array of IBonusTransactionEntity objects.

Discounts.getBonusHistory(

type, dateFrom, dateTo, discountId, moduleId, isAdmin

);

Parameters schema

Schema

type: IBonusTransactionType
Transaction type filter

dateFrom: string
Start date filter

dateTo: string
End date filter

discountId: number
Discount id filter

moduleId: number
Module id filter

isAdmin: boolean
Admin filter

Examples

Minimal example

const response = await Discounts.getBonusHistory();

Example with attributes

const response = await Discounts.getBonusHistory(
'ACCRUAL',
'2026-01-01T00:00:00.000Z',
'2026-12-31T23:59:59.000Z'
);

Example response

{
"items": [],
"total": 0
}

Response schema

Schema: IBonusTransactionEntity[]

balanceId: number
Balance id.

amount: number
Transaction amount.

type: IBonusTransactionType
Transaction type.

discountId: number
Discount id.

moduleId: number
Module id.

entityIdentifier: string
Entity identifier.

comment: string
Comment.

isAdmin: boolean
Admin flag.

remainingAmount: number
Remaining amount.

triggerType: 'EVENT' | 'SCHEDULED'
Trigger type.

expiresAt: string
Expiration date.

createdAt: string
Creation date.