---
title: "Link transactions"
method: POST
path: "/api/v1/transactions/{id}/link/{counterpartTransactionId}"
tags: ["Data v1.Transaction", "ENTERPRISE"]
deprecated: true
---

# Link transactions

`POST /api/v1/transactions/{id}/link/{counterpartTransactionId}`

> **Deprecated.**

(DEPRECATED) Link two transactions, creating a transaction part for each transaction and netting out the amounts. The transactions are required to have different signs (i.e. one income and one expense). If the first transaction is -300 and the counterpart is 100, the common disposable amount is 100 and result of that is a dispensable amount of -200.

## Path parameters

- `id` string, required
- `counterpartTransactionId` string, required

## Request body

- LinkTransactionsRequest — Object holding the required amount for transaction linking
  - `amount` number, double — The amount of the transaction part. Must be same sign as the transaction. If not specified the common disposable amount will be used.

## Response `200`

The transactions were successfully linked and returned.

- LinkTransactionsResponse
  - `counterpartTransaction` Data20v1Transaction, required — unresolved $ref
  - `transaction` Data20v1Transaction, required — unresolved $ref

## Other responses

- `400` — The transaction ids were invalid.
- `404` — The transaction or the counterpart transaction was not found.
- `409` — The transactions were already linked.
- `412` — The transactions had the same signum, the part amount had a signum different from the transaction or the part amount is bigger than the dispensable amount.
- `415` — The request body, as specified by the Content-Encoding HTTP header, is not JSON

---

[API](https://skmtc.net/tink/apis/tink-api.md) · [All operations](https://skmtc.net/tink/apis/tink-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tink/tink-api/revisions/23d8982b533d/schema)
