Skip to main content
POST
/
v1
/
pvt
/
POS
/
rewards
/
available
Returns a list of available rewards for a given customer and purchase.
curl --request POST \
  --url https://api.bonifiq.com.br/v1/pvt/POS/rewards/available \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "CustomerId": "<string>",
  "PurchaseValue": 123,
  "DiscountValue": 123
}
'
{
  "Rewards": [
    {
      "Id": 123,
      "Title": "R$50,00 de desconto",
      "RewardType": 0,
      "Value": 123,
      "CanSelectValue": true,
      "IsCashback": true,
      "Requirements": "Válido para compras acima de R$50,00.",
      "AvailableCashback": 123,
      "MaxCashbackForCurrentPurchase": 123,
      "CanUse": true,
      "Points": 123,
      "RewardCanBeCumulative": true
    }
  ],
  "HasRewards": true,
  "ShouldValidateCustomer": true,
  "AvailablePoints": 123,
  "CashbackEnabled": true,
  "AvailableCashback": 123,
  "MaxCashbackForCurrentPurchase": 123
}

Authorizations

Authorization
string
header
required

Use API Basic Auth Keys

Body

application/json
CustomerId
string

The id of the customer. It can be email or document (CPF/CNPJ). If a document use numbers only.

PurchaseValue
number<decimal>

Current value of the order. Should not contains discounts or other promotions.

DiscountValue
number<decimal> | null

If there is another discount in the order (not from BonifiQ) it can be passed here. BonifiQ use this information to return only rewards that can be used with other discounts.

Response

200 - application/json
Rewards
object[]

A list of all available rewards regardless if the user can redeem it or not. Even if the user doest not have enought points to redeem a reward it is still usefull for him

HasRewards
boolean

False if there is no available rewards to redeem. In this case the flow should proceed without showing any information to the user

ShouldValidateCustomer
boolean

If true the caller must follow the Validation flow, calling the BonifiQ API to request a token-code from customer. If false the flow can be directed to conclusion

AvailablePoints
integer<int32>

How many points the customer have. It is useful in scenarios without cashback where rewards are fully point-based.

CashbackEnabled
boolean

Returns true if exists a cashback reward. In this case the user will need to be aware of how much Cashback is Available

AvailableCashback
number<decimal>

Returns the total amount of cashback the user have. Will be 0 if CashbackEnable=false.

MaxCashbackForCurrentPurchase
number<decimal>

The maximum amount that can be used for the current purchase order value Cashback have some rules to use such as: in order to spend R$10,00 in cashback the total order value must be of at least R$50,00. In this scenario, the user could have a total amount of available cashback (AvailableCashback) of R$20,00 but as the rule requires at least R$50,00 of purchase he can only use R$10,00. That way even if the customer have a certain amount of Cashback BonifiQ caps this value to the maxium amount he can use for the current purchase, according to rules