Submit Job
curl --request POST \
--url https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign \
--header 'Authorization: <authorization>' \
--header 'x-accept-type: <x-accept-type>' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-version: <x-api-version>'import requests
url = "https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign"
headers = {
"x-accept-type": "<x-accept-type>",
"x-api-key": "<x-api-key>",
"x-api-version": "<x-api-version>",
"Authorization": "<authorization>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-accept-type': '<x-accept-type>',
'x-api-key': '<x-api-key>',
'x-api-version': '<x-api-version>',
Authorization: '<authorization>'
}
};
fetch('https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign', 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/reports/tax-pnl/securities/foreign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-accept-type: <x-accept-type>",
"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"
"net/http"
"io"
)
func main() {
url := "https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-accept-type", "<x-accept-type>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("Authorization", "<authorization>")
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/reports/tax-pnl/securities/foreign")
.header("x-accept-type", "<x-accept-type>")
.header("x-api-key", "<x-api-key>")
.header("x-api-version", "<x-api-version>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-accept-type"] = '<x-accept-type>'
request["x-api-key"] = '<x-api-key>'
request["x-api-version"] = '<x-api-version>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1747891175423,
"data": {
"created_at": 1747891176339,
"updated_at": 1747891176339,
"@entity": "in.co.sandbox.it.reports.tax_pnl.securities.job",
"security_type": "domestic",
"url": "https://in-co-sandbox-it-reports-tax-pnl-sec-dev.s3.ap-south-1.amazonaws.com/domestic/9c6846f0-92db-4da3-b982-1b97967c320e/workbook.input?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLEACCESSKEY%2F20250522%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20250522T051936Z&X-Amz-Expires=86400&X-Amz-Signature=EXAMPLE_SIGNATURE&X-Amz-SignedHeaders=host&x-amz-checksum-crc32=AAAAAA%3D%3D&x-amz-sdk-checksum-algorithm=CRC32&x-id=PutObject",
"status": "created",
"job_id": "9c6846f0-92db-4da3-b982-1b97967c320e"
},
"transaction_id": "9c6846f0-92db-4da3-b982-1b97967c320e"
}Submit a job to prepare Tax P&L Reports for tradebook and tradewise settlements.
POST
/
it
/
reports
/
tax-pnl
/
securities
/
foreign
Submit Job
curl --request POST \
--url https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign \
--header 'Authorization: <authorization>' \
--header 'x-accept-type: <x-accept-type>' \
--header 'x-api-key: <x-api-key>' \
--header 'x-api-version: <x-api-version>'import requests
url = "https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign"
headers = {
"x-accept-type": "<x-accept-type>",
"x-api-key": "<x-api-key>",
"x-api-version": "<x-api-version>",
"Authorization": "<authorization>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-accept-type': '<x-accept-type>',
'x-api-key': '<x-api-key>',
'x-api-version': '<x-api-version>',
Authorization: '<authorization>'
}
};
fetch('https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign', 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/reports/tax-pnl/securities/foreign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-accept-type: <x-accept-type>",
"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"
"net/http"
"io"
)
func main() {
url := "https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-accept-type", "<x-accept-type>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("Authorization", "<authorization>")
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/reports/tax-pnl/securities/foreign")
.header("x-accept-type", "<x-accept-type>")
.header("x-api-key", "<x-api-key>")
.header("x-api-version", "<x-api-version>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/it/reports/tax-pnl/securities/foreign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-accept-type"] = '<x-accept-type>'
request["x-api-key"] = '<x-api-key>'
request["x-api-version"] = '<x-api-version>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1747891175423,
"data": {
"created_at": 1747891176339,
"updated_at": 1747891176339,
"@entity": "in.co.sandbox.it.reports.tax_pnl.securities.job",
"security_type": "domestic",
"url": "https://in-co-sandbox-it-reports-tax-pnl-sec-dev.s3.ap-south-1.amazonaws.com/domestic/9c6846f0-92db-4da3-b982-1b97967c320e/workbook.input?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLEACCESSKEY%2F20250522%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20250522T051936Z&X-Amz-Expires=86400&X-Amz-Signature=EXAMPLE_SIGNATURE&X-Amz-SignedHeaders=host&x-amz-checksum-crc32=AAAAAA%3D%3D&x-amz-sdk-checksum-algorithm=CRC32&x-id=PutObject",
"status": "created",
"job_id": "9c6846f0-92db-4da3-b982-1b97967c320e"
},
"transaction_id": "9c6846f0-92db-4da3-b982-1b97967c320e"
}Headers
Specifies the response format expected from the API. Use application/json for JSON responses or application/xlsx for Excel file downloads.
Your API key used to authenticate and authorize the request.
Indicates the version of the API you want to use. Ensures backward-compatible behavior.
Bearer token for user-level authorization. Typically passed as Bearer {{access_token}}.
Query Parameters
Type of input file. Allowed values: tradewise_settlement or tradebook.
Available options:
tradebook, tradewise_settlement Financial year for which the report is generated. Use format FY 20XX-XX (e.g., FY 2024-25).
Pattern:
^FY (19|20)\d{2}-\d{2}$Was this page helpful?
āI