Get Tax P&L Job Status
curl --request GET \
--url https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto \
--header 'Authorization: <authorization>' \
--header 'x-accept-type: <x-accept-type>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto"
headers = {
"x-accept-type": "<x-accept-type>",
"x-api-key": "<x-api-key>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-accept-type': '<x-accept-type>',
'x-api-key': '<x-api-key>',
Authorization: '<authorization>'
}
};
fetch('https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto', 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/crypto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-accept-type: <x-accept-type>",
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-accept-type", "<x-accept-type>")
req.Header.Add("x-api-key", "<x-api-key>")
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.get("https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto")
.header("x-accept-type", "<x-accept-type>")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-accept-type"] = '<x-accept-type>'
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1676979940157,
"transaction_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"data": {
"@entity": "in.co.sandbox.it.calculator.cryto.tax_pnl.job",
"job_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"report": "tradewise",
"from": 1682945614000,
"to": 1683291214000,
"status": "succeeded",
"tax_pnl_workbook_url": "https://in-co-sandbox-it-calculator-crypto-tax-pnl-dev.s3.ap-south-1.amazonaws.com/tax_pnl_workbook.json"
}
}{
"code": 521,
"timestamp": 1672226687297,
"transaction_id": "a4d95225-1802-475b-a990-e57af523ea6e",
"message": "Data not found: 7baed565-4dc2-46a1-89c2-be35a0a38081"
}Poll the Crypto Tax P&L job you created via Submit Job. Pass the job_id you received earlier to retrieve its latest processing status plus any generated download links once the workbook is ready.
GET
/
it
/
calculator
/
tax-pnl
/
crypto
Get Tax P&L Job Status
curl --request GET \
--url https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto \
--header 'Authorization: <authorization>' \
--header 'x-accept-type: <x-accept-type>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto"
headers = {
"x-accept-type": "<x-accept-type>",
"x-api-key": "<x-api-key>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-accept-type': '<x-accept-type>',
'x-api-key': '<x-api-key>',
Authorization: '<authorization>'
}
};
fetch('https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto', 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/crypto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-accept-type: <x-accept-type>",
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-accept-type", "<x-accept-type>")
req.Header.Add("x-api-key", "<x-api-key>")
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.get("https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto")
.header("x-accept-type", "<x-accept-type>")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/it/calculator/tax-pnl/crypto")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-accept-type"] = '<x-accept-type>'
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1676979940157,
"transaction_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"data": {
"@entity": "in.co.sandbox.it.calculator.cryto.tax_pnl.job",
"job_id": "c01f847c-c42e-4577-9d01-a7208401a922",
"report": "tradewise",
"from": 1682945614000,
"to": 1683291214000,
"status": "succeeded",
"tax_pnl_workbook_url": "https://in-co-sandbox-it-calculator-crypto-tax-pnl-dev.s3.ap-south-1.amazonaws.com/tax_pnl_workbook.json"
}
}{
"code": 521,
"timestamp": 1672226687297,
"transaction_id": "a4d95225-1802-475b-a990-e57af523ea6e",
"message": "Data not found: 7baed565-4dc2-46a1-89c2-be35a0a38081"
}Run in Postman
Headers
Specifies the response format expected from the API. Use application/json for JSON responses or application/xlsx for Excel file downloads.application/xlsx
Available options:
application/xlsx, application/json 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
Unique identifier of the job whose processing status you want to fetch. Returned in the response when a tax P&L job is created.
Was this page helpful?