curl --request POST \
--url https://api.casparser.in/v1/rta-sync/normalize \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'files=<string>' \
--form 'reference=<string>' \
--form report_code=MFSD221 \
--form provider=auto \
--form include_source=false \
--form files.items='@example-file'import requests
url = "https://api.casparser.in/v1/rta-sync/normalize"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = {
"files": "<string>",
"reference": "<string>",
"report_code": "MFSD221",
"provider": "auto",
"include_source": "false"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('reference', '<string>');
form.append('report_code', 'MFSD221');
form.append('provider', 'auto');
form.append('include_source', 'false');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.casparser.in/v1/rta-sync/normalize', 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.casparser.in/v1/rta-sync/normalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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.casparser.in/v1/rta-sync/normalize"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.casparser.in/v1/rta-sync/normalize")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v1/rta-sync/normalize")
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.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"schema_version": "rta-sync.v1",
"key_version": "rta-key.v1",
"batch_key": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"reference": "jan-2026-mfd-001",
"files": [
{
"file_index": 0,
"filename": "kfintech-feed.csv",
"provider": "kfintech",
"report_code": "MFSD221",
"report_family": "transaction_investor_master",
"detection_confidence": "strong",
"source_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"mapping_version": "rta-sync-2026-08",
"source_schema": "kfintech_format1",
"data_sets": [
{
"object_type": "investor",
"record_count": 1,
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
],
"records": [
{
"record_type": "investor",
"record_key": "<string>",
"identity_quality": "strong",
"provenance": {
"source_rows": [
{
"row_number": 2,
"sheet": "<string>",
"source_row_key": "<string>"
}
],
"source_fields": {}
},
"relations": [
{
"type": "reverses",
"record_key": "<string>"
}
],
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
],
"pan": "<string>",
"source_record_key": "<string>",
"investor_name": "<string>",
"email": "<string>",
"mobile": "<string>",
"kyc_status": "<string>",
"broker_code": "<string>",
"sub_broker_code": "<string>",
"euin": "<string>"
}
]
}
],
"rejected_rows": [
{
"source_row": {
"row_number": 2,
"sheet": "<string>",
"source_row_key": "<string>"
},
"code": "MISSING_REQUIRED_FIELD",
"message": "<string>",
"source_fields": {},
"fields": [
"<string>"
]
}
],
"summary": {
"source_rows": 1000,
"output_records": 998,
"rejected_rows": 2,
"warning_count": 4
},
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
]
}
],
"summary": {
"source_rows": 1000,
"output_records": 998,
"rejected_rows": 2,
"warning_count": 4,
"input_files": 1
},
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
]
}
}{
"status": "failed",
"reference": "distributor_123",
"errors": [
{
"file_index": 1,
"filename": "aum-report.xlsx",
"code": "REPORT_DETECTION_AMBIGUOUS",
"message": "The report family could not be identified from the file headers.",
"fields": [
"<string>"
]
}
]
}{
"status": "failed",
"msg": "Authentication failed: API key is missing. Please provide a valid API key in the x-api-key header."
}{
"status": "failed",
"msg": "Authentication failed: API quota exceeded or invalid API key. Please check your API key or quota limits."
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}Normalize mutual-fund RTA files
Upload one or more CAMS or KFintech reverse-feed files and receive typed canonical data sets. The endpoint accepts CSV, XLS, XLSX, and DBF files, detects the source report from the headers, applies provider-specific cleanup rules, and returns normalized records with warnings and a batch summary.
RTA Sync preserves reported holdings and brokerage payouts as source-backed records. It does not calculate portfolio valuations or commissions.
curl --request POST \
--url https://api.casparser.in/v1/rta-sync/normalize \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'files=<string>' \
--form 'reference=<string>' \
--form report_code=MFSD221 \
--form provider=auto \
--form include_source=false \
--form files.items='@example-file'import requests
url = "https://api.casparser.in/v1/rta-sync/normalize"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = {
"files": "<string>",
"reference": "<string>",
"report_code": "MFSD221",
"provider": "auto",
"include_source": "false"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('reference', '<string>');
form.append('report_code', 'MFSD221');
form.append('provider', 'auto');
form.append('include_source', 'false');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.casparser.in/v1/rta-sync/normalize', 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.casparser.in/v1/rta-sync/normalize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"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.casparser.in/v1/rta-sync/normalize"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.casparser.in/v1/rta-sync/normalize")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.casparser.in/v1/rta-sync/normalize")
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.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"reference\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"report_code\"\r\n\r\nMFSD221\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"provider\"\r\n\r\nauto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"include_source\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"schema_version": "rta-sync.v1",
"key_version": "rta-key.v1",
"batch_key": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"reference": "jan-2026-mfd-001",
"files": [
{
"file_index": 0,
"filename": "kfintech-feed.csv",
"provider": "kfintech",
"report_code": "MFSD221",
"report_family": "transaction_investor_master",
"detection_confidence": "strong",
"source_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"mapping_version": "rta-sync-2026-08",
"source_schema": "kfintech_format1",
"data_sets": [
{
"object_type": "investor",
"record_count": 1,
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
],
"records": [
{
"record_type": "investor",
"record_key": "<string>",
"identity_quality": "strong",
"provenance": {
"source_rows": [
{
"row_number": 2,
"sheet": "<string>",
"source_row_key": "<string>"
}
],
"source_fields": {}
},
"relations": [
{
"type": "reverses",
"record_key": "<string>"
}
],
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
],
"pan": "<string>",
"source_record_key": "<string>",
"investor_name": "<string>",
"email": "<string>",
"mobile": "<string>",
"kyc_status": "<string>",
"broker_code": "<string>",
"sub_broker_code": "<string>",
"euin": "<string>"
}
]
}
],
"rejected_rows": [
{
"source_row": {
"row_number": 2,
"sheet": "<string>",
"source_row_key": "<string>"
},
"code": "MISSING_REQUIRED_FIELD",
"message": "<string>",
"source_fields": {},
"fields": [
"<string>"
]
}
],
"summary": {
"source_rows": 1000,
"output_records": 998,
"rejected_rows": 2,
"warning_count": 4
},
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
]
}
],
"summary": {
"source_rows": 1000,
"output_records": 998,
"rejected_rows": 2,
"warning_count": 4,
"input_files": 1
},
"warnings": [
{
"code": "MISSING_TRANSACTION_ID",
"message": "The source row has no provider transaction ID; record identity may be weak.",
"row_number": 42,
"fields": [
"transaction_id"
]
}
]
}
}{
"status": "failed",
"reference": "distributor_123",
"errors": [
{
"file_index": 1,
"filename": "aum-report.xlsx",
"code": "REPORT_DETECTION_AMBIGUOUS",
"message": "The report family could not be identified from the file headers.",
"fields": [
"<string>"
]
}
]
}{
"status": "failed",
"msg": "Authentication failed: API key is missing. Please provide a valid API key in the x-api-key header."
}{
"status": "failed",
"msg": "Authentication failed: API quota exceeded or invalid API key. Please check your API key or quota limits."
}{
"status": "failed",
"msg": "Invalid PDF file or password."
}Authorizations
Your API key for authentication.
Use sandbox-with-json-responses as Sandbox key.
Headers
Optional caller-supplied request ID. Must start with req_; the same value is returned in the response header.
^req_[A-Za-z0-9]+$"req_myImport123"
Body
One or more CAMS or KFintech RTA files in CSV, XLS, XLSX, or DBF format.
1Opaque tenant, distributor, sub-distributor, or batch reference echoed in the response.
256Optional report identifier when all submitted files are the same report type.
"MFSD221"
Optional provider hint. auto detects the provider schema from file headers.
auto, cams, kfintech Include all original source fields in record provenance, including fields that were normalized.
Was this page helpful?

