Repository avatar
Other Tools
v1.0.0
active

unira

dev.unira/unira

Reconcile two financial files: matches, review items, and what's missing on each side.

Documentation

Unira starter

Unira matches two structured files — bank vs books, invoices vs payments, or payouts vs settlements. It returns confirmed matches, items that need review, and what's missing on each side.

This repo has copy-paste examples for the live REST API and the live MCP server.

Unira is free during the beta. No card is collected. Do not upload sensitive data. Use the sample files in this repo, or anonymized files of your own.

60-second quickstart

  1. Sign up, then create an API key in the Unira console. Store it as UNIRA_API_KEY. Live keys use an rc_dev_ or rc_live_ prefix.
  2. Start the official bank-vs-books sample (no file upload; no request body). The first call creates the sample datasets, ruleset, and job. Retries return the same job.
export UNIRA_API_KEY="your-key"

curl -sS -X POST https://unira.dev/api/v1/examples/bank-books \
  -H "Authorization: Bearer $UNIRA_API_KEY"
  1. The response is a job object. Poll until status is completed (other worker states are pending, processing, failed, and quarantined):
curl -sS "https://unira.dev/api/v1/reconciliations/<job-id>" \
  -H "Authorization: Bearer $UNIRA_API_KEY"
  1. Read exceptions and download the CSV export:
curl -sS "https://unira.dev/api/v1/reconciliations/<job-id>/exceptions?page=1" \
  -H "Authorization: Bearer $UNIRA_API_KEY"

curl -sS "https://unira.dev/api/v1/reconciliations/<job-id>/export?format=csv" \
  -H "Authorization: Bearer $UNIRA_API_KEY" -o results.csv

To run the same official sample from the files in this repo (upload CSVs, create the ruleset, enqueue the job):

export UNIRA_API_KEY="your-key"
bash examples/curl/reconcile.sh
# node examples/node/reconcile.mjs
# python3 examples/python/reconcile.py

REST: your own files

All calls below use Authorization: Bearer $UNIRA_API_KEY and Content-Type: application/json. Base URL: https://unira.dev. Fields are from the live OpenAPI document.

1. Upload each side — POST /api/v1/datasets

Required: name, id_field, and exactly one of csv or records. idempotency_key is optional. A nonempty csv together with records is rejected.

For the official sample files in examples/data/:

  • Bank: id_field is bank_id. The file also has date, description, amount, reference, and currency.
  • Books: id_field is journal_id. The file also has posting_date, memo, amount, reference, vendor_customer, and currency.
curl -sS -X POST https://unira.dev/api/v1/datasets \
  -H "Authorization: Bearer $UNIRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$(python3 -c 'import json,pathlib; print(json.dumps({
    "name": "October bank",
    "id_field": "bank_id",
    "csv": pathlib.Path("examples/data/bank.csv").read_text(),
    "idempotency_key": "starter-bank-oct"
  }))')"

The 201 body includes id, name, id_field, record_count, fields, and created_at.

2. Create a ruleset — POST /api/v1/rulesets

Required: name and rules. This REST input does not accept a preset name. You can POST examples/data/ruleset.json as the body. It already has name and rules. Each rule needs id, name, priority, and conditions. Each condition needs field_a, field_b, and operator (exact, amount, or date).

The official sample maps bank date (side A) to books posting_date (side B), with exact reference/currency and amount or date tolerances.

The 201 body includes id and version.

3. Enqueue a job — POST /api/v1/reconciliations

Required body fields (this is a JSON body field, not a request header):

  • name
  • dataset_a_id
  • dataset_b_id
  • ruleset_id
  • ruleset_version
  • idempotency_key
  • use_case — one of bank_vs_ledger, invoice_vs_payment, payout_settlement, other

Use the bank dataset as side A and the books dataset as side B, so the ruleset field names match. The response status is 202.

4. Read results

  • GET /api/v1/reconciliations/{id} — job status and summary when present. On a completed job, record counts live under summary (matched_records, review_records, missing_books, missing_bank, suggested_records, billable_records, and others listed in the OpenAPI schema). There is no top-level records_billed field.
  • GET /api/v1/reconciliations/{id}/exceptions?page=1 — items other than confirmed matches. Optional classification (example: unmatched_a). Page size is fixed at 50.
  • GET /api/v1/reconciliations/{id}/results?page=1 — paged result items.
  • GET /api/v1/reconciliations/{id}/export?format=csv — CSV download of a completed job. Any other format value, or omitting it, returns JSON.
  • GET /api/v1/usage — current-period usage.

JSON request bodies are limited to 2 MiB. Rate limits: 300 requests/minute per IP and 120 requests/minute per organization.

MCP

The live server is a Streamable HTTP endpoint at https://unira.dev/api/mcp.

OAuth 2.1 (recommended). Add the URL with no auth header. Your client discovers sign-in, opens Unira's consent page, and connects.

API key. Send Authorization: Bearer <UNIRA_API_KEY>.

Claude Desktop

Copy mcp/claude-desktop.json into your Claude Desktop config (claude_desktop_config.json), or add this block under mcpServers:

{
  "mcpServers": {
    "unira": {
      "type": "http",
      "url": "https://unira.dev/api/mcp"
    }
  }
}

Then sign in when prompted. To use an API key instead, add:

"headers": {
  "Authorization": "Bearer <UNIRA_API_KEY>"
}

Cursor

Copy mcp/cursor-mcp.json into ~/.cursor/mcp.json (or your project .cursor/mcp.json). The OAuth block is the same as above. Cursor can also expand an environment variable:

{
  "mcpServers": {
    "unira": {
      "type": "http",
      "url": "https://unira.dev/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:UNIRA_API_KEY}"
      }
    }
  }
}

Generic Streamable HTTP

  • URL: https://unira.dev/api/mcp
  • Transport: Streamable HTTP
  • Auth: OAuth 2.1 (no header; follow WWW-Authenticate and the OAuth discovery documents) or Authorization: Bearer <UNIRA_API_KEY>

MCP connection notes also live at https://unira.dev/docs#mcp.

What's in this repo

examples/data/bank.csv
examples/data/books.csv
examples/data/ruleset.json
examples/curl/reconcile.sh
examples/node/reconcile.mjs
examples/python/reconcile.py
mcp/claude-desktop.json
mcp/cursor-mcp.json
server.json

The sample files are the official public examples hosted at:

server.json is the Official MCP Registry manifest for the remote Unira server (dev.unira/unira). It is included so you can inspect or publish it. It does not run a local MCP process.

License

MIT. See LICENSE.

No installation packages available.

Remote