Matches
Read the match proposed for a transaction with its method and reason, and accept it, split it, book it to an entry, match a transfer, or leave it.
On this page
List matches
GET /banking/v1/matches
Returns the matches of the booked transactions of an account in pages. state keeps the matches in one state: suggested lists what is waiting for a decision.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
accountId | query | string (uuid) | Yesrequired | The bank account whose records you want. |
state | query | string | Nooptional | Only matches in this state. One of open, suggested, split, accepted, left |
limit | query | integer | Nooptional | Records per page, from 1 to 500. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of matches. | MatchPage |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The bank account does not exist in your account. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl "$RDC_BASE_URL/banking/v1/matches?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&limit=20`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&limit=20');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"items": [
{
"id": "d976e350-d423-4499-ac3d-207185a9bd4b",
"transactionId": "0dea7dcc-e56e-4654-bdf3-95fbedf34baf",
"state": "suggested",
"method": "exact",
"reason": {
"code": "exact",
"text": "The amount RON 3,168.42 equals FCT-2026-00418 and the reference names it."
},
"allocations": [
{
"kind": "item",
"openItemId": "6023b97b-b8aa-40bf-bf95-706a76377739",
"amount": "3168.42"
}
],
"remainder": "0.00",
"note": null,
"revision": 1
},
{
"id": "d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00",
"transactionId": "4d285753-c13f-44e2-a3fb-ab6043e969d7",
"state": "suggested",
"method": "exact",
"reason": {
"code": "exact-sum",
"text": "The amount RON 20,804.25 equals the sum of FCT-2026-00402 and FCT-2026-00409, and the reference names them."
},
"allocations": [
{
"kind": "item",
"openItemId": "eebd7a30-2a6a-4a3b-a6f2-e40004cc707f",
"amount": "12043.85"
},
{
"kind": "item",
"openItemId": "5be6df30-6bcb-4cbf-8ca7-fbb0549795ba",
"amount": "8760.40"
}
],
"remainder": "0.00",
"note": null,
"revision": 1
},
{
"id": "0a72c26f-af85-4602-857c-1b5a033e09f6",
"transactionId": "eb7c7917-db20-48ad-a29f-f3b08206f633",
"state": "suggested",
"method": "partner",
"reason": {
"code": "partner-partial",
"text": "Earlier lines of this partner were matched to its documents. The reference names FCT-2026-00396 and the amount is less than what it still owes, so it is paid in part."
},
"allocations": [
{
"kind": "item",
"openItemId": "7658d7ee-a883-4138-a96a-eb531d7be739",
"amount": "3000.00"
}
],
"remainder": "0.00",
"note": null,
"revision": 1
}
],
"nextCursor": null
} Get a match
GET /banking/v1/matches/{matchId}
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The match with its method, its reason and its allocations. | Match |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The match does not exist. Every booked transaction has one; a pending transaction has none. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl "$RDC_BASE_URL/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 200
{
"id": "d976e350-d423-4499-ac3d-207185a9bd4b",
"transactionId": "0dea7dcc-e56e-4654-bdf3-95fbedf34baf",
"state": "suggested",
"method": "exact",
"reason": {
"code": "exact",
"text": "The amount RON 3,168.42 equals FCT-2026-00418 and the reference names it."
},
"allocations": [
{
"kind": "item",
"openItemId": "6023b97b-b8aa-40bf-bf95-706a76377739",
"amount": "3168.42"
}
],
"remainder": "0.00",
"note": null,
"revision": 1
} Accept a match
POST /banking/v1/matches/{matchId}/accept
Accepts the suggested or split match. The allocations must add up to the amount of the transaction and no invoice or bill may receive more than it still owes. A match that was accepted is final; a transfer between your accounts is accepted on both transactions.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the match you read. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The match does not exist. Every booked transaction has one; a pending transaction has none. | Error |
409 | revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. | Error |
422 | transaction_pending: The transaction is pending. It is matched once the bank books it. already_matched: The transaction is already matched. A match that was accepted is final. nothing_to_accept: The match has no suggestion to accept. transfer_unavailable: The other transaction is already matched, was left, or is not booked yet. open_item_exceeded: The invoice or bill does not owe as much as the part you assigned to it. allocation_mismatch: The parts do not add up to the amount of the transaction, or a part is not a positive amount. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'afbcc71e-ab42-4c5a-9c97-23ab1eae4574',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/accept");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
"status": "accepted",
"aggregateId": "d976e350-d423-4499-ac3d-207185a9bd4b",
"aggregateRevision": 2
} Split a match
POST /banking/v1/matches/{matchId}/split
Replaces the allocations of the match with the parts you send and puts the match in the state split. The parts may cover less than the transaction; accept the match when they cover all of it.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the match you read. |
allocations | Allocation[] | Yesrequired | The parts. Each names an invoice, a bill or an entry; their sum may be less than the transaction. |
allocations[].kind | string | Yesrequired | item for an invoice or a bill, entry for a ledger entry, transfer for the other transaction of a transfer between your accounts, reversal for the transaction a return reverses. One of item, entry, transfer, reversal |
allocations[].openItemId | string (uuid) | Nooptional | The invoice or bill, for kind item. |
allocations[].entry | string | Nooptional | The entry, for kind entry. One of bank_fee, utilities, vehicle, interest, other_debit, other_credit |
allocations[].transactionId | string (uuid) | Nooptional | The other transaction, for kind transfer or reversal. |
allocations[].amount | string | Yesrequired | The part of the transaction this allocation covers, as a positive decimal string. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | match_not_found: The match does not exist. Every booked transaction has one; a pending transaction has none. open_item_not_found: The invoice or bill does not exist in the ledger of the company. | Error |
409 | revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. | Error |
422 | transaction_pending: The transaction is pending. It is matched once the bank books it. already_matched: The transaction is already matched. A match that was accepted is final. invalid_match_state: The match is not in a state that allows this. open_item_exceeded: The invoice or bill does not owe as much as the part you assigned to it. allocation_empty: A split needs at least one part. allocation_mismatch: The parts do not add up to the amount of the transaction, or a part is not a positive amount. allocation_exceeds_line: The parts are larger than the transaction. allocation_kind: A split holds open items and entries. A transfer and a return are matched by their own operations. wrong_side: A credit is matched to invoices you issued and a debit to bills you received. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '31d60505-de07-4975-98ee-56b9af7f0d9a',
'expectedRevision': 1,
'allocations': [
{
'kind': 'item',
'openItemId': '3d5fa931-a391-4956-b9a6-4e42de152a4a',
'amount': '5140.00',
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/339a0218-95da-458f-955b-2b01fc139f2c/split");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"expectedRevision": 1,
"allocations": [
{
"kind": "item",
"openItemId": "3d5fa931-a391-4956-b9a6-4e42de152a4a",
"amount": "5140.00"
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
"status": "accepted",
"aggregateId": "339a0218-95da-458f-955b-2b01fc139f2c",
"aggregateRevision": 2
} Book to an entry
POST /banking/v1/matches/{matchId}/entry
Books the whole transaction to a ledger entry, such as a bank fee, and accepts the match. A debit takes an expense entry and a credit an income entry.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the match you read. |
entry | string | Yesrequired | The entry: a debit takes bank_fee, utilities, vehicle or other_debit; a credit takes interest or other_credit. One of bank_fee, utilities, vehicle, interest, other_debit, other_credit |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The match does not exist. Every booked transaction has one; a pending transaction has none. | Error |
409 | revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. | Error |
422 | transaction_pending: The transaction is pending. It is matched once the bank books it. already_matched: The transaction is already matched. A match that was accepted is final. invalid_match_state: The match is not in a state that allows this. unknown_entry: The entry is not one of the entries of the contract. entry_wrong_side: The entry does not fit the direction of the transaction. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'a9291819-9e8f-4069-bfd6-7530ea36eb6d',
'expectedRevision': 1,
'entry': 'vehicle',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/220ef7ff-2759-4b88-92b7-245be51fa5f7/entry");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"expectedRevision": 1,
"entry": "vehicle"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
"status": "accepted",
"aggregateId": "220ef7ff-2759-4b88-92b7-245be51fa5f7",
"aggregateRevision": 2
} Match a transfer between accounts
POST /banking/v1/matches/{matchId}/transfer
Marks the transaction and the opposite transaction of another account of yours as the two sides of one transfer, and accepts both.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the match you read. |
counterTransactionId | string (uuid) | Yesrequired | The opposite transaction of another account of yours: the same amount with the other sign. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | match_not_found: The match does not exist. Every booked transaction has one; a pending transaction has none. transaction_not_found: The transaction does not exist. | Error |
409 | revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. | Error |
422 | transaction_pending: The transaction is pending. It is matched once the bank books it. already_matched: The transaction is already matched. A match that was accepted is final. invalid_match_state: The match is not in a state that allows this. transfer_unavailable: The other transaction is already matched, was left, or is not booked yet. transfer_same_account: Both transactions are on the same account. transfer_mismatch: The two transactions are not the same amount in opposite directions. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '9ce22f1c-3e17-49e5-be8d-a5668b1dad61',
'expectedRevision': 1,
'counterTransactionId': '03c46c39-8f73-4477-ab71-41a96b92fb0c',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/aeb0905b-f721-4fad-95e0-a7148970ef4c/transfer");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"expectedRevision": 1,
"counterTransactionId": "03c46c39-8f73-4477-ab71-41a96b92fb0c"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
"status": "accepted",
"aggregateId": "aeb0905b-f721-4fad-95e0-a7148970ef4c",
"aggregateRevision": 2
} Leave a match
POST /banking/v1/matches/{matchId}/leave
Puts the transaction aside, with a note, until you reopen it. A transaction that was left still counts among the lines left to match.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the match you read. |
note | string | Nooptional | Why the transaction is left, for the people who read it later. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The match does not exist. Every booked transaction has one; a pending transaction has none. | Error |
409 | revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. | Error |
422 | transaction_pending: The transaction is pending. It is matched once the bank books it. already_matched: The transaction is already matched. A match that was accepted is final. invalid_match_state: The match is not in a state that allows this. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '0367068a-1774-43b2-b719-57bd8e87ba75',
'expectedRevision': 1,
'note': 'waiting for the remittance advice',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b/leave");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"expectedRevision": 1,
"note": "waiting for the remittance advice"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
"status": "accepted",
"aggregateId": "d976e350-d423-4499-ac3d-207185a9bd4b",
"aggregateRevision": 2
} Reopen a match
POST /banking/v1/matches/{matchId}/reopen
Brings a transaction that was left back to the state open.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the match you read. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The match does not exist. Every booked transaction has one; a pending transaction has none. | Error |
409 | revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. | Error |
422 | The match is not in a state that allows this. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'dae0e7d4-c64d-4aa0-b552-37a5737bcbb2',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/481f8a88-29b0-4129-b050-385d4e57c03f/reopen");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
"status": "accepted",
"aggregateId": "481f8a88-29b0-4129-b050-385d4e57c03f",
"aggregateRevision": 2
} Dismiss a suggestion
POST /banking/v1/matches/{matchId}/dismiss
Drops the suggested or split allocations and brings the match back to open.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
matchId | path | string (uuid) | Yesrequired | The match of a transaction. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the match you read. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. | OperationResult |
401 | The token is missing, has expired or is not ours. | Error |
403 | The token does not give access to this company or operation. | Error |
404 | The match does not exist. Every booked transaction has one; a pending transaction has none. | Error |
409 | revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. | Error |
422 | transaction_pending: The transaction is pending. It is matched once the bank books it. invalid_match_state: The match is not in a state that allows this. | Error |
429 | There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. | Error |
503 | Treasury cannot answer now. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '848a21ea-ba15-4257-86fa-53fc7a28cfcc',
'expectedRevision': 1,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/matches/d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00/dismiss");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
"status": "accepted",
"aggregateId": "d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00",
"aggregateRevision": 2
}