/extract/segments/from-quick-entry

Base URL https://api.babylon.app/v1

POST /extract/segments/from-quick-entry

Extract a segment entry from a natural-language sentence.

JSON request body

  • segmentLedger (optional) — name of the Babylon segment.
  • accountAlias (optional) — account alias to apply to the extracted entry.
  • quickEntry (required) — natural-language description of the trade.

Example request

POST /extract/segments/from-quick-entry
Content-Type: application/json
{
  "segmentLedger": "MyGBSegment",
  "accountAlias": "AJBell-ISA",
  "quickEntry": "We bought 100 VEVE for 10000 GBP"
}

Example response — 200

{
  "name": "Segment Ledger Entry",
  "description": "Extracted from 'We bought 100 VEVE for 10000 GBP'.",
  "columns": [
    "segmentLedger",
    "accountAlias",
    "tradeDate",
    "settleDate",
    "bourse",
    "type",
    "quantity",
    "symbol",
    "price",
    "priceCcy",
    "consideration",
    "netAmount",
    "currency",
    "commission",
    "levy",
    "vat",
    "securitiesTax"
  ],
  "columnTypes": {
    "quantity": "Decimal",
    "price": "Decimal",
    "consideration": "Decimal",
    "netAmount": "Decimal",
    "commission": "Decimal",
    "levy": "Decimal",
    "vat": "Decimal",
    "securitiesTax": "Decimal"
  },
  "rows": [
    {
      "segmentLedger": "MyGBSegment",
      "accountAlias": "AJBell-ISA",
      "tradeDate": "2026-07-21",
      "settleDate": "2026-07-23",
      "bourse": "LSE",
      "type": "Buy",
      "quantity": "100",
      "symbol": "VEVE",
      "netAmount": "-10000",
      "currency": "GBP"
    }
  ]
}

Send Accept: text/csv to receive the extracted table as CSV.

GET /extract/segments/from-quick-entry

GET accepts the same fields in the query string. The quickEntry value must be URL-encoded.

Query parameters

  • segmentLedger (optional)
  • accountAlias (optional)
  • quickEntry (required)

Example request

GET /extract/segments/from-quick-entry?segmentLedger=MyGBSegment&accountAlias=AJBell-ISA&quickEntry=We%20bought%20100%20VEVE%20for%2010000%20GBP

The response has the same shape as the POST response. Send Accept: text/csv to receive CSV.

Further reading

Developing the Segment Ledger Quick Entry explains how the parser evolved from strict phrase matching to a more flexible Subject-Verb-Object approach.

← Back to API