Returns the latest known forecast and granted purchase points for each order.
curl --request GET \
--url https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints', 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/Reports/ListPurchasePoints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/Reports/ListPurchasePoints"
req, _ := http.NewRequest("GET", 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.get("https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"HasPublishedSnapshot": true,
"SnapshotStartedAt": "2023-11-07T05:31:56Z",
"SnapshotCompletedAt": "2023-11-07T05:31:56Z",
"LatestRunStatus": "<string>",
"StatusMessage": "<string>",
"IsInitialLoadComplete": true,
"HasPendingWork": true,
"LastSuccessfulSyncAt": "2023-11-07T05:31:56Z",
"Summary": {
"PendingPoints": 123,
"PendingCashback": 123,
"PendingOrderCount": 123,
"GrantedPoints": 123,
"GrantedCashback": 123,
"GrantedOrderCount": 123,
"CancelledOrReversedPoints": 123,
"CancelledOrReversedCashback": 123,
"CancelledOrReversedOrderCount": 123
},
"Items": [
{
"State": "<string>",
"IsCancelledOrReversed": true,
"OrderOriginalId": "<string>",
"OrderState": "<string>",
"OrderPlacementDate": "2023-11-07T05:31:56Z",
"OrderCompletedDate": "2023-11-07T05:31:56Z",
"OrderCancelledDate": "2023-11-07T05:31:56Z",
"OrderTotal": 123,
"Customer": {
"OriginalId": "<string>",
"PublicId": "<string>",
"Name": "<string>",
"Email": "<string>",
"Document": "<string>",
"Phone": "<string>"
},
"Forecast": {
"CalculatedAt": "2023-11-07T05:31:56Z",
"AvailableAt": "2023-11-07T05:31:56Z",
"IsReadyToGrant": true,
"Points": 123,
"Cashback": 123,
"Campaigns": [
{
"CampaignId": 123,
"CampaignName": "<string>",
"CampaignType": "<string>",
"BonusPoints": 123,
"BonusCashback": 123,
"AttributionSource": "<string>"
}
]
},
"Grant": {
"PointId": 123,
"GrantedAt": "2023-11-07T05:31:56Z",
"Points": 123,
"Cashback": 123,
"NetPoints": 123,
"NetCashback": 123,
"IsCashbackEstimated": true,
"Reversal": {
"Points": 123,
"Cashback": 123,
"IsFull": true
},
"Campaigns": [
{
"CampaignId": 123,
"CampaignName": "<string>",
"CampaignType": "<string>",
"BonusPoints": 123,
"BonusCashback": 123,
"AttributionSource": "<string>"
}
]
}
}
],
"TotalItemCount": 123,
"PageSize": 123,
"PageNumber": 123,
"HasNextPage": true
}Reports
Returns the latest known forecast and granted purchase points for each order.
Data comes from the latest completed daily snapshot. Date filters always use the order placement date. Pending items contain Forecast and no Grant. Granted items contain Grant and preserve Forecast when the order was observed as pending in an earlier snapshot. Historical grants may not have a Forecast. Grant keeps the persisted granted values; NetPoints, NetCashback and Reversal reflect later point reversals.
GET
/
v1
/
pvt
/
Reports
/
ListPurchasePoints
Returns the latest known forecast and granted purchase points for each order.
curl --request GET \
--url https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints', 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/Reports/ListPurchasePoints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/Reports/ListPurchasePoints"
req, _ := http.NewRequest("GET", 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.get("https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bonifiq.com.br/v1/pvt/Reports/ListPurchasePoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"HasPublishedSnapshot": true,
"SnapshotStartedAt": "2023-11-07T05:31:56Z",
"SnapshotCompletedAt": "2023-11-07T05:31:56Z",
"LatestRunStatus": "<string>",
"StatusMessage": "<string>",
"IsInitialLoadComplete": true,
"HasPendingWork": true,
"LastSuccessfulSyncAt": "2023-11-07T05:31:56Z",
"Summary": {
"PendingPoints": 123,
"PendingCashback": 123,
"PendingOrderCount": 123,
"GrantedPoints": 123,
"GrantedCashback": 123,
"GrantedOrderCount": 123,
"CancelledOrReversedPoints": 123,
"CancelledOrReversedCashback": 123,
"CancelledOrReversedOrderCount": 123
},
"Items": [
{
"State": "<string>",
"IsCancelledOrReversed": true,
"OrderOriginalId": "<string>",
"OrderState": "<string>",
"OrderPlacementDate": "2023-11-07T05:31:56Z",
"OrderCompletedDate": "2023-11-07T05:31:56Z",
"OrderCancelledDate": "2023-11-07T05:31:56Z",
"OrderTotal": 123,
"Customer": {
"OriginalId": "<string>",
"PublicId": "<string>",
"Name": "<string>",
"Email": "<string>",
"Document": "<string>",
"Phone": "<string>"
},
"Forecast": {
"CalculatedAt": "2023-11-07T05:31:56Z",
"AvailableAt": "2023-11-07T05:31:56Z",
"IsReadyToGrant": true,
"Points": 123,
"Cashback": 123,
"Campaigns": [
{
"CampaignId": 123,
"CampaignName": "<string>",
"CampaignType": "<string>",
"BonusPoints": 123,
"BonusCashback": 123,
"AttributionSource": "<string>"
}
]
},
"Grant": {
"PointId": 123,
"GrantedAt": "2023-11-07T05:31:56Z",
"Points": 123,
"Cashback": 123,
"NetPoints": 123,
"NetCashback": 123,
"IsCashbackEstimated": true,
"Reversal": {
"Points": 123,
"Cashback": 123,
"IsFull": true
},
"Campaigns": [
{
"CampaignId": 123,
"CampaignName": "<string>",
"CampaignType": "<string>",
"BonusPoints": 123,
"BonusCashback": 123,
"AttributionSource": "<string>"
}
]
}
}
],
"TotalItemCount": 123,
"PageSize": 123,
"PageNumber": 123,
"HasNextPage": true
}Authorizations
Use API Basic Auth Keys
Query Parameters
0 = Granted 1 = Pending
Available options:
0, 1 0 = Exact 1 = Inferred
Available options:
0, 1 Response
200 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?