---
title: "Reconciliază o lună | Documentație | Treasury by R&D Copilot"
description: "Parcurge tranzacțiile unui cont până când fiecare linie înregistrată este potrivită, apoi verifică contoarele contului."
canonical: "https://banking.rdcopilot.com/ro/docs/guides/reconcile-a-month/"
language: ro
updated: 2026-11-22
---

# Reconciliază o lună

Parcurge tranzacțiile unui cont până când fiecare linie înregistrată este potrivită, apoi verifică contoarele contului.

A reconcilia un cont înseamnă a da fiecărei tranzacții înregistrate o potrivire acceptată. După un [import](https://banking.rdcopilot.com/ro/docs/guides/import-a-statement/), majoritatea liniilor au deja o propunere. Le accepți pe cele corecte și le hotărăști pe celelalte, pe rând. Ghidul descrie ciclul de lucru pentru un singur cont.

## 1\. Găsește ce a rămas

Listează tranzacțiile contului cu `matchState` egal cu `suggested`, apoi cu `open`. O potrivire propusă așteaptă decizia ta; una deschisă nu are încă o propunere. O linie `pending` nu are potrivire: se potrivește după ce un extras o înregistrează.

curl

```bash
curl "$RDC_BASE_URL/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested');
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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/transactions?accountId=258f8664-ff43-4e53-b688-ad5a4a97ede6&matchState=suggested");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 200

```json
{
  "items": [
    {
      "id": "0dea7dcc-e56e-4654-bdf3-95fbedf34baf",
      "accountId": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
      "statementId": "efdd0f10-eb9d-4569-837f-992ae1bdf44e",
      "bookedOn": "2026-11-18",
      "valueOn": "2026-11-18",
      "counterparty": "Hanul Ozana SRL",
      "reference": "FCT-2026-00418",
      "amount": "3168.42",
      "currency": "RON",
      "kind": "transfer",
      "status": "booked",
      "bankReference": "BK26111801",
      "returnOf": null,
      "returnReason": null,
      "attachments": [
        "FCT-2026-00418.pdf"
      ],
      "matchState": "suggested",
      "matchId": "d976e350-d423-4499-ac3d-207185a9bd4b",
      "revision": 1
    },
    {
      "id": "eb7c7917-db20-48ad-a29f-f3b08206f633",
      "accountId": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
      "statementId": "efdd0f10-eb9d-4569-837f-992ae1bdf44e",
      "bookedOn": "2026-11-17",
      "valueOn": "2026-11-17",
      "counterparty": "Cofetăria Vălul Alb SRL",
      "reference": "PLATA PARTIALA 396",
      "amount": "3000.00",
      "currency": "RON",
      "kind": "transfer",
      "status": "booked",
      "bankReference": "BK26111701",
      "returnOf": null,
      "returnReason": null,
      "attachments": [],
      "matchState": "suggested",
      "matchId": "0a72c26f-af85-4602-857c-1b5a033e09f6",
      "revision": 1
    },
    {
      "id": "4d285753-c13f-44e2-a3fb-ab6043e969d7",
      "accountId": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
      "statementId": "efdd0f10-eb9d-4569-837f-992ae1bdf44e",
      "bookedOn": "2026-11-16",
      "valueOn": "2026-11-16",
      "counterparty": "Market Trei Brazi SRL",
      "reference": "FACT 402 409",
      "amount": "20804.25",
      "currency": "RON",
      "kind": "transfer",
      "status": "booked",
      "bankReference": "BK26111601",
      "returnOf": null,
      "returnReason": null,
      "attachments": [],
      "matchState": "suggested",
      "matchId": "d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00",
      "revision": 1
    }
  ],
  "nextCursor": null
}
```

## 2\. Citește potrivirea

Fiecare tranzacție are `matchId`. [\`getMatch\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#get-match) returnează potrivirea cu `method` (`rule`, `exact`, `partner` sau `manual`), un `reason` de o propoziție cu un `code` stabil, `allocations` și `remainder`. Aici `exact` spune ce a găsit potrivirea. Sensul fiecărei metode este în [Metode și motive de potrivire](https://banking.rdcopilot.com/ro/docs/concepts/match-methods-and-reasons/).

curl

```bash
curl "$RDC_BASE_URL/banking/v1/matches/d976e350-d423-4499-ac3d-207185a9bd4b" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```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

```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
<?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#

```csharp
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();
```

Răspuns 200

```json
{
  "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
}
```

Trimite `revision` al potrivirii citite ca `expectedRevision` în fiecare modificare de mai jos. Dacă între timp cineva a schimbat potrivirea, Treasury refuză modificarea cu `revision_conflict` și nu aplică nimic. Citește din nou potrivirea, hotărăște dacă modificarea se mai aplică și trimite-o cu un `operationId` nou.

## 3\. Hotărăște

### Acceptă propunerea

[\`acceptMatch\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#accept-match) face alocările definitive. Ele trebuie să însumeze suma tranzacției, iar nicio factură nu primește mai mult decât mai are de plătit.

curl

```bash
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

```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

```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
<?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#

```csharp
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();
```

Răspuns 202

```json
{
  "operationId": "afbcc71e-ab42-4c5a-9c97-23ab1eae4574",
  "status": "accepted",
  "aggregateId": "d976e350-d423-4499-ac3d-207185a9bd4b",
  "aggregateRevision": 2
}
```

### Împarte-o

[\`splitMatch\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#split-match) înlocuiește alocările cu părțile trimise de tine și pune starea `split`. Părțile pot acoperi mai puțin decât tranzacția; acceptă potrivirea când o acoperă integral.

curl

```bash
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

```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

```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
<?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#

```csharp
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();
```

Răspuns 202

```json
{
  "operationId": "31d60505-de07-4975-98ee-56b9af7f0d9a",
  "status": "accepted",
  "aggregateId": "339a0218-95da-458f-955b-2b01fc139f2c",
  "aggregateRevision": 2
}
```

### Înregistrează-o într-o categorie

[\`bookToEntry\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#book-to-entry) înregistrează toată tranzacția într-o categorie din evidență, de exemplu `bank_fee`, și acceptă potrivirea. Un debit ia o categorie de cheltuială, iar un credit o categorie de venit.

curl

```bash
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

```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

```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
<?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#

```csharp
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();
```

Răspuns 202

```json
{
  "operationId": "a9291819-9e8f-4069-bfd6-7530ea36eb6d",
  "status": "accepted",
  "aggregateId": "220ef7ff-2759-4b88-92b7-245be51fa5f7",
  "aggregateRevision": 2
}
```

### Potrivește un transfer între conturile tale

[\`matchTransfer\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#match-transfer) marchează tranzacția și tranzacția opusă din alt cont ca cele două părți ale unui singur transfer și le acceptă pe amândouă. Trimite-o pe cealaltă ca `counterTransactionId`.

curl

```bash
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

```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

```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
<?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#

```csharp
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();
```

Răspuns 202

```json
{
  "operationId": "9ce22f1c-3e17-49e5-be8d-a5668b1dad61",
  "status": "accepted",
  "aggregateId": "aeb0905b-f721-4fad-95e0-a7148970ef4c",
  "aggregateRevision": 2
}
```

### Lasă-o, redeschide-o, renunță la ea

[\`leaveMatch\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#leave-match) pune o tranzacție deoparte, cu o notă. O tranzacție lăsată se numără în continuare printre liniile rămase, deci redeschide-o mai târziu cu [\`reopenMatch\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#reopen-match). [\`dismissMatch\`](https://banking.rdcopilot.com/ro/docs/api-reference/matches/#dismiss-match) renunță la o propunere sau la o împărțire și readuce potrivirea în starea `open`.

curl

```bash
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

```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

```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
<?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#

```csharp
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();
```

Răspuns 202

```json
{
  "operationId": "0367068a-1774-43b2-b719-57bd8e87ba75",
  "status": "accepted",
  "aggregateId": "d976e350-d423-4499-ac3d-207185a9bd4b",
  "aggregateRevision": 2
}
```

curl

```bash
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

```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

```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
<?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#

```csharp
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();
```

Răspuns 202

```json
{
  "operationId": "dae0e7d4-c64d-4aa0-b552-37a5737bcbb2",
  "status": "accepted",
  "aggregateId": "481f8a88-29b0-4129-b050-385d4e57c03f",
  "aggregateRevision": 2
}
```

curl

```bash
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

```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

```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
<?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#

```csharp
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();
```

Răspuns 202

```json
{
  "operationId": "848a21ea-ba15-4257-86fa-53fc7a28cfcc",
  "status": "accepted",
  "aggregateId": "d3c1d37c-0bf1-4603-b3e7-5c5c5361ad00",
  "aggregateRevision": 2
}
```

## Cum este refuzată fiecare modificare

Fiecare modificare poate răspunde și cu `operation_reused`. Codurile sunt explicate în [Coduri de eroare](https://banking.rdcopilot.com/ro/docs/reference/error-codes/).

| Operație | Coduri |
| --- | --- |
| `acceptMatch` | `match_not_found, revision_conflict, transaction_pending, already_matched, nothing_to_accept, transfer_unavailable, open_item_exceeded, allocation_mismatch` |
| `splitMatch` | `match_not_found, open_item_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state, open_item_exceeded, allocation_empty, allocation_mismatch, allocation_exceeds_line, allocation_kind, wrong_side` |
| `bookToEntry` | `match_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state, unknown_entry, entry_wrong_side` |
| `matchTransfer` | `match_not_found, transaction_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state, transfer_unavailable, transfer_same_account, transfer_mismatch` |
| `leaveMatch` | `match_not_found, revision_conflict, transaction_pending, already_matched, invalid_match_state` |
| `reopenMatch` | `match_not_found, revision_conflict, invalid_match_state` |
| `dismissMatch` | `match_not_found, revision_conflict, transaction_pending, invalid_match_state` |

-   `already_matched`: o potrivire acceptată este definitivă. Pentru a anula o plată, folosește returul băncii, care o inversează.
-   `nothing_to_accept`: potrivirea nu are nicio propunere. Împarte tranzacția sau înregistrează-o într-o categorie.
-   `transaction_pending`: importă extrasul care înregistrează linia, apoi potrivește-o.
-   `open_item_exceeded`: citește suma rămasă a facturii și atribuie cel mult atât.

## 4\. Află că luna este încheiată

Citește contul cu [\`getAccount\`](https://banking.rdcopilot.com/ro/docs/api-reference/accounts/#get-account). Luna este reconciliată când `linesLeft` este `0` și `difference` este `0.00`: soldul din evidență egalează soldul din extras. Contoarele sunt explicate în [Conturi și solduri](https://banking.rdcopilot.com/ro/docs/concepts/accounts-and-balances/).

curl

```bash
curl "$RDC_BASE_URL/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6');
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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/banking/v1/accounts/258f8664-ff43-4e53-b688-ad5a4a97ede6");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 200

```json
{
  "id": "258f8664-ff43-4e53-b688-ad5a4a97ede6",
  "companyId": "3e738c06-3df7-4eb7-bfe2-259b8ba481f9",
  "name": "Operating account",
  "iban": "RO** **** **** **** **** 0000",
  "currency": "RON",
  "bookedBalance": "154289.67",
  "availableBalance": "153394.27",
  "statementBalance": "154289.67",
  "ledgerBalance": "156199.80",
  "difference": "-1910.13",
  "linesLeft": 8,
  "nonWorkingDays": [
    "2026-11-30",
    "2026-12-01"
  ]
}
```

Mai departe: [Pregătește și aprobă plăți](https://banking.rdcopilot.com/ro/docs/guides/prepare-and-approve-payments/).
