Customer Credit Operations
curl --request GET \
--url https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations"
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))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations",
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;
}HttpResponse<String> response = Unirest.get("https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations")
.header("Authorization", "Bearer <token>")
.asString();Product Credits
Customer Credit Operations
Paginate immutable grants, consumes, denials, and adjustments
GET
/
engine
/
api
/
v1
/
customers
/
{customer_id}
/
credit-operations
Customer Credit Operations
curl --request GET \
--url https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations"
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))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations")
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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations",
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;
}HttpResponse<String> response = Unirest.get("https://api.nozle.app/engine/api/v1/customers/{customer_id}/credit-operations")
.header("Authorization", "Bearer <token>")
.asString();Base URL:
Each operation includes exact decimal amounts, status, metric and rate snapshots, occurrence time, and source-level allocations. A denied consume shows the required amount and reason but has no allocations.
A
https://api.nozle.app/engine/api/v1.
Auth: secret key only. The key requires credit_system:read. Publishable keys are rejected.
Query parameters:
credit_system_code— optional system filter;limit— an integer from 1 to 100. Omitted or empty uses the default of 50.0, a negative value, a value above 100, or a non-integer returns400 invalid_request;cursor— opaque cursor fromnext_cursor, maximum 512 bytes.
GET /customers/customer_123/credit-operations?credit_system_code=ai_credits&limit=50
Authorization: Bearer sk_nozle_...
revoke operation that takes back a paid top-up’s credits after a credit note or a lost dispute has the reason top_up_credit_note or top_up_dispute_lost. On a revoke, requested_credit_amount is what was asked to be taken back and credit_amount is what was actually revoked; the difference had already been spent. requested_credit_amount is null for other operation types. See Refunds and lost disputes.
Use next_cursor unchanged for the next page. Do not construct or decode cursors in application code.