Retrieve the amount of points of a given customer
curl --request GET \
--url https://api.bonifiq.com.br/v1/pub/Customer/{id}/points \
--header 'X-BQ-ApiToken: <api-key>'import requests
url = "https://api.bonifiq.com.br/v1/pub/Customer/{id}/points"
headers = {"X-BQ-ApiToken": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BQ-ApiToken': '<api-key>'}};
fetch('https://api.bonifiq.com.br/v1/pub/Customer/{id}/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/pub/Customer/{id}/points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-BQ-ApiToken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bonifiq.com.br/v1/pub/Customer/{id}/points"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-BQ-ApiToken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bonifiq.com.br/v1/pub/Customer/{id}/points")
.header("X-BQ-ApiToken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pub/Customer/{id}/points")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-BQ-ApiToken"] = '<api-key>'
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>"
}
],
"Name": "<string>"
}Customer
Retrieve the amount of points of a given customer
GET
/
v1
/
pub
/
Customer
/
{id}
/
points
Retrieve the amount of points of a given customer
curl --request GET \
--url https://api.bonifiq.com.br/v1/pub/Customer/{id}/points \
--header 'X-BQ-ApiToken: <api-key>'import requests
url = "https://api.bonifiq.com.br/v1/pub/Customer/{id}/points"
headers = {"X-BQ-ApiToken": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BQ-ApiToken': '<api-key>'}};
fetch('https://api.bonifiq.com.br/v1/pub/Customer/{id}/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/pub/Customer/{id}/points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-BQ-ApiToken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bonifiq.com.br/v1/pub/Customer/{id}/points"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-BQ-ApiToken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bonifiq.com.br/v1/pub/Customer/{id}/points")
.header("X-BQ-ApiToken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pub/Customer/{id}/points")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-BQ-ApiToken"] = '<api-key>'
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>"
}
],
"Name": "<string>"
}Authorizations
API Tokeen
Path Parameters
Id from the client`s store
Response
200 - application/json
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
Was this page helpful?