Skip to main content
GET
/
api
/
external
/
companies
/
{companyId}
/
transaction-categories
List Transaction Categories
curl --request GET \
  --url https://app.aiinsurance.io/api/external/companies/{companyId}/transaction-categories \
  --header 'Authorization: <api-key>'
import requests

url = "https://app.aiinsurance.io/api/external/companies/{companyId}/transaction-categories"

headers = {"Authorization": "<api-key>"}

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

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

fetch('https://app.aiinsurance.io/api/external/companies/{companyId}/transaction-categories', 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://app.aiinsurance.io/api/external/companies/{companyId}/transaction-categories",
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://app.aiinsurance.io/api/external/companies/{companyId}/transaction-categories"

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://app.aiinsurance.io/api/external/companies/{companyId}/transaction-categories")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.aiinsurance.io/api/external/companies/{companyId}/transaction-categories")

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
{
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "categoryId": "indemnity_invoice",
      "name": "Indemnity",
      "lineItemCategories": [],
      "isItemized": false,
      "direction": "Payable",
      "scopes": [
        {
          "entityType": "event",
          "supportedPayeeTypes": [
            "payee"
          ]
        }
      ],
      "supportsReserves": true
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440002",
      "categoryId": "alae_invoice",
      "name": "ALAE",
      "lineItemCategories": [
        {
          "categoryId": "attorney_fees_expenses",
          "name": "Attorney Fees Expenses",
          "parentTransactionCategoryId": "alae_invoice"
        },
        {
          "categoryId": "expert_fees_expenses",
          "name": "Expert Fees Expenses",
          "parentTransactionCategoryId": "alae_invoice"
        },
        {
          "categoryId": "other_alae_expenses",
          "name": "Other Alae Expenses",
          "parentTransactionCategoryId": "alae_invoice"
        }
      ],
      "isItemized": true,
      "direction": "Payable",
      "scopes": [
        {
          "entityType": "event",
          "supportedPayeeTypes": [
            "payee"
          ]
        }
      ],
      "supportsReserves": true
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440003",
      "categoryId": "policy_invoice",
      "name": "Policy Invoice",
      "lineItemCategories": [
        {
          "categoryId": "premiums",
          "name": "Premiums",
          "parentTransactionCategoryId": "policy_invoice"
        },
        {
          "categoryId": "premium_taxes",
          "name": "Premium Taxes",
          "parentTransactionCategoryId": "policy_invoice"
        }
      ],
      "isItemized": true,
      "direction": "Receivable",
      "scopes": [
        {
          "entityType": "policy",
          "supportedPayeeTypes": [
            "insured",
            "brokerage",
            "payee"
          ]
        }
      ],
      "supportsReserves": false
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655440004",
      "categoryId": "deductible_invoice",
      "name": "Deductible Invoice",
      "lineItemCategories": [],
      "isItemized": false,
      "direction": "Receivable",
      "scopes": [
        {
          "entityType": "event",
          "supportedPayeeTypes": [
            "insured"
          ]
        }
      ],
      "supportsReserves": false
    }
  ],
  "totalCount": 4
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header.

Path Parameters

companyId
string<uuid>
required

Company identifier

Response

List of transaction categories

items
object[]
totalCount
integer

Total number of transaction categories