curl --request POST \
--url https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history', 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/{id}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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/pvt/Customer/{id}/history"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/{id}/history")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"Items": [
{
"Date": "2023-11-07T05:31:56Z",
"Points": 123,
"Title": "<string>",
"PointType": 0,
"IsCanceled": true,
"CouponCode": "<string>",
"CouponRefunded": true,
"CouponIsUsed": true,
"CouponIsAvailable": true,
"CashbackDescription": "<string>",
"CashbackValue": 123,
"IsTierHistory": true,
"TierUpdate": 0,
"TierName": "<string>",
"Metadatas": [
{
"Name": "<string>",
"Value": "<string>"
}
]
}
],
"TotalItemCount": 123,
"PageSize": 123,
"PageNumber": 123,
"HasNextPage": true,
"HasError": true,
"ErrorMessages": [
"<string>"
]
}Returns the customer's paginated points and tier history
This endpoint includes tier changes. If ‘IsTierHistory’ is true, disregard the use of ‘PointType’ and use ‘TierUpdate’ instead.
On success, returns HTTP 200 with hasError: false, items and pagination metadata.
An existing customer with no history returns an empty items array.
If the customer is not found, returns HTTP 400 (Bad Request) with hasError: true
and errorMessages: ["Customer not found"], rather than HTTP 404 or a successful empty list.
This list response does not expose errorCode or customerId as an error field;
callers should check the HTTP status and hasError, and read errorMessages for details.
Pagination metadata in an error response does not represent a successful query.
curl --request POST \
--url https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history', 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/{id}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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/pvt/Customer/{id}/history"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/{id}/history")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pvt/Customer/{id}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"Items": [
{
"Date": "2023-11-07T05:31:56Z",
"Points": 123,
"Title": "<string>",
"PointType": 0,
"IsCanceled": true,
"CouponCode": "<string>",
"CouponRefunded": true,
"CouponIsUsed": true,
"CouponIsAvailable": true,
"CashbackDescription": "<string>",
"CashbackValue": 123,
"IsTierHistory": true,
"TierUpdate": 0,
"TierName": "<string>",
"Metadatas": [
{
"Name": "<string>",
"Value": "<string>"
}
]
}
],
"TotalItemCount": 123,
"PageSize": 123,
"PageNumber": 123,
"HasNextPage": true,
"HasError": true,
"ErrorMessages": [
"<string>"
]
}Authorizations
Use API Basic Auth Keys
Path Parameters
Id from the client`s store, usually email address
Query Parameters
Pagenation number
Amount of items per page, Max size is 50 items per page.
Response
Customer found; returns the requested history page, which may be empty.
Base List response model methods
Collection with the found entities on the bonifiq DB.
Show child attributes
Show child attributes
Total of rewards Configurations founds.
Pagination size
Actual Page Number
true if there is another page to be load.
If true the request had an error.
List with the error messages
Was this page helpful?