cURL
curl -X GET "https://api.metrifox.com/api/v1/credit_systems/promotional-credits?status=active" \
-H "x-api-key: your_api_key"import requests
url = "https://{defaultHost}/api/v1/credit_systems/promotional-credits"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://{defaultHost}/api/v1/credit_systems/promotional-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://{defaultHost}/api/v1/credit_systems/promotional-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 => [
"x-api-key: <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://{defaultHost}/api/v1/credit_systems/promotional-credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://{defaultHost}/api/v1/credit_systems/promotional-credits")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/api/v1/credit_systems/promotional-credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Promotional credits fetched",
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"next_page": null,
"prev_page": null
},
"data": [
{
"id": "625f5cee-259b-4994-b7eb-416b9e551f2c",
"name": "December Campaign Credit",
"description": "Bonus credits for the december promotion",
"credit_system_id": "9c1f1d2e-0000-0000-0000-000000000010",
"credit_system_name": "Token Credits",
"quantity": 500,
"reset_interval": "monthly",
"reset_anchor": null,
"starts_at": "2026-06-01T00:00:00Z",
"expires_at": "2026-09-01T00:00:00Z",
"duration_value": 3,
"duration_unit": "month",
"allow_multiple_grants": false,
"status": "active",
"is_applied": true,
"created_at": "2026-05-20T10:00:00Z",
"updated_at": "2026-05-20T10:00:00Z"
}
],
"errors": {}
}{
"message": "<string>",
"errors": {}
}Promotional Credits
List promotional credits
List promotional credits to discover the id to grant to customers
GET
/
api
/
v1
/
credit_systems
/
promotional-credits
cURL
curl -X GET "https://api.metrifox.com/api/v1/credit_systems/promotional-credits?status=active" \
-H "x-api-key: your_api_key"import requests
url = "https://{defaultHost}/api/v1/credit_systems/promotional-credits"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://{defaultHost}/api/v1/credit_systems/promotional-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://{defaultHost}/api/v1/credit_systems/promotional-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 => [
"x-api-key: <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://{defaultHost}/api/v1/credit_systems/promotional-credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://{defaultHost}/api/v1/credit_systems/promotional-credits")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/api/v1/credit_systems/promotional-credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Promotional credits fetched",
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"next_page": null,
"prev_page": null
},
"data": [
{
"id": "625f5cee-259b-4994-b7eb-416b9e551f2c",
"name": "December Campaign Credit",
"description": "Bonus credits for the december promotion",
"credit_system_id": "9c1f1d2e-0000-0000-0000-000000000010",
"credit_system_name": "Token Credits",
"quantity": 500,
"reset_interval": "monthly",
"reset_anchor": null,
"starts_at": "2026-06-01T00:00:00Z",
"expires_at": "2026-09-01T00:00:00Z",
"duration_value": 3,
"duration_unit": "month",
"allow_multiple_grants": false,
"status": "active",
"is_applied": true,
"created_at": "2026-05-20T10:00:00Z",
"updated_at": "2026-05-20T10:00:00Z"
}
],
"errors": {}
}{
"message": "<string>",
"errors": {}
}Use this to find the
id of the promotional credit you want to grant. Pass that id to the Grant promotional credit endpoint.Filter by
status (scheduled, active, expired, deactivated), by credit_system_id, or by search (matches the name). Results are paginated — see the meta object.Authorizations
Query Parameters
Filter by the credit system the promotional credit funds
Filter by lifecycle status
Available options:
scheduled, active, expired, deactivated Filter by promotional credit name
The page of results to return
Number of records per page
⌘I

