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

pidstringRequiredformat: "uuid"
Loyalty Program Id

Request

Create Balance Definition Payload
namestringRequired<=128 characters
Name of the balance definition.
unitenumRequired
Unit of balance measurement.
balanceAvailabilityDurationModifierenumOptional
Defines when the balance expires within the selected duration.
Allowed values:
balanceAvailabilityDurationUnitenumOptional
Unit of time for balance validity.
Allowed values:
balanceAvailabilityDurationValueintegerOptional
Number of time units before the balance expires.
balanceExpirationDatedateOptional

Fixed expiration date (dd/mm format) as an alternative to duration-based expiry.

balanceOptionAmountOvertakingStrategyenumOptional
Defines whether partial credit is allowed when reaching max balance.
Allowed values:
balanceOptionCreditRoundingenumOptional
Defines rounding strategy for credit transactions.
Allowed values:
balanceOptionDebitRoundingenumOptional
Defines rounding strategy for debit transactions.
Allowed values:
descriptionstringOptional<=256 characters
Short description of the balance definition.
imageRefstringOptional
URL of an optional image reference.
maxAmountdoubleOptional
Maximum allowable balance amount.
maxCreditAmountLimitdoubleOptional
Maximum credit allowed per operation.
maxDebitAmountLimitdoubleOptional
Maximum debit allowed per operation.
metaobjectOptional
Additional metadata for the balance definition.
minAmountdoubleOptional
Minimum allowable balance amount.

Response

Successful creation of balance definition
idstringformat: "uuid"
Unique identifier for the balance definition.
namestring
Name of the balance definition.
descriptionstring
Short description of the balance definition.
imageRefstringformat: "uri"
Optional image reference URL.
metamap from strings to any
Additional metadata for the balance definition.
unitenum
Unit of balance measurement.
minAmountdouble
Minimum allowable balance.
maxAmountdouble
Maximum allowable balance.
maxCreditAmountLimitdouble
Maximum credit allowed per operation.
maxDebitAmountLimitdouble
Maximum debit allowed per operation.
balanceOptionAmountOvertakingStrategyenum
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:
balanceOptionCreditRoundingenum
Rounding strategy for credit transactions.
Allowed values:
balanceOptionDebitRoundingenum
Rounding strategy for debit transactions.
Allowed values:
balanceAvailabilityDurationValueinteger
Number of time units before the balance expires.
balanceAvailabilityDurationUnitenum
Unit of time for the balance availability duration.
Allowed values:
balanceAvailabilityDurationModifierenum
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:
balanceExpirationDatestring

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.

createdAtdatetime
Timestamp of balance definition creation.
updatedAtdatetime
Timestamp of the last update.
deletedAtdatetime

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