curl --request GET \
--url https://api.gcore.com/billing/org/v1/bonuses \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/billing/org/v1/bonuses"
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/bonuses', 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/bonuses",
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/bonuses"
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/bonuses")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/billing/org/v1/bonuses")
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": [
{
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"active_from": "2023-11-07T05:31:56Z",
"active_to": "2023-11-07T05:31:56Z",
"client_id": -1,
"amount": "<string>",
"client_company": "<string>",
"currency_char_code": "<string>",
"description": "<string>",
"product_category_ids": [
123
]
}
],
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}List Bonuses
Retrieve a list of Bonus objects.
You can use query parameters to filter, sort, and paginate the results.
curl --request GET \
--url https://api.gcore.com/billing/org/v1/bonuses \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/billing/org/v1/bonuses"
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/bonuses', 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/bonuses",
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/bonuses"
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/bonuses")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/billing/org/v1/bonuses")
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": [
{
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"active_from": "2023-11-07T05:31:56Z",
"active_to": "2023-11-07T05:31:56Z",
"client_id": -1,
"amount": "<string>",
"client_company": "<string>",
"currency_char_code": "<string>",
"description": "<string>",
"product_category_ids": [
123
]
}
],
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}Authorizations
Query Parameters
Filter by active period.
Returns items with the end of the active period on or after the specified date-time (ISO 8601/RFC 3339 format, UTC).
You can specify a date with a time separated by a space.
Examples:
&active_end_from=2025-05-15 12:00:00&active_end_from=2025-05-15T12:00:00Z
Filter by active period.
Returns items with the end of the active period on or before the specified date-time (ISO 8601/RFC 3339 format, UTC).
You can specify a date with a time separated by a space.
Examples:
&active_end_to=2025-05-15 12:00:00&active_end_to=2025-05-15T12:00:00Z
Filter by active period.
Returns items with the start of the active period on or after the specified date-time (ISO 8601/RFC 3339 format, UTC).
You can specify a date with a time separated by a space.
Examples:
&active_start_from=2025-05-15 12:00:00&active_start_from=2025-05-15T12:00:00Z
Filter by active period.
Returns items with the start of the active period on or before the specified date-time (ISO 8601/RFC 3339 format, UTC).
You can specify a date with a time separated by a space.
Examples:
&active_start_to=2025-05-15 12:00:00&active_start_to=2025-05-15T12:00:00Z
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.
id.asc- Idid.desc- Id (descending)created_at.asc- Created atcreated_at.desc- Created at (descending)active_from.asc- Active fromactive_from.desc- Active from (descending)active_to.asc- Active toactive_to.desc- Active to (descending)client_id.asc- Client idclient_id.desc- Client id (descending)amount.asc- Amountamount.desc- Amount (descending)client_company.asc- Client companyclient_company.desc- Client company (descending)
active_from.asc, active_from.desc, active_to.asc, active_to.desc, amount.asc, amount.desc, client_company.asc, client_company.desc, client_id.asc, client_id.desc, created_at.asc, created_at.desc, id.asc, id.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.
id- Id-id- Id (descending)created_at- Created at-created_at- Created at (descending)active_from- Active from-active_from- Active from (descending)active_to- Active to-active_to- Active to (descending)client_id- Client id-client_id- Client id (descending)amount- Amount-amount- Amount (descending)client_company- Client company-client_company- Client company (descending)
-active_from, -active_to, -amount, -client_company, -client_id, -created_at, -id, active_from, active_to, amount, client_company, client_id, created_at, id Was this page helpful?