Skip to main content
POST
/
it
/
calculator
/
tax-pnl
/
other
/it/calculator/other/tax-pnl
curl --request POST \
  --url https://test-api.sandbox.co.in/it/calculator/tax-pnl/other \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-api-version: <x-api-version>' \
  --data '
{
  "name": "other_tradewise_settlement_workbook",
  "@entity": "workbook",
  "sheets": [
    {
      "name": "tradewise_settlement_sheet",
      "@entity": "sheet",
      "blocks": [
        {
          "name": "tradewise_settlement_table",
          "@entity": "table",
          "header": [
            "serial_number",
            "asset_type",
            "asset_name",
            "country",
            "currency",
            "buy_date",
            "buy_price",
            "cost_of_acquisition",
            "sell_date",
            "sell_price",
            "transfer_expenses"
          ],
          "rows": [
            [
              "6abba3b3-d061-45f5-a947-c6a944663605",
              "jewelry",
              "jew",
              "india",
              "INR",
              1696185000000,
              25000000,
              25000000,
              1712255400000,
              17500100,
              10000
            ],
            [
              "592994fb-3b14-4ec7-9203-502cd8927bec",
              "art",
              "art",
              "india",
              "INR",
              1286649000000,
              9590000,
              9590000,
              1712169000000,
              24520000,
              17000
            ],
            [
              "991d604c-989f-4530-948b-fa2e609c2d56",
              "car",
              "car",
              "india",
              "INR",
              1286649000000,
              8590010,
              8590010,
              1712169000000,
              24582000,
              17000
            ],
            [
              "cfb66c3b-ae78-4559-9755-ee83ba1f5540",
              "other",
              "other",
              "india",
              "INR",
              1697740200000,
              2301010,
              2301010,
              1712169000000,
              1309000,
              12400
            ]
          ]
        },
        {
          "name": "cost_of_improvement_table",
          "@entity": "table",
          "header": [
            "settlement_serial_number",
            "financial_year",
            "cost",
            "indexed_cost"
          ],
          "rows": [
            [
              "592994fb-3b14-4ec7-9203-502cd8927bec",
              "FY 2011-12",
              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/tax-pnl/other"

payload = {
"name": "other_tradewise_settlement_workbook",
"@entity": "workbook",
"sheets": [
{
"name": "tradewise_settlement_sheet",
"@entity": "sheet",
"blocks": [
{
"name": "tradewise_settlement_table",
"@entity": "table",
"header": ["serial_number", "asset_type", "asset_name", "country", "currency", "buy_date", "buy_price", "cost_of_acquisition", "sell_date", "sell_price", "transfer_expenses"],
"rows": [["6abba3b3-d061-45f5-a947-c6a944663605", "jewelry", "jew", "india", "INR", 1696185000000, 25000000, 25000000, 1712255400000, 17500100, 10000], ["592994fb-3b14-4ec7-9203-502cd8927bec", "art", "art", "india", "INR", 1286649000000, 9590000, 9590000, 1712169000000, 24520000, 17000], ["991d604c-989f-4530-948b-fa2e609c2d56", "car", "car", "india", "INR", 1286649000000, 8590010, 8590010, 1712169000000, 24582000, 17000], ["cfb66c3b-ae78-4559-9755-ee83ba1f5540", "other", "other", "india", "INR", 1697740200000, 2301010, 2301010, 1712169000000, 1309000, 12400]]
},
{
"name": "cost_of_improvement_table",
"@entity": "table",
"header": ["settlement_serial_number", "financial_year", "cost", "indexed_cost"],
"rows": [["592994fb-3b14-4ec7-9203-502cd8927bec", "FY 2011-12", 250000, None], ["991d604c-989f-4530-948b-fa2e609c2d56", "FY 2012-13", 250000, None], ["cfb66c3b-ae78-4559-9755-ee83ba1f5540", "FY 2023-24", 1330, None]]
}
]
}
]
}
headers = {
"x-api-key": "<x-api-key>",
"x-api-version": "<x-api-version>",
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-api-key': '<x-api-key>',
'x-api-version': '<x-api-version>',
Authorization: '<authorization>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'other_tradewise_settlement_workbook',
'@entity': 'workbook',
sheets: [
{
name: 'tradewise_settlement_sheet',
'@entity': 'sheet',
blocks: [
{
name: 'tradewise_settlement_table',
'@entity': 'table',
header: [
'serial_number',
'asset_type',
'asset_name',
'country',
'currency',
'buy_date',
'buy_price',
'cost_of_acquisition',
'sell_date',
'sell_price',
'transfer_expenses'
],
rows: [
[
'6abba3b3-d061-45f5-a947-c6a944663605',
'jewelry',
'jew',
'india',
'INR',
1696185000000,
25000000,
25000000,
1712255400000,
17500100,
10000
],
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'art',
'art',
'india',
'INR',
1286649000000,
9590000,
9590000,
1712169000000,
24520000,
17000
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'car',
'car',
'india',
'INR',
1286649000000,
8590010,
8590010,
1712169000000,
24582000,
17000
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'other',
'other',
'india',
'INR',
1697740200000,
2301010,
2301010,
1712169000000,
1309000,
12400
]
]
},
{
name: 'cost_of_improvement_table',
'@entity': 'table',
header: ['settlement_serial_number', 'financial_year', 'cost', 'indexed_cost'],
rows: [
['592994fb-3b14-4ec7-9203-502cd8927bec', 'FY 2011-12', 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/tax-pnl/other', 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/tax-pnl/other",
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' => 'other_tradewise_settlement_workbook',
'@entity' => 'workbook',
'sheets' => [
[
'name' => 'tradewise_settlement_sheet',
'@entity' => 'sheet',
'blocks' => [
[
'name' => 'tradewise_settlement_table',
'@entity' => 'table',
'header' => [
'serial_number',
'asset_type',
'asset_name',
'country',
'currency',
'buy_date',
'buy_price',
'cost_of_acquisition',
'sell_date',
'sell_price',
'transfer_expenses'
],
'rows' => [
[
'6abba3b3-d061-45f5-a947-c6a944663605',
'jewelry',
'jew',
'india',
'INR',
1696185000000,
25000000,
25000000,
1712255400000,
17500100,
10000
],
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'art',
'art',
'india',
'INR',
1286649000000,
9590000,
9590000,
1712169000000,
24520000,
17000
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'car',
'car',
'india',
'INR',
1286649000000,
8590010,
8590010,
1712169000000,
24582000,
17000
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'other',
'other',
'india',
'INR',
1697740200000,
2301010,
2301010,
1712169000000,
1309000,
12400
]
]
],
[
'name' => 'cost_of_improvement_table',
'@entity' => 'table',
'header' => [
'settlement_serial_number',
'financial_year',
'cost',
'indexed_cost'
],
'rows' => [
[
'592994fb-3b14-4ec7-9203-502cd8927bec',
'FY 2011-12',
250000,
null
],
[
'991d604c-989f-4530-948b-fa2e609c2d56',
'FY 2012-13',
250000,
null
],
[
'cfb66c3b-ae78-4559-9755-ee83ba1f5540',
'FY 2023-24',
1330,
null
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-api-version: <x-api-version>"
],
]);

$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/tax-pnl/other"

payload := strings.NewReader("{\n \"name\": \"other_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 \"asset_name\",\n \"country\",\n \"currency\",\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 \"jewelry\",\n \"jew\",\n \"india\",\n \"INR\",\n 1696185000000,\n 25000000,\n 25000000,\n 1712255400000,\n 17500100,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"art\",\n \"art\",\n \"india\",\n \"INR\",\n 1286649000000,\n 9590000,\n 9590000,\n 1712169000000,\n 24520000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"car\",\n \"car\",\n \"india\",\n \"INR\",\n 1286649000000,\n 8590010,\n 8590010,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"other\",\n \"other\",\n \"india\",\n \"INR\",\n 1697740200000,\n 2301010,\n 2301010,\n 1712169000000,\n 1309000,\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 2011-12\",\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("x-api-key", "<x-api-key>")
req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("Authorization", "<authorization>")
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/tax-pnl/other")
.header("x-api-key", "<x-api-key>")
.header("x-api-version", "<x-api-version>")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"other_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 \"asset_name\",\n \"country\",\n \"currency\",\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 \"jewelry\",\n \"jew\",\n \"india\",\n \"INR\",\n 1696185000000,\n 25000000,\n 25000000,\n 1712255400000,\n 17500100,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"art\",\n \"art\",\n \"india\",\n \"INR\",\n 1286649000000,\n 9590000,\n 9590000,\n 1712169000000,\n 24520000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"car\",\n \"car\",\n \"india\",\n \"INR\",\n 1286649000000,\n 8590010,\n 8590010,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"other\",\n \"other\",\n \"india\",\n \"INR\",\n 1697740200000,\n 2301010,\n 2301010,\n 1712169000000,\n 1309000,\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 2011-12\",\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/tax-pnl/other")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-api-version"] = '<x-api-version>'
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"other_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 \"asset_name\",\n \"country\",\n \"currency\",\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 \"jewelry\",\n \"jew\",\n \"india\",\n \"INR\",\n 1696185000000,\n 25000000,\n 25000000,\n 1712255400000,\n 17500100,\n 10000\n ],\n [\n \"592994fb-3b14-4ec7-9203-502cd8927bec\",\n \"art\",\n \"art\",\n \"india\",\n \"INR\",\n 1286649000000,\n 9590000,\n 9590000,\n 1712169000000,\n 24520000,\n 17000\n ],\n [\n \"991d604c-989f-4530-948b-fa2e609c2d56\",\n \"car\",\n \"car\",\n \"india\",\n \"INR\",\n 1286649000000,\n 8590010,\n 8590010,\n 1712169000000,\n 24582000,\n 17000\n ],\n [\n \"cfb66c3b-ae78-4559-9755-ee83ba1f5540\",\n \"other\",\n \"other\",\n \"india\",\n \"INR\",\n 1697740200000,\n 2301010,\n 2301010,\n 1712169000000,\n 1309000,\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 2011-12\",\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

Headers

x-api-key
string
required

Your API key used to authenticate and authorize the request.

x-api-version
string
required

Indicates the version of the API you want to use. Ensures backward-compatible behavior.

Authorization
string
required

Token for user-level authorization.

Query Parameters

Body

application/json
name
string
@entity
string
sheets
object[]