> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.lucanto.eu/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.lucanto.eu/_mcp/server.

# Suggested bank transactions for this proforma

GET https://app.lucanto.eu/api/v1/workspaces/{workspace_id}/proformas/{id}/transaction_suggestions

Bank transactions that most likely settled this proforma — the mirror of
[`listTransactionSuggestions`](#operation/listTransactionSuggestions),
same engine, record on the other side.

Read-only. To act on one, post it to
[`pair`](#operation/pairTransaction) on the SUGGESTED TRANSACTION
(`pairable.id` here is the transaction), naming this proforma as the
pairable — pairing is always written from the transaction's side.

A paid or overpaid proforma is not searched and returns an empty list.
An overpayment is still recorded by pairing the transaction by hand.


Reference: https://docs.lucanto.eu/api-reference/api-reference/proformas/list-proforma-transaction-suggestions

## Authentication

- `Authorization` header (bearer token, required) — JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.
- `Authorization` header (bearer token, required) — Lucanto API key. Two prefixes: * `lct_pat_<random><checksum>` — personal access token (owner: User) * `lct_live_<random><checksum>` — workspace token, live data Issue keys at `/settings/api_keys` (personal) or `/:workspace_id/settings/api_keys` (workspace). Plaintext token is shown once and never again.

## Request

### Path parameters

- `workspace_id` (long, required) — Workspace ID. The numeric ID shown in your URLs.
- `id` (ResourceId, required) — Proforma ID. Either the numeric `id` or the `public_id` (`doc_…`).

### Query parameters

- `limit` (integer, optional, default: 5) — How many suggestions to return. Values above the maximum are clamped rather than rejected, and a non-positive value falls back to the default.

## Response

### 200

OK

- `data` (list of TransactionSuggestion, required)

## Errors

### 401 Unauthorized Error

Missing or invalid authentication credentials.

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description, localized to `Accept-Language`. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.

### 402 Payment Required Error

Workspace has no active subscription. Visit the upgrade URL to subscribe.

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description, localized to `Accept-Language`. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.
- `upgrade_url` (string, optional) — URL to the billing/plans page

### 403 Forbidden Error

Authenticated, but the token's scope or the user's role does not permit this action. Both the token scope and the user's role must allow the action. Also returned when a workspace token is sent to an endpoint that acts for a user (`/user`, `/user/workspaces`, devices, notification preferences, diagnostics): a workspace token has no user behind it, so use a personal access token or a JWT there.

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description, localized to `Accept-Language`. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.

### 404 Not Found Error

Resource does not exist, or exists but is not visible to the authenticated principal (cross-workspace isolation returns 404, not 403, to avoid leaking existence).

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description, localized to `Accept-Language`. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.

### 429 Too Many Requests Error

Rate limit exceeded. Retry after the window resets.

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description, localized to `Accept-Language`. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.

## Types

### ResourceId

The record's numeric `id` or its `public_id` (`doc_01h455vb4pex5vsknk084sn02q`). The bare UUID form of the `public_id` is still accepted but deprecated.

- long
- string
- string

### TransactionSuggestion

One scored pairing candidate. Computed, not stored — it has no id and nothing about it is persisted until you act on it.

- `score` (double, required) — Internal ranking value — LOWER is better, and it can be negative. A tie-breaker for `confidence`, not a stable public scale.
- `confidence` (enum, required) — Coarse bucket shown in the app. Rank on this first. At most one competing candidate in a list is `high`. When several are equally strong, none of them is, and each carries `diff.ambiguous`. The members of a split payment (`multi_tx_exact_sum`) or of one transfer paying several invoices (`multi_invoice_exact_sum`) complete each other rather than compete, so they can all be `high`.
  - Allowed values: `high`, `medium`, `low`
- `match_reasons` (list of string, required) — Signals that fired for this candidate (e.g. `vs_match`, `amount_match`, `date_proximity`, `reference_match`, `multi_tx_exact_sum`). Use these to gate auto-acceptance on a specific signal. `reference_match` means the expense's receipt id, receipt number or order number appears as a whole word in the payment's text (card descriptor, remittance information, additional information or payment reference). Only a reference mixing letters and digits, at least 6 characters long, counts. Asking from the expense's side also finds a payment the reference names outside the usual date window; asking from the transaction's side, the reference only re-ranks expenses found by amount, date, variable symbol or IBAN.
- `pairable` (TransactionSuggestionPairable, required) — The proposed counterpart, addressed the way `pair` accepts it.
- `summary` (TransactionSuggestionSummary, required) — Enough of the candidate to decide without fetching it.
- `diff` (map from string to any, optional, nullable) — Side-by-side comparison of the two records, as computed by the matching engine: `amount`, `date` (with `diff_days`), `vs`, and — for a payment split across several transactions — `multi_tx_group`. When the record is settled by a charge minus a partial refund, `refund_offset` carries that refund (`transaction_id`, `amount`, `booking_date`, `card_matched`). `reference` names the expense reference the payment quotes (`value`, `field` it came from, `found_in` — the transaction field quoting it); `ambiguous` (`count`) marks a candidate tied with others for the best score. `counterparty_match` says how the payment's counterparty was positively identified as the record's: `name` (the names agree), `iban` (the payee account is the supplier's) or `history` (this merchant's code — or, for descriptors like `FACEBK *N77V88AG54`, its part before the `*` — was already paired to this supplier). Absent when nothing confirmed it, which is not a contradiction: card descriptors often read nothing like the supplier's name. Passed through as-is; keys are present only when applicable.

### TransactionSuggestionPairable

The proposed counterpart, addressed the way `pair` accepts it.

- `id` (long, required)
- `record_type` (enum, required) — The candidate's underlying class.
  - Allowed values: `Document`, `Expense`, `Transaction`
- `type` (string, optional, nullable) — Whitelisted pairing key to post to `pair` (`invoice`, `expense`, `proforma`, `credit_note`, `loan`, …). Null for a transaction-to-transaction proposal, which `pair` cannot settle.

### TransactionSuggestionSummary

Enough of the candidate to decide without fetching it.

- `number` (string, optional, nullable) — Document number, receipt/order number, or a transaction's description.
- `counterparty` (string, optional, nullable) — Customer for a document, supplier for an expense, the resolved `display_name` for a transaction.
- `variable_symbol` (string, optional, nullable)
- `currency` (string, optional, nullable)
- `issue_date` (date, optional, nullable)
- `due_date` (date, optional, nullable)
- `amount_due` (string, optional, nullable) — What is still outstanding on the candidate.

## Examples

**Response**

```json
{
  "data": [
    {
      "score": -1.5,
      "confidence": "high",
      "match_reasons": [
        "string"
      ],
      "pairable": {
        "id": 1,
        "record_type": "Document",
        "type": "expense"
      },
      "summary": {
        "number": "string",
        "counterparty": "string",
        "variable_symbol": "string",
        "currency": "EUR",
        "issue_date": "2023-01-15",
        "due_date": "2023-01-15",
        "amount_due": "100.0"
      },
      "diff": {}
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript
const url = 'https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lucanto.eu/api/v1/workspaces/42/proformas/1/transaction_suggestions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```