Create balance definition
Creates balance definition and returns information
Authentication
api-keystring
The API key should be passed in the request headers as api-key for authentication.
Path parameters
pid
Loyalty Program Id
Request
Create Balance Definition Payload
name
Name of the balance definition.
unit
Unit of balance measurement.
balanceAvailabilityDurationModifier
Defines when the balance expires within the selected duration.
Allowed values:
balanceAvailabilityDurationUnit
Unit of time for balance validity.
Allowed values:
balanceAvailabilityDurationValue
Number of time units before the balance expires.
balanceExpirationDate
Fixed expiration date (dd/mm format) as an alternative to duration-based expiry.
balanceOptionAmountOvertakingStrategy
Defines whether partial credit is allowed when reaching max balance.
Allowed values:
balanceOptionCreditRounding
Defines rounding strategy for credit transactions.
Allowed values:
balanceOptionDebitRounding
Defines rounding strategy for debit transactions.
Allowed values:
description
Short description of the balance definition.
imageRef
URL of an optional image reference.
maxAmount
Maximum allowable balance amount.
maxCreditAmountLimit
Maximum credit allowed per operation.
maxDebitAmountLimit
Maximum debit allowed per operation.
meta
Additional metadata for the balance definition.
minAmount
Minimum allowable balance amount.
Response
Successful creation of balance definition
id
Unique identifier for the balance definition.
name
Name of the balance definition.
description
Short description of the balance definition.
imageRef
Optional image reference URL.
meta
Additional metadata for the balance definition.
unit
Unit of balance measurement.
minAmount
Minimum allowable balance.
maxAmount
Maximum allowable balance.
maxCreditAmountLimit
Maximum credit allowed per operation.
maxDebitAmountLimit
Maximum debit allowed per operation.
balanceOptionAmountOvertakingStrategy
Partial enables partial credit of balance if maximum balance limit is reached. Strict enables rejection of a transaction if it will breach the max balance limit.
Allowed values:
balanceOptionCreditRounding
Rounding strategy for credit transactions.
Allowed values:
balanceOptionDebitRounding
Rounding strategy for debit transactions.
Allowed values:
balanceAvailabilityDurationValue
Number of time units before the balance expires.
balanceAvailabilityDurationUnit
Unit of time for the balance availability duration.
Allowed values:
balanceAvailabilityDurationModifier
Modifier for balance availability duration. startOfPeriod causes expiry at the start of the period, endOfPeriod at the end. noModification uses the exact duration from the credit date.
Allowed values:
balanceExpirationDate
Fixed expiration date in dd/mm format. The balance expires when this date next appears in the calendar. Only one of balanceExpirationDate or balance availability duration fields can be used.
createdAt
Timestamp of balance definition creation.
updatedAt
Timestamp of the last update.
deletedAt
Timestamp of balance definition deletion (nullable).
Errors
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error