Reward Balance

Reward Balances summarizes the Rewards in someone's account.

List reward balances

get

Looks up the balance for all rewards of the same type and units.

Authorizations
AuthorizationstringRequired

Authorize your requests using a tenant's API Key. Use this method of security only in server-to-server interactions.

Path parameters
tenant_aliasstringRequired

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Query parameters
accountIdstringRequired

The ID of the account to look up.

userIdstringOptional

Filters rewards by user.id.

rewardTypeFilterstring · enumOptional

Filters rewards by type.

Possible values:
Responses
200

A list of reward balances

application/json

Details of the balance of several individual rewards.

typestring · enumOptional

The type of reward.

Example: CREDITPossible values:
unitstringOptional

An identifier for the unit of the reward. E.g. "CENTS", "freemb", "freemonth". For PCT_DISCOUNT this is "%".`

Example: CENTS
countintegerOptional

"The number of rewards earned. Usually is equal to the number of successful referrals made. E.g. An account has $80 of credit due to the referral program. $60 from making referrals, $20 from being referred. The count would be 4 rewards, each worth $20. Only works for CREDIT"

totalAssignedCreditintegerOptional

The total assignedCredit for all reward credits of the same unit type. Only works with types: CREDIT

Example: 4000
totalRedeemedCreditintegerOptional

The total redeemedCredit for all reward credits of the same unit type. Only works with types: CREDIT

Example: 1490
totalPendingCreditintegerOptional

The total credit that is pending and not yet available. Only works with types: CREDIT

Example: 0
totalExpiredCreditintegerOptional

The total credit that has expired. Only works with types: CREDIT

Example: 0
totalCancelledCreditintegerOptional

The total credit that has been cancelled. Only works with types: CREDIT

Example: 0
totalDiscountPercentintegerOptional

The total discountPercent from all rewards. Only works with types: PCT_DISCOUNT

referredDiscountPercentintegerOptional

The total discountPercent from rewards with rewardSource = REFERRED Only works with types: PCT_DISCOUNT

referrerDiscountPercentintegerOptional

The total discountPercent from rewards with rewardSource = FRIEND_SIGNUP Only works with types: PCT_DISCOUNT

totalFuelTankCodesintegerOptional

The number of earned fueltank rewards. Only works with type: FUELTANK

get
/{tenant_alias}/reward/balance
cURL

Debit a reward balance

post

Used to redeem the credit earned from a referral program. Permanently debits an account balance. Works with: CREDIT.

Authorizations
AuthorizationstringRequired

Authorize your requests using a tenant's API Key. Use this method of security only in server-to-server interactions.

Path parameters
tenant_aliasstringRequired

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

Body

A request to debit a Reward Balance

accountIdstringRequired

The ID of the account to be debitted.

Example: abc123
unitstringRequired

The type of credit to be debitted. E.g. "free-months" or "cents"

Example: cents
amountintegerRequired

The amount of credit to be debitted.

Example: 200
Responses
200

Balance debitted

application/json

Details about a successful Reward Balance Debit transaction.

creditRedeemedintegerOptional

The amount of credit that was just debitted.

Example: 200
creditAvailableintegerOptional

The remaining credit in this account of the same unit type.

Example: 0
unitstringOptional

The type of credit that was just debitted.

Example: cents
post
/{tenant_alias}/credit/bulkredeem
cURL

Last updated