Skip to main content
GET
/
merchant-analytics-credits-used
Get merchant credit usage
curl --request GET \
  --url https://cool.jobmojito.com/functions/v1/merchant-analytics-credits-used \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://cool.jobmojito.com/functions/v1/merchant-analytics-credits-used"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://cool.jobmojito.com/functions/v1/merchant-analytics-credits-used', 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://cool.jobmojito.com/functions/v1/merchant-analytics-credits-used",
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;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://cool.jobmojito.com/functions/v1/merchant-analytics-credits-used"

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))

}
HttpResponse<String> response = Unirest.get("https://cool.jobmojito.com/functions/v1/merchant-analytics-credits-used")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://cool.jobmojito.com/functions/v1/merchant-analytics-credits-used")

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
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "event_date": "2026-01-15T09:30:00.000Z",
      "event": "interview",
      "credit_amount": 1,
      "candidate_name": "<string>",
      "profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "profile_interview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "object_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "parent_object_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "stats": "<unknown>"
    }
  ],
  "pagination": {
    "total": 137,
    "limit": 50,
    "offset": 0,
    "has_more": true
  }
}
{
"error": "Field is required.",
"name": "interview_result_id"
}
{
"error": "Field is required.",
"name": "interview_result_id"
}
{
"error": "Field is required.",
"name": "interview_result_id"
}
{
"error": "Field is required.",
"name": "interview_result_id"
}

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Query Parameters

merchant_id
string<uuid>

Optional merchant to scope to. Admins and sub-merchant operators only; other callers always use their token's merchant.

Example:

"28106cba-1c27-4e53-b149-32113e5e8e31"

interview_id
string<uuid>

Optional interview (interview_def_set) or position (position_def_set) id to drill the credit-usage ledger down to a single interview or position. The type is detected automatically: for a position the response combines pre-screening and interview-result credits across the whole position; for an interview it returns that interview's credit events (including simulations and report translations).

limit
integer
default:50

Maximum number of records to return (1–1000).

Required range: 1 <= x <= 1000
Example:

50

offset
integer | null
default:0

Number of records to skip from the start of the result set.

Required range: x >= 0
Example:

0

Response

A page of credit-usage events with pagination metadata.

data
object[]
required

Credit-consuming analytics events for the merchant, most recent first. Each row is one billable event; the credits it consumed are in stats.credit_amount.

pagination
object
required