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,
  "Products": [
    {
      "OriginalId": 530648963003,
      "Title": "CAMISA ML SLIM VICHY MELANGE 13 2601 001 - VERDE ESCURO - 3",
      "IsActive": true,
      "ProductPrice": 499.9,
      "ProductDiscountPrice": 50.5,
      "ProductBrand": {
        "OriginalId": "Vichy",
        "Name": "VC0112"
      },
      "ProductCategory": {
        "OriginalId": "CA123",
        "Name": "Camisas",
        "ParentCategory": null
      }
    }
  ]
}
'
{
  "Customer": {
    "Id": 123,
    "OriginalId": "<string>",
    "Name": "<string>",
    "Email": "<string>",
    "Phone": "<string>",
    "Document": "<string>",
    "IsEnrolled": true,
    "CurrentTier": {
      "Name": "<string>",
      "Color": "<string>",
      "IconUrl": "<string>"
    }
  },
  "Rewards": [
    {
      "Id": 123,
      "Title": "R$50,00 de desconto",
      "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
    }
  ],
  "HasRestrictedItems": true,
  "RestrictedValue": 123,
  "EligibleValue": 123,
  "HasRewards": true,
  "ShouldValidateCustomer": true,
  "ShouldValidateCustomerSignup": 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.

Products
object[] | null

Optional: List of products for cashback eligibility validation. If provided, restricted products will be filtered and the cashback will be calculated based only on eligible items. If not provided, the full PurchaseValue will be used (backward compatible behavior).

Response

200 - application/json
Customer
object

Customer data resolved from the informed id. Can be null when the customer is not found.

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

HasRestrictedItems
boolean

True if any items were restricted from cashback eligibility. Only populated when Items are provided in the request.

RestrictedValue
number<decimal>

Total value of restricted items that cannot receive cashback. Only populated when Items are provided in the request.

EligibleValue
number<decimal>

Total value eligible for cashback (after filtering restricted items). Only populated when Items are provided in the request.

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

ShouldValidateCustomerSignup
boolean

If true the caller must validate the customer signup before considering the customer enrolled.

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