Run reconciliation for a source
curl --request POST \
--url https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"window_seconds": 123,
"auto_resolve_below_minor_units": "<string>",
"external_reference": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"window_seconds": 123,
"auto_resolve_below_minor_units": "<string>",
"external_reference": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
window_seconds: 123,
auto_resolve_below_minor_units: '<string>',
external_reference: '<string>',
note: '<string>'
})
};
fetch('https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'window_seconds' => 123,
'auto_resolve_below_minor_units' => '<string>',
'external_reference' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs"
payload := strings.NewReader("{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"window_seconds\": 123,\n \"auto_resolve_below_minor_units\": \"<string>\",\n \"external_reference\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"window_seconds\": 123,\n \"auto_resolve_below_minor_units\": \"<string>\",\n \"external_reference\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"window_seconds\": 123,\n \"auto_resolve_below_minor_units\": \"<string>\",\n \"external_reference\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "reconciliation_run",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"matched_count": 123,
"unmatched_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"external_reference": "<string>",
"matched": [
{
"external_id": "<string>",
"posting_id": 123,
"account": "<string>",
"amount": "<string>",
"currency": "<string>",
"posting_value_date": "2023-11-07T05:31:56Z",
"external_at": "2023-11-07T05:31:56Z"
}
],
"unmatched_external": [
{}
],
"unmatched_internal": [
{}
]
}Draws open external transactions for the source (optionally
bounded by from/to on occurred_at) and matches them.
Strategy, window, and tolerance default from the source.
Runs with at most 500 open items execute synchronously and
return the full result. Larger runs return status: queued
with empty arrays; poll GET /v1/reconciliation_runs/{id} and
subscribe to reconciliation.run_completed.
One queued or running run per source; a second request returns
run_in_progress (409). Inline items are rejected here.
POST
/
ledger
/
v1
/
sources
/
{source_id}
/
reconciliation_runs
Run reconciliation for a source
curl --request POST \
--url https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"window_seconds": 123,
"auto_resolve_below_minor_units": "<string>",
"external_reference": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"window_seconds": 123,
"auto_resolve_below_minor_units": "<string>",
"external_reference": "<string>",
"note": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
window_seconds: 123,
auto_resolve_below_minor_units: '<string>',
external_reference: '<string>',
note: '<string>'
})
};
fetch('https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z',
'window_seconds' => 123,
'auto_resolve_below_minor_units' => '<string>',
'external_reference' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs"
payload := strings.NewReader("{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"window_seconds\": 123,\n \"auto_resolve_below_minor_units\": \"<string>\",\n \"external_reference\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"window_seconds\": 123,\n \"auto_resolve_below_minor_units\": \"<string>\",\n \"external_reference\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kordio.io/ledger/v1/sources/{source_id}/reconciliation_runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\",\n \"window_seconds\": 123,\n \"auto_resolve_below_minor_units\": \"<string>\",\n \"external_reference\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "reconciliation_run",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"matched_count": 123,
"unmatched_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"external_reference": "<string>",
"matched": [
{
"external_id": "<string>",
"posting_id": 123,
"account": "<string>",
"amount": "<string>",
"currency": "<string>",
"posting_value_date": "2023-11-07T05:31:56Z",
"external_at": "2023-11-07T05:31:56Z"
}
],
"unmatched_external": [
{}
],
"unmatched_internal": [
{}
]
}Authorizations
Same flow; ledger:write is required for any mutation.
Path Parameters
Body
application/json
Available options:
exact, sum_in_window Absolute minor-unit tolerance budget. Accepts a decimal string (recommended) or an integer on write.
Pattern:
^\d+$Response
Run executed (completed) or queued
Available options:
reconciliation_run Available options:
running, ready, completed Show child attributes
Show child attributes