Get P&L Sync
curl --request POST \
--url https://test-api.sandbox.co.in/it/calculator/pnl/real-estate \
--header 'Content-Type: application/json' \
--data '
{
"name": "real_estate_tradewise_settlement_workbook",
"@entity": "workbook",
"sheets": [
{
"name": "tradewise_settlement_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "tradewise_settlement_table",
"@entity": "table",
"header": [
"serial_number",
"asset_type",
"property_name",
"country",
"curency",
"buy_date",
"buy_price",
"cost_of_acquisition",
"sell_date",
"sell_price",
"transfer_expenses"
],
"rows": [
[
"6abba3b3-d061-45f5-a947-c6a944663605",
"residential_property",
"RESID 1",
"India",
"INR",
1696185000000,
15000000,
0,
1712255400000,
17500000,
10000
],
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"commercial_property",
"COM ",
"India",
"INR",
1011175420000,
8590000,
0,
1712169000000,
245000000,
17000
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"non_agricultural_land",
"NA ",
"India",
"EUR",
1286649000000,
8590000,
0,
1712169000000,
24582000,
17000
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"agricultural_land",
"UA",
"India",
"USD",
1697740200000,
230303,
0,
1712169000000,
309000,
12400
]
]
},
{
"name": "cost_of_improvement_table",
"@entity": "table",
"header": [
"settlement_serial_number",
"financial_year",
"cost",
"indexed_cost"
],
"rows": [
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"FY 2010-11",
250000,
null
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"FY 2012-13",
250000,
null
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"FY 2023-24",
1330,
null
]
]
}
]
}
]
}
'import requests
url = "https://test-api.sandbox.co.in/it/calculator/pnl/real-estate"
payload = {
"name": "real_estate_tradewise_settlement_workbook",
"@entity": "workbook",
"sheets": [
{
"name": "tradewise_settlement_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "tradewise_settlement_table",
"@entity": "table",
"header": ["serial_number", "asset_type", "property_name", "country", "curency", "buy_date", "buy_price", "cost_of_acquisition", "sell_date", "sell_price", "transfer_expenses"],
"rows": [["6abba3b3-d061-45f5-a947-c6a944663605", "residential_property", "RESID 1", "India", "INR", 1696185000000, 15000000, 0, 1712255400000, 17500000, 10000], ["592994fb-3b14-4ec7-9203-502cd8927bec", "commercial_property", "COM ", "India", "INR", 1011175420000, 8590000, 0, 1712169000000, 245000000, 17000], ["991d604c-989f-4530-948b-fa2e609c2d56", "non_agricultural_land", "NA ", "India", "EUR", 1286649000000, 8590000, 0, 1712169000000, 24582000, 17000], ["cfb66c3b-ae78-4559-9755-ee83ba1f5540", "agricultural_land", "UA", "India", "USD", 1697740200000, 230303, 0, 1712169000000, 309000, 12400]]
},
{
"name": "cost_of_improvement_table",
"@entity": "table",
"header": ["settlement_serial_number", "financial_year", "cost", "indexed_cost"],
"rows": [["592994fb-3b14-4ec7-9203-502cd8927bec", "FY 2010-11", 250000, None], ["991d604c-989f-4530-948b-fa2e609c2d56", "FY 2012-13", 250000, None], ["cfb66c3b-ae78-4559-9755-ee83ba1f5540", "FY 2023-24", 1330, None]]
}
]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'real_estate_tradewise_settlement_workbook',
'@entity': 'workbook',
sheets: [
{
name: 'tradewise_settlement_sheet',
'@entity': 'sheet',
blocks: [
{
name: 'tradewise_settlement_table',
'@entity': 'table',
header: [
'serial_number',
'asset_type',
'property_name',
'country',
'curency',
'buy_date',
'buy_price',
'cost_of_acquisition',
'sell_date',
'sell_price',
'transfer_expenses'
],
rows: [
[
'6abba3b3-d061-45f5-a947-c6a944663605',
'residential_property',
'RESID 1',
'India',
'INR',
1696185000000,
15000000,
0,
1712255400000,
17500000,
10000
],
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'commercial_property',
'COM ',
'India',
'INR',
1011175420000,
8590000,
0,
1712169000000,
245000000,
17000
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'non_agricultural_land',
'NA ',
'India',
'EUR',
1286649000000,
8590000,
0,
1712169000000,
24582000,
17000
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'agricultural_land',
'UA',
'India',
'USD',
1697740200000,
230303,
0,
1712169000000,
309000,
12400
]
]
},
{
name: 'cost_of_improvement_table',
'@entity': 'table',
header: ['settlement_serial_number', 'financial_year', 'cost', 'indexed_cost'],
rows: [
['592994fb-3b14-4ec7-9203-502cd8927bec', 'FY 2010-11', 250000, null],
['991d604c-989f-4530-948b-fa2e609c2d56', 'FY 2012-13', 250000, null],
['cfb66c3b-ae78-4559-9755-ee83ba1f5540', 'FY 2023-24', 1330, null]
]
}
]
}
]
})
};
fetch('https://test-api.sandbox.co.in/it/calculator/pnl/real-estate', 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://test-api.sandbox.co.in/it/calculator/pnl/real-estate",
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([
'name' => 'real_estate_tradewise_settlement_workbook',
'@entity' => 'workbook',
'sheets' => [
[
'name' => 'tradewise_settlement_sheet',
'@entity' => 'sheet',
'blocks' => [
[
'name' => 'tradewise_settlement_table',
'@entity' => 'table',
'header' => [
'serial_number',
'asset_type',
'property_name',
'country',
'curency',
'buy_date',
'buy_price',
'cost_of_acquisition',
'sell_date',
'sell_price',
'transfer_expenses'
],
'rows' => [
[
'6abba3b3-d061-45f5-a947-c6a944663605',
'residential_property',
'RESID 1',
'India',
'INR',
1696185000000,
15000000,
0,
1712255400000,
17500000,
10000
],
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'commercial_property',
'COM ',
'India',
'INR',
1011175420000,
8590000,
0,
1712169000000,
245000000,
17000
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'non_agricultural_land',
'NA ',
'India',
'EUR',
1286649000000,
8590000,
0,
1712169000000,
24582000,
17000
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'agricultural_land',
'UA',
'India',
'USD',
1697740200000,
230303,
0,
1712169000000,
309000,
12400
]
]
],
[
'name' => 'cost_of_improvement_table',
'@entity' => 'table',
'header' => [
'settlement_serial_number',
'financial_year',
'cost',
'indexed_cost'
],
'rows' => [
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'FY 2010-11',
250000,
null
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'FY 2012-13',
250000,
null
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'FY 2023-24',
1330,
null
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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://test-api.sandbox.co.in/it/calculator/pnl/real-estate"
payload := strings.NewReader("{\n \"name\": \"real_estate_tradewise_settlement_workbook\",\n \"@entity\": \"workbook\",\n \"sheets\": [\n {\n \"name\": \"tradewise_settlement_sheet\",\n \"@entity\": \"sheet\",\n \"blocks\": [\n {\n \"name\": \"tradewise_settlement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"serial_number\",\n \"asset_type\",\n \"property_name\",\n \"country\",\n \"curency\",\n \"buy_date\",\n \"buy_price\",\n \"cost_of_acquisition\",\n \"sell_date\",\n \"sell_price\",\n \"transfer_expenses\"\n ],\n \"rows\": [\n [\n \"6abba3b3-d061-45f5-a947-c6a944663605\",\n \"residential_property\",\n \"RESID 1\",\n \"India\",\n \"INR\",\n 1696185000000,\n 15000000,\n 0,\n 1712255400000,\n 17500000,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"commercial_property\",\n \"COM \",\n \"India\",\n \"INR\",\n 1011175420000,\n 8590000,\n 0,\n 1712169000000,\n 245000000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"non_agricultural_land\",\n \"NA \",\n \"India\",\n \"EUR\",\n 1286649000000,\n 8590000,\n 0,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"agricultural_land\",\n \"UA\",\n \"India\",\n \"USD\",\n 1697740200000,\n 230303,\n 0,\n 1712169000000,\n 309000,\n 12400\n ]\n ]\n },\n {\n \"name\": \"cost_of_improvement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"settlement_serial_number\",\n \"financial_year\",\n \"cost\",\n \"indexed_cost\"\n ],\n \"rows\": [\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"FY 2010-11\",\n 250000,\n null\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"FY 2012-13\",\n 250000,\n null\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"FY 2023-24\",\n 1330,\n null\n ]\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://test-api.sandbox.co.in/it/calculator/pnl/real-estate")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"real_estate_tradewise_settlement_workbook\",\n \"@entity\": \"workbook\",\n \"sheets\": [\n {\n \"name\": \"tradewise_settlement_sheet\",\n \"@entity\": \"sheet\",\n \"blocks\": [\n {\n \"name\": \"tradewise_settlement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"serial_number\",\n \"asset_type\",\n \"property_name\",\n \"country\",\n \"curency\",\n \"buy_date\",\n \"buy_price\",\n \"cost_of_acquisition\",\n \"sell_date\",\n \"sell_price\",\n \"transfer_expenses\"\n ],\n \"rows\": [\n [\n \"6abba3b3-d061-45f5-a947-c6a944663605\",\n \"residential_property\",\n \"RESID 1\",\n \"India\",\n \"INR\",\n 1696185000000,\n 15000000,\n 0,\n 1712255400000,\n 17500000,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"commercial_property\",\n \"COM \",\n \"India\",\n \"INR\",\n 1011175420000,\n 8590000,\n 0,\n 1712169000000,\n 245000000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"non_agricultural_land\",\n \"NA \",\n \"India\",\n \"EUR\",\n 1286649000000,\n 8590000,\n 0,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"agricultural_land\",\n \"UA\",\n \"India\",\n \"USD\",\n 1697740200000,\n 230303,\n 0,\n 1712169000000,\n 309000,\n 12400\n ]\n ]\n },\n {\n \"name\": \"cost_of_improvement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"settlement_serial_number\",\n \"financial_year\",\n \"cost\",\n \"indexed_cost\"\n ],\n \"rows\": [\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"FY 2010-11\",\n 250000,\n null\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"FY 2012-13\",\n 250000,\n null\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"FY 2023-24\",\n 1330,\n null\n ]\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/it/calculator/pnl/real-estate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"real_estate_tradewise_settlement_workbook\",\n \"@entity\": \"workbook\",\n \"sheets\": [\n {\n \"name\": \"tradewise_settlement_sheet\",\n \"@entity\": \"sheet\",\n \"blocks\": [\n {\n \"name\": \"tradewise_settlement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"serial_number\",\n \"asset_type\",\n \"property_name\",\n \"country\",\n \"curency\",\n \"buy_date\",\n \"buy_price\",\n \"cost_of_acquisition\",\n \"sell_date\",\n \"sell_price\",\n \"transfer_expenses\"\n ],\n \"rows\": [\n [\n \"6abba3b3-d061-45f5-a947-c6a944663605\",\n \"residential_property\",\n \"RESID 1\",\n \"India\",\n \"INR\",\n 1696185000000,\n 15000000,\n 0,\n 1712255400000,\n 17500000,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"commercial_property\",\n \"COM \",\n \"India\",\n \"INR\",\n 1011175420000,\n 8590000,\n 0,\n 1712169000000,\n 245000000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"non_agricultural_land\",\n \"NA \",\n \"India\",\n \"EUR\",\n 1286649000000,\n 8590000,\n 0,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"agricultural_land\",\n \"UA\",\n \"India\",\n \"USD\",\n 1697740200000,\n 230303,\n 0,\n 1712169000000,\n 309000,\n 12400\n ]\n ]\n },\n {\n \"name\": \"cost_of_improvement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"settlement_serial_number\",\n \"financial_year\",\n \"cost\",\n \"indexed_cost\"\n ],\n \"rows\": [\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"FY 2010-11\",\n 250000,\n null\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"FY 2012-13\",\n 250000,\n null\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"FY 2023-24\",\n 1330,\n null\n ]\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "9e3f9759-5190-4a61-8f24-2ada23680936",
"code": 200,
"data": {
"@entity": "workbook",
"sheets": [
{
"@entity": "sheet",
"blocks": [
{
"@entity": "table",
"header": [
"settlement_id",
"asset_type",
"property_name",
"country",
"currency",
"holding_period",
"turnover",
"turnover_inr",
"buy_date",
"buy_price",
"buy_price_inr",
"cost_of_acquisition",
"cost_of_acquisition_inr",
"sell_date",
"sell_price",
"sell_price_inr",
"total_cost_of_improvement",
"total_cost_of_improvement_inr",
"realized_pnl",
"realized_pnl_inr",
"transfer_expenses",
"transfer_expenses_inr",
"net_realized_pnl",
"net_realized_pnl_inr"
],
"rows": [
[
"6abba3b3-d061-45f5-a947-c6a944663605",
"residential_property",
"RESID 1",
"India",
"INR",
"short_term",
17500000,
17500000,
1696185000000,
15000000,
15000000,
0,
0,
1712255400000,
17500000,
17500000,
0,
0,
2500000,
2500000,
10000,
10000,
2490000,
2490000
],
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"commercial_property",
"COM ",
"India",
"INR",
"long_term",
245000000,
245000000,
1011175420000,
8590000,
8590000,
0,
0,
1712169000000,
245000000,
245000000,
250000,
250000,
236410000,
236410000,
17000,
17000,
236143000,
236143000
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"non_agricultural_land",
"NA ",
"India",
"EUR",
"long_term",
24582000,
24582000,
1286649000000,
8590000,
8590000,
0,
0,
1712169000000,
24582000,
24582000,
250000,
250000,
15992000,
15992000,
17000,
17000,
15725000,
15725000
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"agricultural_land",
"UA",
"India",
"USD",
"short_term",
309000,
309000,
1697740200000,
230303,
19173288.9923,
0,
0,
1712169000000,
309000,
309000,
1330,
1330,
78697,
-18864288.9923,
12400,
12400,
64967,
-18878018.9923
]
],
"name": "tradewise_pnl_table"
},
{
"@entity": "table",
"header": [
"settlement_id",
"financial_year",
"cost",
"indexed_cost"
],
"rows": [
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"FY 2010-11",
250000,
543413.17
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"FY 2012-13",
250000,
453750
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"FY 2023-24",
1330,
1387.33
]
],
"name": "cost_of_improvement_table"
}
],
"name": "tradewise_pnl_sheet"
}
],
"name": "real_estate_tradewise_pnl_workbook"
},
"timestamp": "1740058116000"
}Real Estate
Check the processing status of a real estate P&L job.
POST
/
it
/
calculator
/
pnl
/
real-estate
Get P&L Sync
curl --request POST \
--url https://test-api.sandbox.co.in/it/calculator/pnl/real-estate \
--header 'Content-Type: application/json' \
--data '
{
"name": "real_estate_tradewise_settlement_workbook",
"@entity": "workbook",
"sheets": [
{
"name": "tradewise_settlement_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "tradewise_settlement_table",
"@entity": "table",
"header": [
"serial_number",
"asset_type",
"property_name",
"country",
"curency",
"buy_date",
"buy_price",
"cost_of_acquisition",
"sell_date",
"sell_price",
"transfer_expenses"
],
"rows": [
[
"6abba3b3-d061-45f5-a947-c6a944663605",
"residential_property",
"RESID 1",
"India",
"INR",
1696185000000,
15000000,
0,
1712255400000,
17500000,
10000
],
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"commercial_property",
"COM ",
"India",
"INR",
1011175420000,
8590000,
0,
1712169000000,
245000000,
17000
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"non_agricultural_land",
"NA ",
"India",
"EUR",
1286649000000,
8590000,
0,
1712169000000,
24582000,
17000
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"agricultural_land",
"UA",
"India",
"USD",
1697740200000,
230303,
0,
1712169000000,
309000,
12400
]
]
},
{
"name": "cost_of_improvement_table",
"@entity": "table",
"header": [
"settlement_serial_number",
"financial_year",
"cost",
"indexed_cost"
],
"rows": [
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"FY 2010-11",
250000,
null
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"FY 2012-13",
250000,
null
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"FY 2023-24",
1330,
null
]
]
}
]
}
]
}
'import requests
url = "https://test-api.sandbox.co.in/it/calculator/pnl/real-estate"
payload = {
"name": "real_estate_tradewise_settlement_workbook",
"@entity": "workbook",
"sheets": [
{
"name": "tradewise_settlement_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "tradewise_settlement_table",
"@entity": "table",
"header": ["serial_number", "asset_type", "property_name", "country", "curency", "buy_date", "buy_price", "cost_of_acquisition", "sell_date", "sell_price", "transfer_expenses"],
"rows": [["6abba3b3-d061-45f5-a947-c6a944663605", "residential_property", "RESID 1", "India", "INR", 1696185000000, 15000000, 0, 1712255400000, 17500000, 10000], ["592994fb-3b14-4ec7-9203-502cd8927bec", "commercial_property", "COM ", "India", "INR", 1011175420000, 8590000, 0, 1712169000000, 245000000, 17000], ["991d604c-989f-4530-948b-fa2e609c2d56", "non_agricultural_land", "NA ", "India", "EUR", 1286649000000, 8590000, 0, 1712169000000, 24582000, 17000], ["cfb66c3b-ae78-4559-9755-ee83ba1f5540", "agricultural_land", "UA", "India", "USD", 1697740200000, 230303, 0, 1712169000000, 309000, 12400]]
},
{
"name": "cost_of_improvement_table",
"@entity": "table",
"header": ["settlement_serial_number", "financial_year", "cost", "indexed_cost"],
"rows": [["592994fb-3b14-4ec7-9203-502cd8927bec", "FY 2010-11", 250000, None], ["991d604c-989f-4530-948b-fa2e609c2d56", "FY 2012-13", 250000, None], ["cfb66c3b-ae78-4559-9755-ee83ba1f5540", "FY 2023-24", 1330, None]]
}
]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'real_estate_tradewise_settlement_workbook',
'@entity': 'workbook',
sheets: [
{
name: 'tradewise_settlement_sheet',
'@entity': 'sheet',
blocks: [
{
name: 'tradewise_settlement_table',
'@entity': 'table',
header: [
'serial_number',
'asset_type',
'property_name',
'country',
'curency',
'buy_date',
'buy_price',
'cost_of_acquisition',
'sell_date',
'sell_price',
'transfer_expenses'
],
rows: [
[
'6abba3b3-d061-45f5-a947-c6a944663605',
'residential_property',
'RESID 1',
'India',
'INR',
1696185000000,
15000000,
0,
1712255400000,
17500000,
10000
],
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'commercial_property',
'COM ',
'India',
'INR',
1011175420000,
8590000,
0,
1712169000000,
245000000,
17000
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'non_agricultural_land',
'NA ',
'India',
'EUR',
1286649000000,
8590000,
0,
1712169000000,
24582000,
17000
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'agricultural_land',
'UA',
'India',
'USD',
1697740200000,
230303,
0,
1712169000000,
309000,
12400
]
]
},
{
name: 'cost_of_improvement_table',
'@entity': 'table',
header: ['settlement_serial_number', 'financial_year', 'cost', 'indexed_cost'],
rows: [
['592994fb-3b14-4ec7-9203-502cd8927bec', 'FY 2010-11', 250000, null],
['991d604c-989f-4530-948b-fa2e609c2d56', 'FY 2012-13', 250000, null],
['cfb66c3b-ae78-4559-9755-ee83ba1f5540', 'FY 2023-24', 1330, null]
]
}
]
}
]
})
};
fetch('https://test-api.sandbox.co.in/it/calculator/pnl/real-estate', 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://test-api.sandbox.co.in/it/calculator/pnl/real-estate",
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([
'name' => 'real_estate_tradewise_settlement_workbook',
'@entity' => 'workbook',
'sheets' => [
[
'name' => 'tradewise_settlement_sheet',
'@entity' => 'sheet',
'blocks' => [
[
'name' => 'tradewise_settlement_table',
'@entity' => 'table',
'header' => [
'serial_number',
'asset_type',
'property_name',
'country',
'curency',
'buy_date',
'buy_price',
'cost_of_acquisition',
'sell_date',
'sell_price',
'transfer_expenses'
],
'rows' => [
[
'6abba3b3-d061-45f5-a947-c6a944663605',
'residential_property',
'RESID 1',
'India',
'INR',
1696185000000,
15000000,
0,
1712255400000,
17500000,
10000
],
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'commercial_property',
'COM ',
'India',
'INR',
1011175420000,
8590000,
0,
1712169000000,
245000000,
17000
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'non_agricultural_land',
'NA ',
'India',
'EUR',
1286649000000,
8590000,
0,
1712169000000,
24582000,
17000
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'agricultural_land',
'UA',
'India',
'USD',
1697740200000,
230303,
0,
1712169000000,
309000,
12400
]
]
],
[
'name' => 'cost_of_improvement_table',
'@entity' => 'table',
'header' => [
'settlement_serial_number',
'financial_year',
'cost',
'indexed_cost'
],
'rows' => [
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'FY 2010-11',
250000,
null
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'FY 2012-13',
250000,
null
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'FY 2023-24',
1330,
null
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"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://test-api.sandbox.co.in/it/calculator/pnl/real-estate"
payload := strings.NewReader("{\n \"name\": \"real_estate_tradewise_settlement_workbook\",\n \"@entity\": \"workbook\",\n \"sheets\": [\n {\n \"name\": \"tradewise_settlement_sheet\",\n \"@entity\": \"sheet\",\n \"blocks\": [\n {\n \"name\": \"tradewise_settlement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"serial_number\",\n \"asset_type\",\n \"property_name\",\n \"country\",\n \"curency\",\n \"buy_date\",\n \"buy_price\",\n \"cost_of_acquisition\",\n \"sell_date\",\n \"sell_price\",\n \"transfer_expenses\"\n ],\n \"rows\": [\n [\n \"6abba3b3-d061-45f5-a947-c6a944663605\",\n \"residential_property\",\n \"RESID 1\",\n \"India\",\n \"INR\",\n 1696185000000,\n 15000000,\n 0,\n 1712255400000,\n 17500000,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"commercial_property\",\n \"COM \",\n \"India\",\n \"INR\",\n 1011175420000,\n 8590000,\n 0,\n 1712169000000,\n 245000000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"non_agricultural_land\",\n \"NA \",\n \"India\",\n \"EUR\",\n 1286649000000,\n 8590000,\n 0,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"agricultural_land\",\n \"UA\",\n \"India\",\n \"USD\",\n 1697740200000,\n 230303,\n 0,\n 1712169000000,\n 309000,\n 12400\n ]\n ]\n },\n {\n \"name\": \"cost_of_improvement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"settlement_serial_number\",\n \"financial_year\",\n \"cost\",\n \"indexed_cost\"\n ],\n \"rows\": [\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"FY 2010-11\",\n 250000,\n null\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"FY 2012-13\",\n 250000,\n null\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"FY 2023-24\",\n 1330,\n null\n ]\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://test-api.sandbox.co.in/it/calculator/pnl/real-estate")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"real_estate_tradewise_settlement_workbook\",\n \"@entity\": \"workbook\",\n \"sheets\": [\n {\n \"name\": \"tradewise_settlement_sheet\",\n \"@entity\": \"sheet\",\n \"blocks\": [\n {\n \"name\": \"tradewise_settlement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"serial_number\",\n \"asset_type\",\n \"property_name\",\n \"country\",\n \"curency\",\n \"buy_date\",\n \"buy_price\",\n \"cost_of_acquisition\",\n \"sell_date\",\n \"sell_price\",\n \"transfer_expenses\"\n ],\n \"rows\": [\n [\n \"6abba3b3-d061-45f5-a947-c6a944663605\",\n \"residential_property\",\n \"RESID 1\",\n \"India\",\n \"INR\",\n 1696185000000,\n 15000000,\n 0,\n 1712255400000,\n 17500000,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"commercial_property\",\n \"COM \",\n \"India\",\n \"INR\",\n 1011175420000,\n 8590000,\n 0,\n 1712169000000,\n 245000000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"non_agricultural_land\",\n \"NA \",\n \"India\",\n \"EUR\",\n 1286649000000,\n 8590000,\n 0,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"agricultural_land\",\n \"UA\",\n \"India\",\n \"USD\",\n 1697740200000,\n 230303,\n 0,\n 1712169000000,\n 309000,\n 12400\n ]\n ]\n },\n {\n \"name\": \"cost_of_improvement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"settlement_serial_number\",\n \"financial_year\",\n \"cost\",\n \"indexed_cost\"\n ],\n \"rows\": [\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"FY 2010-11\",\n 250000,\n null\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"FY 2012-13\",\n 250000,\n null\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"FY 2023-24\",\n 1330,\n null\n ]\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/it/calculator/pnl/real-estate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"real_estate_tradewise_settlement_workbook\",\n \"@entity\": \"workbook\",\n \"sheets\": [\n {\n \"name\": \"tradewise_settlement_sheet\",\n \"@entity\": \"sheet\",\n \"blocks\": [\n {\n \"name\": \"tradewise_settlement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"serial_number\",\n \"asset_type\",\n \"property_name\",\n \"country\",\n \"curency\",\n \"buy_date\",\n \"buy_price\",\n \"cost_of_acquisition\",\n \"sell_date\",\n \"sell_price\",\n \"transfer_expenses\"\n ],\n \"rows\": [\n [\n \"6abba3b3-d061-45f5-a947-c6a944663605\",\n \"residential_property\",\n \"RESID 1\",\n \"India\",\n \"INR\",\n 1696185000000,\n 15000000,\n 0,\n 1712255400000,\n 17500000,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"commercial_property\",\n \"COM \",\n \"India\",\n \"INR\",\n 1011175420000,\n 8590000,\n 0,\n 1712169000000,\n 245000000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"non_agricultural_land\",\n \"NA \",\n \"India\",\n \"EUR\",\n 1286649000000,\n 8590000,\n 0,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"agricultural_land\",\n \"UA\",\n \"India\",\n \"USD\",\n 1697740200000,\n 230303,\n 0,\n 1712169000000,\n 309000,\n 12400\n ]\n ]\n },\n {\n \"name\": \"cost_of_improvement_table\",\n \"@entity\": \"table\",\n \"header\": [\n \"settlement_serial_number\",\n \"financial_year\",\n \"cost\",\n \"indexed_cost\"\n ],\n \"rows\": [\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"FY 2010-11\",\n 250000,\n null\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"FY 2012-13\",\n 250000,\n null\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"FY 2023-24\",\n 1330,\n null\n ]\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "9e3f9759-5190-4a61-8f24-2ada23680936",
"code": 200,
"data": {
"@entity": "workbook",
"sheets": [
{
"@entity": "sheet",
"blocks": [
{
"@entity": "table",
"header": [
"settlement_id",
"asset_type",
"property_name",
"country",
"currency",
"holding_period",
"turnover",
"turnover_inr",
"buy_date",
"buy_price",
"buy_price_inr",
"cost_of_acquisition",
"cost_of_acquisition_inr",
"sell_date",
"sell_price",
"sell_price_inr",
"total_cost_of_improvement",
"total_cost_of_improvement_inr",
"realized_pnl",
"realized_pnl_inr",
"transfer_expenses",
"transfer_expenses_inr",
"net_realized_pnl",
"net_realized_pnl_inr"
],
"rows": [
[
"6abba3b3-d061-45f5-a947-c6a944663605",
"residential_property",
"RESID 1",
"India",
"INR",
"short_term",
17500000,
17500000,
1696185000000,
15000000,
15000000,
0,
0,
1712255400000,
17500000,
17500000,
0,
0,
2500000,
2500000,
10000,
10000,
2490000,
2490000
],
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"commercial_property",
"COM ",
"India",
"INR",
"long_term",
245000000,
245000000,
1011175420000,
8590000,
8590000,
0,
0,
1712169000000,
245000000,
245000000,
250000,
250000,
236410000,
236410000,
17000,
17000,
236143000,
236143000
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"non_agricultural_land",
"NA ",
"India",
"EUR",
"long_term",
24582000,
24582000,
1286649000000,
8590000,
8590000,
0,
0,
1712169000000,
24582000,
24582000,
250000,
250000,
15992000,
15992000,
17000,
17000,
15725000,
15725000
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"agricultural_land",
"UA",
"India",
"USD",
"short_term",
309000,
309000,
1697740200000,
230303,
19173288.9923,
0,
0,
1712169000000,
309000,
309000,
1330,
1330,
78697,
-18864288.9923,
12400,
12400,
64967,
-18878018.9923
]
],
"name": "tradewise_pnl_table"
},
{
"@entity": "table",
"header": [
"settlement_id",
"financial_year",
"cost",
"indexed_cost"
],
"rows": [
[
"592994fb-3b14-4ec7-9203-502cd8927bec",
"FY 2010-11",
250000,
543413.17
],
[
"991d604c-989f-4530-948b-fa2e609c2d56",
"FY 2012-13",
250000,
453750
],
[
"cfb66c3b-ae78-4559-9755-ee83ba1f5540",
"FY 2023-24",
1330,
1387.33
]
],
"name": "cost_of_improvement_table"
}
],
"name": "tradewise_pnl_sheet"
}
],
"name": "real_estate_tradewise_pnl_workbook"
},
"timestamp": "1740058116000"
}Headers
Token for user-level authorization.
Your API key used to authenticate and authorize the request.
Was this page helpful?