curl --request POST \
--url https://api.parser-app.com/v1/jobs/{job_id}/corrections \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"corrections": [
{
"document_id": "<string>",
"index": 1,
"type": "transaction",
"counterparty": "<string>",
"reason": "<string>"
}
]
}
'import requests
url = "https://api.parser-app.com/v1/jobs/{job_id}/corrections"
payload = { "corrections": [
{
"document_id": "<string>",
"index": 1,
"type": "transaction",
"counterparty": "<string>",
"reason": "<string>"
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
corrections: [
{
document_id: '<string>',
index: 1,
type: 'transaction',
counterparty: '<string>',
reason: '<string>'
}
]
})
};
fetch('https://api.parser-app.com/v1/jobs/{job_id}/corrections', 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.parser-app.com/v1/jobs/{job_id}/corrections",
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([
'corrections' => [
[
'document_id' => '<string>',
'index' => 1,
'type' => 'transaction',
'counterparty' => '<string>',
'reason' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.parser-app.com/v1/jobs/{job_id}/corrections"
payload := strings.NewReader("{\n \"corrections\": [\n {\n \"document_id\": \"<string>\",\n \"index\": 1,\n \"type\": \"transaction\",\n \"counterparty\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.parser-app.com/v1/jobs/{job_id}/corrections")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"corrections\": [\n {\n \"document_id\": \"<string>\",\n \"index\": 1,\n \"type\": \"transaction\",\n \"counterparty\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parser-app.com/v1/jobs/{job_id}/corrections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"corrections\": [\n {\n \"document_id\": \"<string>\",\n \"index\": 1,\n \"type\": \"transaction\",\n \"counterparty\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"corrections": [
{
"id": "<string>",
"change": {
"document_id": "<string>",
"index": 1,
"type": "transaction",
"category": "revenue",
"counterparty": "<string>",
"reason": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"type": "<string>",
"id": "<string>"
},
"reverted_at": "2023-11-07T05:31:56Z",
"reverted_by": {
"type": "<string>",
"id": "<string>"
},
"revert_reason": "<string>"
}
],
"summary": {
"active": 123,
"reverted": 123,
"last_changed_at": "2023-11-07T05:31:56Z",
"correction_ids": [
"<string>"
],
"transactions": [
{
"document_id": "<string>",
"index": 1
}
],
"positions": [
"<string>"
],
"months": [
"<string>"
],
"underwriting": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Correct a finished job: re-categorize rows, override positions, exclude months
Saves one or more corrections on the job, in order; they apply every time the job is read (GET /v1/jobs/{job_id}), and the result is recomputed from the stored ledgers with no model call. transaction sets a row’s category (one that fits its direction) and/or counterparty, and moves the row’s amount between its month’s figures (from how the month counted it: counted_as, mca_projected); only a verified statement the result is computed from changes the figures. position_override sets a position’s status, frequency, payment, funder or kind (null keeps the computed value); it changes the existing MCA burden and the withhold, not the pulls each month observed. month_exclusion leaves a month out of the averages, or counts one that was left out; with account_key, it leaves one account’s figures out of the month (months[].by_account), merged again from the others. Per field, the latest correction in force wins; revert one to remove it. Amounts, dates, balances and rows cannot be corrected, and gates, statuses and review reasons never change. Audited; the endpoints and integrations subscribed to job.corrected are told.
curl --request POST \
--url https://api.parser-app.com/v1/jobs/{job_id}/corrections \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"corrections": [
{
"document_id": "<string>",
"index": 1,
"type": "transaction",
"counterparty": "<string>",
"reason": "<string>"
}
]
}
'import requests
url = "https://api.parser-app.com/v1/jobs/{job_id}/corrections"
payload = { "corrections": [
{
"document_id": "<string>",
"index": 1,
"type": "transaction",
"counterparty": "<string>",
"reason": "<string>"
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
corrections: [
{
document_id: '<string>',
index: 1,
type: 'transaction',
counterparty: '<string>',
reason: '<string>'
}
]
})
};
fetch('https://api.parser-app.com/v1/jobs/{job_id}/corrections', 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.parser-app.com/v1/jobs/{job_id}/corrections",
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([
'corrections' => [
[
'document_id' => '<string>',
'index' => 1,
'type' => 'transaction',
'counterparty' => '<string>',
'reason' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.parser-app.com/v1/jobs/{job_id}/corrections"
payload := strings.NewReader("{\n \"corrections\": [\n {\n \"document_id\": \"<string>\",\n \"index\": 1,\n \"type\": \"transaction\",\n \"counterparty\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.parser-app.com/v1/jobs/{job_id}/corrections")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"corrections\": [\n {\n \"document_id\": \"<string>\",\n \"index\": 1,\n \"type\": \"transaction\",\n \"counterparty\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parser-app.com/v1/jobs/{job_id}/corrections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"corrections\": [\n {\n \"document_id\": \"<string>\",\n \"index\": 1,\n \"type\": \"transaction\",\n \"counterparty\": \"<string>\",\n \"reason\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"corrections": [
{
"id": "<string>",
"change": {
"document_id": "<string>",
"index": 1,
"type": "transaction",
"category": "revenue",
"counterparty": "<string>",
"reason": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"type": "<string>",
"id": "<string>"
},
"reverted_at": "2023-11-07T05:31:56Z",
"reverted_by": {
"type": "<string>",
"id": "<string>"
},
"revert_reason": "<string>"
}
],
"summary": {
"active": 123,
"reverted": 123,
"last_changed_at": "2023-11-07T05:31:56Z",
"correction_ids": [
"<string>"
],
"transactions": [
{
"document_id": "<string>",
"index": 1
}
],
"positions": [
"<string>"
],
"months": [
"<string>"
],
"underwriting": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
API key
Path Parameters
Body
Applied in order
1 - 100 elementsSet one ledger row's category and/or counterparty. Amounts, dates, balances and the rows themselves are never corrected: a verified ledger reconciles to the cent as read.
- TransactionCorrection
- PositionOverride
- MonthExclusion
Show child attributes
Show child attributes