Docs

Parse transaction text

POST /api/v1/programmatic/transactions/parse

POST/api/v1/programmatic/transactions/parse
Transactionsv1transactions:read

Parses natural-language text into a canonical transaction draft using the PAT workspace context.

Request body

application/json

Natural-language input plus optional locale, timezone, date anchor, and current form context.

{
  "text": "wolt 42 gel yesterday",
  "locale": "en",
  "timezone": "Asia/Tbilisi",
  "reference_date": "2026-07-22"
}

Code examples

curl --request POST \
  --url 'https://api.tetri.app/api/v1/programmatic/transactions/parse' \
  --header 'Authorization: Bearer $TETRI_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{ "text": "wolt 42 gel yesterday", "locale": "en", "timezone": "Asia/Tbilisi", "reference_date": "2026-07-22" }'

Responses

200Canonical natural-language transaction draft parse.
{
  "data": {
    "type": "nl_transaction_parse",
    "id": null,
    "attributes": {
      "normalized_text": "wolt 42 gel yesterday",
      "tokens": [
        {
          "index": 0,
          "raw": "wolt",
          "normalized": "wolt",
          "start": 0,
          "end": 4,
          "kind": "word"
        }
      ],
      "candidates": [
        {
          "id": "amount:1:2:42",
          "field": "amount",
          "value": "42",
          "label": "42",
          "source": "static",
          "match_kind": "exact_alias",
          "span_start": 1,
          "span_end": 2,
          "score": 1,
          "metadata": {}
        }
      ],
      "selected": [
        {
          "id": "amount:1:2:42",
          "field": "amount",
          "value": "42",
          "label": "42",
          "source": "static",
          "match_kind": "exact_alias",
          "span_start": 1,
          "span_end": 2,
          "score": 1,
          "metadata": {}
        }
      ],
      "draft": {
        "type": "withdrawal",
        "amount": "42",
        "currency_id": "<uuid>",
        "currency_code": "GEL",
        "date": "2026-07-12",
        "occurred_at": "2026-07-12T12:00:00Z",
        "timezone": "Asia/Tbilisi",
        "source_wallet_id": "<uuid>",
        "source_account_id": "<uuid>",
        "destination_wallet_id": "<uuid>",
        "destination_account_id": "<uuid>",
        "category_id": "<uuid>",
        "tags": [
          "<string>"
        ],
        "description": "wolt"
      },
      "confidence": "high",
      "missing_fields": [
        {
          "field": "amount",
          "reason": "missing",
          "can_use_default": false
        }
      ],
      "alternatives": [
        {
          "field": "amount",
          "candidates": [
            {
              "id": "amount:1:2:42",
              "field": "amount",
              "value": "42",
              "label": "42",
              "source": "static",
              "match_kind": "exact_alias",
              "span_start": 1,
              "span_end": 2,
              "score": 1,
              "metadata": {}
            }
          ]
        }
      ],
      "warnings": [
        "invalid_local_time"
      ],
      "dictionary_version": "nl-tx-v5-2026-07-17"
    }
  }
}
400Request parameters or payload failed validation. Inspect `code` and `message`.
{
  "statusCode": 400,
  "code": "PROGRAMMATIC_PAGINATION_MODE_CONFLICT",
  "message": "<string>",
  "error": "Bad Request",
  "request_id": "8cf64dcc-0f73-4f8d-a845-3d80c1040475"
}
401The personal access token is missing, invalid, expired, or revoked.
{
  "statusCode": 400,
  "code": "PROGRAMMATIC_PAGINATION_MODE_CONFLICT",
  "message": "<string>",
  "error": "Bad Request",
  "request_id": "8cf64dcc-0f73-4f8d-a845-3d80c1040475"
}
403The token lacks the required scope or no longer has workspace access.
{
  "statusCode": 400,
  "code": "PROGRAMMATIC_PAGINATION_MODE_CONFLICT",
  "message": "<string>",
  "error": "Bad Request",
  "request_id": "8cf64dcc-0f73-4f8d-a845-3d80c1040475"
}
429The credential exceeded its request rate limit.
{
  "statusCode": 400,
  "code": "PROGRAMMATIC_PAGINATION_MODE_CONFLICT",
  "message": "<string>",
  "error": "Bad Request",
  "request_id": "8cf64dcc-0f73-4f8d-a845-3d80c1040475"
}