Product

Estimates points, cashback earned and cashback usage limits per product.

Changed on

Send an array of products with the store's external Id and current Price. Each item is estimated independently. Response order and repeated IDs are preserved. Name and PriceCurrency are optional; no currency conversion is performed.

Cashback earned

  • Points: estimated points after bonuses, limits and zero-point rules.
  • Cashback: cashback earned from those points, truncated to whole currency units.
  • CashbackPercent: earned percentage before monetary truncation, rounded upward to a whole percentage. Do not calculate it from Cashback / Price.

Cashback you can use

  • CanUseCashback: false for a restricted product; true for a permitted or unknown product, including when restrictions are disabled or empty.
  • CanUseCashbackPercent: maximum percentage of the price payable with cashback, assuming sufficient balance. Preserves the configured percentage and fractions, reduced by the monetary cap when applicable. Redemption rounding is not applied here.

A restricted product can still earn cashback. For a positive price, its CanUseCashbackPercent is 0. Without active cashback, all four cashback fields are null. For a nonpositive price, both percentage fields are null. Percentages use percentage units: 20 means 20%.

Example

With no bonuses, one point per currency unit, cashback worth 0.01 per point, a 20% usage limit and no monetary cap:

Request

[{"Id":"4571633770876","Price":2999.99}]

Product estimate

{
  "Id": "4571633770876",
  "Points": 2999,
  "Cashback": 29,
  "CashbackPercent": 1,
  "CanUseCashback": true,
  "CanUseCashbackPercent": 20
}

For a price of 200, a 30% usage limit and a monetary cap of 40, CanUseCashbackPercent is 20%.

Cart restrictions

Minimum purchase requirements are ignored here and checked on the cart. The monetary cap applies to the whole order: do not sum product estimates to authorize redemption. Actual use also depends on the customer's balance and monetary rounding at redemption.

post/v1/pvt/Product/points

Request

  • Base URL
    https://api.bonifiq.com.br
  • Auth
    HTTP basic

Request body

Idstring required

Product Id on the ecommerce platform

Pricenumber required

Current product selling price

PriceCurrencystring nullable

Optional currency label (for example, BRL). It does not select a currency or perform conversion; the calculation uses Price as supplied.

Namestring nullable

Optional product name. It does not affect product lookup, earning rules or cashback restrictions.

TradePolicyIdstring nullable

Optional trade policy (sales channel) identifier from the ecommerce platform, such as the VTEX sc. Earning rules restricted to this trade policy are included in the estimate. An unknown or empty value is ignored, so the estimate is the same as when the field is omitted.

Example request

[
  {
    "Id": "SKU-001",
    "Price": 499.99,
    "PriceCurrency": "BRL",
    "Name": "Running shoes"
  }
]

Response

An ApiResponse envelope. On success, Result contains the product estimates. Check HasError: an inactive objective or unsuccessful simulation returns an error envelope, rather than the HTTP 400 used by the public endpoints.

HasErrorboolean
ErrorMessagesstring[]
ErrorMessagestring

Example response

{
  "Result": [
    {
      "Id": "SKU-001",
      "Points": 499,
      "Cashback": 4,
      "CashbackPercent": 1,
      "CanUseCashback": true,
      "CanUseCashbackPercent": 20
    }
  ]
}

Changes

    • warning

      added the new 185.00 enum value to the ////////////// response property for the response status

    • warning

      added the new 184.00 enum value to the ////////////// response property for the response status