Customers
Retrieve customer meter balances
Provides the balance of credits for each meter associated with a customer. Meters track specific activities or resources, and this endpoint shows how much credit remains.
Usage: Useful for analyzing customer usage and planning billing adjustments, if applicable.
GET
/
customers
/
{id}
/
meter-balance
Retrieve customer meter balances
curl --request GET \
--url https://api.blink.store/v1/customers/{id}/meter-balanceimport requests
url = "https://api.blink.store/v1/customers/{id}/meter-balance"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.blink.store/v1/customers/{id}/meter-balance', 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.blink.store/v1/customers/{id}/meter-balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.blink.store/v1/customers/{id}/meter-balance"
req, _ := http.NewRequest("GET", url, nil)
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.blink.store/v1/customers/{id}/meter-balance")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/customers/{id}/meter-balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"meta": {
"total": 123
},
"data": [
{
"id": "<string>",
"meter_id": "<string>",
"subscription_id": "<string>",
"total_credits": 123,
"used_credits": 123,
"rollover_unused": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"remaining_credits": 123,
"meter": {
"id": "<string>",
"name": "<string>",
"event_name": "<string>",
"unit": "<string>"
}
}
]
}Previous
Update customer detailsUpdates a customer's details such as name, email, or status. Use this endpoint to modify customer records in the database.
Next
āI
Retrieve customer meter balances
curl --request GET \
--url https://api.blink.store/v1/customers/{id}/meter-balanceimport requests
url = "https://api.blink.store/v1/customers/{id}/meter-balance"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.blink.store/v1/customers/{id}/meter-balance', 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.blink.store/v1/customers/{id}/meter-balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.blink.store/v1/customers/{id}/meter-balance"
req, _ := http.NewRequest("GET", url, nil)
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.blink.store/v1/customers/{id}/meter-balance")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/customers/{id}/meter-balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"meta": {
"total": 123
},
"data": [
{
"id": "<string>",
"meter_id": "<string>",
"subscription_id": "<string>",
"total_credits": 123,
"used_credits": 123,
"rollover_unused": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"remaining_credits": 123,
"meter": {
"id": "<string>",
"name": "<string>",
"event_name": "<string>",
"unit": "<string>"
}
}
]
}