Redeem a reward for the customer given on the request body
curl --request POST \
--url https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"CustomerId": "<string>",
"Customer": {
"Document": "<string>",
"Email": "<string>"
}
}
'import requests
url = "https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem"
payload = {
"CustomerId": "<string>",
"Customer": {
"Document": "<string>",
"Email": "<string>"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({CustomerId: '<string>', Customer: {Document: '<string>', Email: '<string>'}})
};
fetch('https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'CustomerId' => '<string>',
'Customer' => [
'Document' => '<string>',
'Email' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem"
payload := strings.NewReader("{\n \"CustomerId\": \"<string>\",\n \"Customer\": {\n \"Document\": \"<string>\",\n \"Email\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"CustomerId\": \"<string>\",\n \"Customer\": {\n \"Document\": \"<string>\",\n \"Email\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CustomerId\": \"<string>\",\n \"Customer\": {\n \"Document\": \"<string>\",\n \"Email\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"Items": [
{
"Id": 123,
"Points": 123,
"RewardType": 0,
"IsActive": true,
"Value": 123,
"PreTitle": "<string>",
"Title": "<string>",
"Description": "<string>",
"LongDescription": "<string>",
"HasValidDate": true,
"ValidDateStart": "2023-11-07T05:31:56Z",
"ValidDateEnd": "2023-11-07T05:31:56Z",
"HasSameCustomerUsageLimit": true,
"SameCustomerUsageLimit": 123,
"HasGlobalUsageLimit": true,
"GlobalUsageLimit": 123,
"CustomTitle": "<string>",
"UsageInstructions": "<string>",
"CustomIconUrl": "<string>",
"SendClientRedeemNotification": true,
"ClientEmailsNotification": [
"<string>"
],
"SendCustomerRedeemNotification": true,
"CustomerEmailConfigurationId": 123,
"CustomerEmailConfiguration": {
"Id": 123,
"EmailBody": "<string>",
"Subject": "<string>",
"IsActive": true,
"Type": 0,
"Variables": [
{
"Name": "<string>",
"Value": "<string>",
"Description": "<string>"
}
],
"Title": "<string>",
"Description": "<string>",
"Group": 0,
"SubType": 123,
"HideLogoIsActive": true,
"ChangeBackgroundColorIsActive": true,
"ProductsRecommendationIsActive": true,
"EmailBackgroundColor": "<string>",
"CustomCssIsActive": true,
"CustomCss": "<string>",
"ObjectiveLinkedType": 0,
"PreHeader": "<string>"
},
"CodePrefix": "<string>",
"CouponCodeLength": 123,
"CumulativeDiscount": true,
"MinimalValue": 123,
"ValidDays": 123,
"CashbackMaxPurchaseValue": 123,
"MinimumPercentPurchase": 123,
"ManualCouponGeneration": true,
"PreGeneratedCouponLists": [
{
"Id": 123,
"ListName": "<string>",
"ValidDateStart": "2023-11-07T05:31:56Z",
"ValidDateEnd": "2023-11-07T05:31:56Z",
"PreGeneratedCoupons": [
{
"Id": 123,
"OriginalId": "<string>",
"CouponCode": "<string>",
"CreatedDate": "2023-11-07T05:31:56Z",
"IsAssigned": true,
"CouponType": 0,
"CouponValue": 123,
"ValidDateStart": "2023-11-07T05:31:56Z",
"ValidDateEnd": "2023-11-07T05:31:56Z",
"CouponId": 123,
"PreGeneratedCouponListId": 123
}
],
"IsInternalList": true,
"CouponsType": 0,
"CouponsValue": 123,
"CouponCount": 123,
"UsedCoupons": 123,
"ReferralObjectiveId": 123
}
],
"Tiers": [
{
"Id": 123,
"Name": "<string>",
"Color": "<string>",
"IconUrl": "<string>",
"IsActive": true,
"IsBase": true,
"Order": 123,
"CustomerCount": 123,
"Identifier": "<string>",
"Caption": "<string>"
}
],
"AvailableCashback": 123,
"TiersCountInformation": "<string>",
"CashbackPercentage": 123,
"WebTitle": "<string>",
"IsCashbackInformativeOnly": true,
"CashbackInformativeText": "<string>",
"CashbackRules": "<string>",
"CashbackBalance": 123,
"PointBalance": 123,
"CashbackPointValue": 123,
"CashbackAmount": 123,
"MaxCashbackForCurrentPurchase": 123,
"Enabled": true,
"DisabledReason": "<string>",
"NoPointCost": true,
"RequiredToAddMoreText": "<string>",
"ShouldUseCustomInstruction": true,
"ShouldExpireCouponsWhenNotAvailableInPlatform": true,
"RewardChannel": 0,
"ProductCollections": [
"<string>"
],
"WidgetIconActive": true,
"WidgetIcon": "<string>",
"LandingPageIconActive": true,
"LandingPageIcon": "<string>",
"ValidOnlyProductCollections": [
"<string>"
],
"AllowProductCollection": true,
"ProductCollectionSelection": 0,
"HasProductCollection": true,
"EnableVtexCashbackCollectionSalesChannelRestriction": true,
"VtexCashbackCollectionSalesChannelPairs": [
"<string>"
],
"VtexCashbackCollectionSalesChannelSelection": 0,
"HasVtexCashbackCollectionSalesChannelRestriction": true,
"Rules": {
"RewardDescription": "<string>",
"NonCumulativePromotion": "<string>",
"MaximumPurchaseCashback": "<string>",
"MinimalPurchaseRequirement": "<string>",
"CouponValidityDays": "<string>",
"CouponEmailConfirmation": "<string>"
}
}
],
"TotalItemCount": 123,
"PageSize": 123,
"PageNumber": 123,
"HasNextPage": true
}RewardConfigurations
Redeem a reward for the customer given on the request body
POST
/
v1
/
pvt
/
RewardConfigurations
/
{id}
/
redeem
Redeem a reward for the customer given on the request body
curl --request POST \
--url https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"CustomerId": "<string>",
"Customer": {
"Document": "<string>",
"Email": "<string>"
}
}
'import requests
url = "https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem"
payload = {
"CustomerId": "<string>",
"Customer": {
"Document": "<string>",
"Email": "<string>"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({CustomerId: '<string>', Customer: {Document: '<string>', Email: '<string>'}})
};
fetch('https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'CustomerId' => '<string>',
'Customer' => [
'Document' => '<string>',
'Email' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem"
payload := strings.NewReader("{\n \"CustomerId\": \"<string>\",\n \"Customer\": {\n \"Document\": \"<string>\",\n \"Email\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"CustomerId\": \"<string>\",\n \"Customer\": {\n \"Document\": \"<string>\",\n \"Email\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pvt/RewardConfigurations/{id}/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"CustomerId\": \"<string>\",\n \"Customer\": {\n \"Document\": \"<string>\",\n \"Email\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"Items": [
{
"Id": 123,
"Points": 123,
"RewardType": 0,
"IsActive": true,
"Value": 123,
"PreTitle": "<string>",
"Title": "<string>",
"Description": "<string>",
"LongDescription": "<string>",
"HasValidDate": true,
"ValidDateStart": "2023-11-07T05:31:56Z",
"ValidDateEnd": "2023-11-07T05:31:56Z",
"HasSameCustomerUsageLimit": true,
"SameCustomerUsageLimit": 123,
"HasGlobalUsageLimit": true,
"GlobalUsageLimit": 123,
"CustomTitle": "<string>",
"UsageInstructions": "<string>",
"CustomIconUrl": "<string>",
"SendClientRedeemNotification": true,
"ClientEmailsNotification": [
"<string>"
],
"SendCustomerRedeemNotification": true,
"CustomerEmailConfigurationId": 123,
"CustomerEmailConfiguration": {
"Id": 123,
"EmailBody": "<string>",
"Subject": "<string>",
"IsActive": true,
"Type": 0,
"Variables": [
{
"Name": "<string>",
"Value": "<string>",
"Description": "<string>"
}
],
"Title": "<string>",
"Description": "<string>",
"Group": 0,
"SubType": 123,
"HideLogoIsActive": true,
"ChangeBackgroundColorIsActive": true,
"ProductsRecommendationIsActive": true,
"EmailBackgroundColor": "<string>",
"CustomCssIsActive": true,
"CustomCss": "<string>",
"ObjectiveLinkedType": 0,
"PreHeader": "<string>"
},
"CodePrefix": "<string>",
"CouponCodeLength": 123,
"CumulativeDiscount": true,
"MinimalValue": 123,
"ValidDays": 123,
"CashbackMaxPurchaseValue": 123,
"MinimumPercentPurchase": 123,
"ManualCouponGeneration": true,
"PreGeneratedCouponLists": [
{
"Id": 123,
"ListName": "<string>",
"ValidDateStart": "2023-11-07T05:31:56Z",
"ValidDateEnd": "2023-11-07T05:31:56Z",
"PreGeneratedCoupons": [
{
"Id": 123,
"OriginalId": "<string>",
"CouponCode": "<string>",
"CreatedDate": "2023-11-07T05:31:56Z",
"IsAssigned": true,
"CouponType": 0,
"CouponValue": 123,
"ValidDateStart": "2023-11-07T05:31:56Z",
"ValidDateEnd": "2023-11-07T05:31:56Z",
"CouponId": 123,
"PreGeneratedCouponListId": 123
}
],
"IsInternalList": true,
"CouponsType": 0,
"CouponsValue": 123,
"CouponCount": 123,
"UsedCoupons": 123,
"ReferralObjectiveId": 123
}
],
"Tiers": [
{
"Id": 123,
"Name": "<string>",
"Color": "<string>",
"IconUrl": "<string>",
"IsActive": true,
"IsBase": true,
"Order": 123,
"CustomerCount": 123,
"Identifier": "<string>",
"Caption": "<string>"
}
],
"AvailableCashback": 123,
"TiersCountInformation": "<string>",
"CashbackPercentage": 123,
"WebTitle": "<string>",
"IsCashbackInformativeOnly": true,
"CashbackInformativeText": "<string>",
"CashbackRules": "<string>",
"CashbackBalance": 123,
"PointBalance": 123,
"CashbackPointValue": 123,
"CashbackAmount": 123,
"MaxCashbackForCurrentPurchase": 123,
"Enabled": true,
"DisabledReason": "<string>",
"NoPointCost": true,
"RequiredToAddMoreText": "<string>",
"ShouldUseCustomInstruction": true,
"ShouldExpireCouponsWhenNotAvailableInPlatform": true,
"RewardChannel": 0,
"ProductCollections": [
"<string>"
],
"WidgetIconActive": true,
"WidgetIcon": "<string>",
"LandingPageIconActive": true,
"LandingPageIcon": "<string>",
"ValidOnlyProductCollections": [
"<string>"
],
"AllowProductCollection": true,
"ProductCollectionSelection": 0,
"HasProductCollection": true,
"EnableVtexCashbackCollectionSalesChannelRestriction": true,
"VtexCashbackCollectionSalesChannelPairs": [
"<string>"
],
"VtexCashbackCollectionSalesChannelSelection": 0,
"HasVtexCashbackCollectionSalesChannelRestriction": true,
"Rules": {
"RewardDescription": "<string>",
"NonCumulativePromotion": "<string>",
"MaximumPurchaseCashback": "<string>",
"MinimalPurchaseRequirement": "<string>",
"CouponValidityDays": "<string>",
"CouponEmailConfirmation": "<string>"
}
}
],
"TotalItemCount": 123,
"PageSize": 123,
"PageNumber": 123,
"HasNextPage": true
}Authorizations
Use API Basic Auth Keys
Path Parameters
Body
application/json
Customer redeem data. CustomerId remains required. When Checkout.CustomerOriginalIdSource is document or email, use Customer.Document or Customer.Email respectively.
Reward Redeem Request model
ID of the customer requesting the reward redeem. its the ID from the client store.
Optional customer identifiers. Customer.Document is required and used for lookup
when Checkout.CustomerOriginalIdSource is document; Customer.Email is required
and used for lookup when the setting is email.
Show child attributes
Show child attributes
Was this page helpful?