Skip to main content
GET
/
connectors
/
m2m
/
reports
/
cashbacks
/
report.csv
Get the Cashbacks metrics in CSV
curl --request GET \
  --url https://api.sandbox.paylead.tech/connectors/m2m/reports/cashbacks/report.csv \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.sandbox.paylead.tech/connectors/m2m/reports/cashbacks/report.csv"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.paylead.tech/connectors/m2m/reports/cashbacks/report.csv', 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.sandbox.paylead.tech/connectors/m2m/reports/cashbacks/report.csv",
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: Bearer <token>"
],
]);

$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.sandbox.paylead.tech/connectors/m2m/reports/cashbacks/report.csv"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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.sandbox.paylead.tech/connectors/m2m/reports/cashbacks/report.csv")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.paylead.tech/connectors/m2m/reports/cashbacks/report.csv")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
"id,created_at,updated_at,transaction_executed_at,transaction_id,transaction_external_id,status,consumer_status,consumer_id,segments,fees,amount,transaction_amount,playground,brand_id,brand_reference,brand_name,strategy_id,strategy_reference,strategy_channel,offer_id,offer_reference,offer_name,offer_cashback_rate,invoice_reference,payout_id,cancelled_date,pending_validation_date,validated_date,paid_in_date,paid_out_date,consumer_validation_date,consumer_pooled_date,consumer_paid_date,consumer_cancelled_date,cancellation_reason"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

consumer_status
enum<string>

Filter by consumer_status

Available options:
VALIDATION,
POOLED,
PAID,
CANCELLED
id
string<uuid>

Filter by id

payout_id
string<uuid>

Filter by payout_id

sort
enum<string>

Sort by given attribute

Available options:
id,
status,
consumer_status,
updated_at,
payout_id,
-id,
-status,
-consumer_status,
-updated_at,
-payout_id
status
enum<string>

Filter by status

Available options:
PENDING_MODERATION,
CANCELLED,
PENDING_VALIDATION,
VALIDATED,
PAID_IN,
PAID_OUT,
ERROR,
REJECTED,
PENDING_ATTRIBUTION,
NOT_ATTRIBUTED,
OVER_BUDGET,
MODERATED,
UNDER_INVESTIGATION,
LATE,
CONTROL_GROUP
updated_at
string

Filter by updated_at

Response

OK

The response is of type string.