curl --request GET \
--url https://api.gcore.com/billing/org/v1/accounting/balances \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/billing/org/v1/accounting/balances"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/billing/org/v1/accounting/balances', 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.gcore.com/billing/org/v1/accounting/balances",
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.gcore.com/billing/org/v1/accounting/balances"
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.gcore.com/billing/org/v1/accounting/balances")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/billing/org/v1/accounting/balances")
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{
"count": 123,
"results": [
{
"acc": "<string>",
"unit_code": "<string>",
"service": "<string>",
"credit_amount": 123,
"debit_amount": 123
}
],
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}List Balances
Retrieve a list of Balance objects.
You can use query parameters to filter, sort, and paginate the results.
curl --request GET \
--url https://api.gcore.com/billing/org/v1/accounting/balances \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/billing/org/v1/accounting/balances"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/billing/org/v1/accounting/balances', 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.gcore.com/billing/org/v1/accounting/balances",
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.gcore.com/billing/org/v1/accounting/balances"
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.gcore.com/billing/org/v1/accounting/balances")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/billing/org/v1/accounting/balances")
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{
"count": 123,
"results": [
{
"acc": "<string>",
"unit_code": "<string>",
"service": "<string>",
"credit_amount": 123,
"debit_amount": 123
}
],
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}Authorizations
Query Parameters
Ordering of the results.
For ascending sort order use field.asc, for descending sort order use field.desc.
For sorting by multiple parameters write them as comma separated string: client_id.asc,id.desc.
Final stable tiebreak ordering is added except when pk sorting used.
acc.asc- Accacc.desc- Acc (descending)
acc.asc, acc.desc Ordering of the results.
This field is left for compatibility and can be deprecated in future versions. Use order_by instead.
Default sort order is ascending. Put - before value for descending sort order: -id.
For sorting by multiple parameters write them as comma separated string: -client_id,id.
Final stable tiebreak ordering is added except when pk sorting used.
acc- Acc-acc- Acc (descending)
-acc, acc Response
Request successful.
Was this page helpful?