Categorize a transaction
curl --request POST \
--url https://api.3ringscapital.co/v1/categorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"businessId": "biz_9f2",
"description": "UBER *TRIP 2AM",
"amount": 420000,
"currency": "NGN",
"direction": "debit"
}
'import requests
url = "https://api.3ringscapital.co/v1/categorize"
payload = {
"businessId": "biz_9f2",
"description": "UBER *TRIP 2AM",
"amount": 420000,
"currency": "NGN",
"direction": "debit"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
businessId: 'biz_9f2',
description: 'UBER *TRIP 2AM',
amount: 420000,
currency: 'NGN',
direction: 'debit'
})
};
fetch('https://api.3ringscapital.co/v1/categorize', 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.3ringscapital.co/v1/categorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'businessId' => 'biz_9f2',
'description' => 'UBER *TRIP 2AM',
'amount' => 420000,
'currency' => 'NGN',
'direction' => 'debit'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.3ringscapital.co/v1/categorize"
payload := strings.NewReader("{\n \"businessId\": \"biz_9f2\",\n \"description\": \"UBER *TRIP 2AM\",\n \"amount\": 420000,\n \"currency\": \"NGN\",\n \"direction\": \"debit\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.3ringscapital.co/v1/categorize")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"businessId\": \"biz_9f2\",\n \"description\": \"UBER *TRIP 2AM\",\n \"amount\": 420000,\n \"currency\": \"NGN\",\n \"direction\": \"debit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.3ringscapital.co/v1/categorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessId\": \"biz_9f2\",\n \"description\": \"UBER *TRIP 2AM\",\n \"amount\": 420000,\n \"currency\": \"NGN\",\n \"direction\": \"debit\"\n}"
response = http.request(request)
puts response.read_body{
"accountId": "acc_travel",
"confidence": 0.94,
"accountName": "Travel & Transport",
"alternatives": [
{
"accountId": "<string>",
"confidence": 123
}
]
}{
"error": {
"type": "invalid_request",
"message": "businessId is required.",
"code": "business.missing",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "businessId is required.",
"code": "business.missing",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "businessId is required.",
"code": "business.missing",
"param": "<string>"
}
}Categorization
Categorize a transaction
Classify a transaction into a chart-of-accounts category with AI. Returns the suggested account and a confidence score; it does not post anything.
POST
/
v1
/
categorize
Categorize a transaction
curl --request POST \
--url https://api.3ringscapital.co/v1/categorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"businessId": "biz_9f2",
"description": "UBER *TRIP 2AM",
"amount": 420000,
"currency": "NGN",
"direction": "debit"
}
'import requests
url = "https://api.3ringscapital.co/v1/categorize"
payload = {
"businessId": "biz_9f2",
"description": "UBER *TRIP 2AM",
"amount": 420000,
"currency": "NGN",
"direction": "debit"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
businessId: 'biz_9f2',
description: 'UBER *TRIP 2AM',
amount: 420000,
currency: 'NGN',
direction: 'debit'
})
};
fetch('https://api.3ringscapital.co/v1/categorize', 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.3ringscapital.co/v1/categorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'businessId' => 'biz_9f2',
'description' => 'UBER *TRIP 2AM',
'amount' => 420000,
'currency' => 'NGN',
'direction' => 'debit'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.3ringscapital.co/v1/categorize"
payload := strings.NewReader("{\n \"businessId\": \"biz_9f2\",\n \"description\": \"UBER *TRIP 2AM\",\n \"amount\": 420000,\n \"currency\": \"NGN\",\n \"direction\": \"debit\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.3ringscapital.co/v1/categorize")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"businessId\": \"biz_9f2\",\n \"description\": \"UBER *TRIP 2AM\",\n \"amount\": 420000,\n \"currency\": \"NGN\",\n \"direction\": \"debit\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.3ringscapital.co/v1/categorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessId\": \"biz_9f2\",\n \"description\": \"UBER *TRIP 2AM\",\n \"amount\": 420000,\n \"currency\": \"NGN\",\n \"direction\": \"debit\"\n}"
response = http.request(request)
puts response.read_body{
"accountId": "acc_travel",
"confidence": 0.94,
"accountName": "Travel & Transport",
"alternatives": [
{
"accountId": "<string>",
"confidence": 123
}
]
}{
"error": {
"type": "invalid_request",
"message": "businessId is required.",
"code": "business.missing",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "businessId is required.",
"code": "business.missing",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "businessId is required.",
"code": "business.missing",
"param": "<string>"
}
}Authorizations
Authenticate with your secret API key as a bearer token: Authorization: Bearer 3r_live_.... Keys are issued per partner from the dashboard; use 3r_test_... against the sandbox. Never expose a secret key in client-side code.
Headers
A unique key (e.g. a UUID) that makes a write safe to retry. Replaying the same key returns the original result instead of creating a duplicate.
Maximum string length:
255Body
application/json