Fetch spent credits transactions
curl --request GET \
--url https://api.generect.com/api/auth/transactions/spent_credits/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.generect.com/api/auth/transactions/spent_credits/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.generect.com/api/auth/transactions/spent_credits/', 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.generect.com/api/auth/transactions/spent_credits/",
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: <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.generect.com/api/auth/transactions/spent_credits/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.generect.com/api/auth/transactions/spent_credits/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/auth/transactions/spent_credits/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"spent_credits": {
"2025-01-01T00:00:00": {
"/api/linkedin/leads/by_icp/": -4428,
"/api/linkedin/companies/by_icp/": -39,
"/api/linkedin/company/by_link/": -5,
"/api/linkedin/lead/by_link/": -3,
"/api/linkedin/email_finder/": -1,
"platform": -9
},
"2024-12-01T00:00:00": {
"/api/linkedin/leads/by_icp/": -383,
"/api/linkedin/company/by_link/": -17,
"/api/linkedin/companies/by_icp/": -156,
"/api/linkedin/lead/by_link/": -6,
"platform": -12
},
"2024-11-01T00:00:00": {
"/api/linkedin/companies/by_icp/": -101,
"/api/linkedin/leads/by_icp/": -1720,
"platform": -1469
}
},
"total_spent_credits": -8349
}Spent amount of credits
Retrieve a list of spent credits transactions based on the specified period and date range.
GET
/
api
/
auth
/
transactions
/
spent_credits
/
Fetch spent credits transactions
curl --request GET \
--url https://api.generect.com/api/auth/transactions/spent_credits/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.generect.com/api/auth/transactions/spent_credits/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.generect.com/api/auth/transactions/spent_credits/', 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.generect.com/api/auth/transactions/spent_credits/",
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: <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.generect.com/api/auth/transactions/spent_credits/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.generect.com/api/auth/transactions/spent_credits/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.generect.com/api/auth/transactions/spent_credits/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"spent_credits": {
"2025-01-01T00:00:00": {
"/api/linkedin/leads/by_icp/": -4428,
"/api/linkedin/companies/by_icp/": -39,
"/api/linkedin/company/by_link/": -5,
"/api/linkedin/lead/by_link/": -3,
"/api/linkedin/email_finder/": -1,
"platform": -9
},
"2024-12-01T00:00:00": {
"/api/linkedin/leads/by_icp/": -383,
"/api/linkedin/company/by_link/": -17,
"/api/linkedin/companies/by_icp/": -156,
"/api/linkedin/lead/by_link/": -6,
"platform": -12
},
"2024-11-01T00:00:00": {
"/api/linkedin/companies/by_icp/": -101,
"/api/linkedin/leads/by_icp/": -1720,
"platform": -1469
}
},
"total_spent_credits": -8349
}Filtering
The/api/auth/transactions/spent_credits/ endpoint allows you to get all spent credits grouped by endpoints in the period.
Period
Must be on of:day, week, month, quarter, year.
Date
-
Date: yyyy-mm-dd
Example: 2025-01-01 -
Date and Time: yyyy-mm-ddTHH:MM:SS.ssssss
Example: 2025-01-01T02:03:04.000000
Authorizations
Use the required Token prefix. Example: Authorization: Token xxxxxxxxx
Query Parameters
Timezone for date calculations
The aggregation period for transactions
Available options:
day, week, month, quarter, year The start date for the transaction filter (ISO 8601 format)
The end date for the transaction filter (ISO 8601 format)
Response
200 - application/json
A list of transactions for the specified period and date range
Show child attributes
Show child attributes
Example:
{
"2025-01-01T00:00:00": {
"/api/linkedin/leads/by_icp/": -4428,
"/api/linkedin/companies/by_icp/": -39,
"/api/linkedin/company/by_link/": -5,
"/api/linkedin/lead/by_link/": -3,
"/api/linkedin/email_finder/": -1,
"platform": -9
},
"2024-12-01T00:00:00": {
"/api/linkedin/leads/by_icp/": -383,
"/api/linkedin/company/by_link/": -17,
"/api/linkedin/companies/by_icp/": -156,
"/api/linkedin/lead/by_link/": -6,
"platform": -12
},
"2024-11-01T00:00:00": {
"/api/linkedin/companies/by_icp/": -101,
"/api/linkedin/leads/by_icp/": -1720,
"platform": -1469
}
}
Example:
-8349
Was this page helpful?