Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.triqai.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide will walk you through making your first transaction enrichment request with the Triqai API.

Prerequisites

Before you begin, you’ll need:
  1. A Triqai account (sign up for free)
  2. An API key from your dashboard
Don’t have an account yet? You can test the API in our Playground without signing up.

Step 1: Get Your API Key

1

Create an account

Sign up at triqai.com/register. No credit card required for the free tier.
2

Access your dashboard

Navigate to your dashboard after signing in.
3

Copy your API key

Your API key is displayed in the dashboard. It starts with triq_.
Keep your API key secure. Never expose it in client-side code or public repositories.
The fastest way to get started is with the official Node.js / TypeScript SDK:
npm install triqai

Step 3: Make Your First Request

The core operation is enriching a transaction. Here’s how to use it:
import Triqai from "triqai";

const triqai = new Triqai("YOUR_API_KEY");

const result = await triqai.transactions.enrich({
  title: "PP* #56789 MK:678321 LELLO, PORTO Ref:hwjk2-23123 PAGAMENTO",
  country: "BR",
  type: "expense",
});

console.log(result.data.transaction.category.primary.name);
console.log(result.data.entities);

Step 4: Understand the Response

A successful enrichment returns comprehensive data about the transaction. The response uses an entities array, only identified entities are included:
Response
{
  "success": true,
  "partial": false,
  "data": {
    "transaction": {
      "category": {
        "primary": {
          "name": "Books",
          "code": {
            "mcc": 5942,
            "sic": 5942,
            "naics": 451211
          }
        },
        "secondary": {
          "name": "Entertainment",
          "code": {
            "mcc": 7832,
            "sic": 7832,
            "naics": 713110
          }
        },
        "tertiary": null,
        "confidence": { "value": 100, "reasons": ["merchant_category_match"] }
      },
      "confidence": { "value": 100, "reasons": [] }
    },
    "entities": [
      {
        "type": "merchant",
        "role": "organization",
        "confidence": {
          "value": 100,
          "reasons": ["name_closely_matched", "results_consensus"]
        },
        "data": {
          "id": "f3c35551-1eb0-460f-a6bf-ce24c64e941b",
          "name": "Livraria Lello",
          "alias": ["Livraria Mais Bonita do Mundo"],
          "keywords": ["books", "literature", "culture"],
          "icon": "https://logos.triqai.com/images/livrarialellopt",
          "description": "Historic bookstore and cultural institution in Porto, Portugal",
          "color": "#002B82",
          "website": "https://livrarialello.pt",
          "domain": "livrarialello.pt"
        }
      },
      {
        "type": "location",
        "role": "store_location",
        "confidence": {
          "value": 80,
          "reasons": ["city_match", "single_result_match"]
        },
        "data": {
          "id": "9eda058e-174a-4b9a-8777-4b4d8717c5a3",
          "name": "Porto",
          "formatted": "R. das Carmelitas 144, 4050-161 Porto",
          "phoneNumber": "22 200 2037",
          "structured": {
            "city": "Porto",
            "state": "",
            "street": "R. das Carmelitas 144",
            "country": "PT",
            "timezone": "Europe/Lisbon",
            "postalCode": "4050-161",
            "coordinates": {
              "latitude": 41.1468104,
              "longitude": -8.6148718
            },
            "countryName": "Portugal"
          }
        }
      },
      {
        "type": "intermediary",
        "role": "p2p",
        "confidence": { "value": 100, "reasons": ["known_processor_match"] },
        "data": {
          "id": "b9a3152a-d735-4b8c-8bd2-e525a6b3d903",
          "name": "PayPal",
          "icon": "https://logos.triqai.com/images/paypalcom",
          "description": null,
          "color": "#002991",
          "website": "https://paypal.com",
          "domain": "paypal.com"
        }
      }
    ]
  },
  "meta": {
    "generatedAt": "2026-01-14T09:16:09.430Z",
    "requestId": "019c1da3-5541-7b4c-b20e-bb03363b3333",
    "version": "1.3.11",
    "categoryVersion": "triqai-2026.01"
  }
}

Key Response Fields

FieldDescription
successWhether the request completed successfully
partialtrue if some enrichers failed but others succeeded
data.transaction.categoryHierarchical category classification with confidence
data.transaction.confidenceOverall enrichment confidence with reason tags
data.entities[]Array of identified entities (merchant, location, intermediary, person)
data.entities[].typeEntity type: merchant, location, intermediary, or person
data.entities[].roleEntity role in the transaction context
data.entities[].confidencePer-entity confidence { value, reasons }

Step 5: Try Different Transactions

Test with various transaction types to see how Triqai handles different scenarios:
const result = await triqai.transactions.enrich({
  title: "VENMO PAYMENT TO JOHN DOE",
  country: "US",
  type: "expense",
});
// Returns an intermediary entity (Venmo, role "p2p")
// and a person entity (John Doe, role "recipient")

Next Steps

Now that you’ve made your first enrichment request, explore these resources:

Node.js / TypeScript SDK

Use the official SDK for type-safe access with built-in retries and pagination

Authentication

Learn about API key management and security best practices

Core Concepts

Understand how transaction enrichment works in detail

API Reference

Explore all available endpoints and parameters