curl --request POST \
--url https://api.bonifiq.com.br/v1/pvt/Customer/points \
--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/Customer/points"
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/Customer/points', 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/Customer/points",
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/Customer/points"
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/Customer/points")
.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/Customer/points")
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{
"CustomerExists": true,
"InternalId": "<string>",
"PointsBalance": 123,
"PointsToExpire": [
{
"Points": 123,
"Cashback": 123,
"When": "2023-11-07T05:31:56Z"
}
],
"CashbackBalance": 123,
"RedeemKey": "<string>",
"PointHistory": [
{
"Id": 123,
"IsCanceled": true,
"DateReceived": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-11-07T05:31:56Z",
"Amount": 123,
"CashbackAmount": 123,
"BranchId": "<string>",
"BranchName": "<string>",
"OrderOrigin": 0,
"OrderOriginDescription": "<string>",
"PointType": 123,
"PointTypeDescription": "<string>",
"OrderValue": 123,
"OrderId": "<string>"
}
],
"PendingOrders": [
{
"OrderId": "<string>",
"OrderDate": "2023-11-07T05:31:56Z",
"OrderValue": 123,
"PendingPoints": 123,
"PendingCashback": 123
}
],
"Name": "<string>"
}Retrieve the amount of points of a given customer using a body-based customer identifier.
curl --request POST \
--url https://api.bonifiq.com.br/v1/pvt/Customer/points \
--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/Customer/points"
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/Customer/points', 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/Customer/points",
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/Customer/points"
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/Customer/points")
.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/Customer/points")
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{
"CustomerExists": true,
"InternalId": "<string>",
"PointsBalance": 123,
"PointsToExpire": [
{
"Points": 123,
"Cashback": 123,
"When": "2023-11-07T05:31:56Z"
}
],
"CashbackBalance": 123,
"RedeemKey": "<string>",
"PointHistory": [
{
"Id": 123,
"IsCanceled": true,
"DateReceived": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-11-07T05:31:56Z",
"Amount": 123,
"CashbackAmount": 123,
"BranchId": "<string>",
"BranchName": "<string>",
"OrderOrigin": 0,
"OrderOriginDescription": "<string>",
"PointType": 123,
"PointTypeDescription": "<string>",
"OrderValue": 123,
"OrderId": "<string>"
}
],
"PendingOrders": [
{
"OrderId": "<string>",
"OrderDate": "2023-11-07T05:31:56Z",
"OrderValue": 123,
"PendingPoints": 123,
"PendingCashback": 123
}
],
"Name": "<string>"
}Authorizations
Use API Basic Auth Keys
Body
Customer identifier data. CustomerId remains required. When Checkout.CustomerOriginalIdSource is configured as document or email, lookup uses Customer.Document or Customer.Email respectively.
Request used by private endpoints that identify the customer in the body.
Legacy customer identifier used by the merchant platform. This field remains required.
When Checkout.CustomerOriginalIdSource is configured as document or email,
BonifiQ ignores this value for lookup and uses the configured Customer field instead.
Customer identifiers used when Checkout.CustomerOriginalIdSource
is configured as document or email.
Show child attributes
Show child attributes
Response
Customer Points Response Model
If True the customer was found on the Bonifiq DB
ID for this customer on the Bonifiq DB
Amount of points for this customer.
Show child attributes
Show child attributes
When the cashback reward is active it returns the amount (in R$) of cashback the customer have Returns 0 when the cashback is inactive
Returns a key for this given point change
A detailed list of point transactions for the customer.
Show child attributes
Show child attributes
Most recent orders still waiting to receive purchase points, with the estimated points and cashback. The estimate may change until the points are granted.
Show child attributes
Show child attributes
Was this page helpful?