Save GSTR-3B past liability breakup
curl --request POST \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"breakup": [
{
"ret_period": "032020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
},
{
"ret_period": "022020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
}
]
}
'import requests
url = "https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup"
payload = { "breakup": [
{
"ret_period": "032020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
},
{
"ret_period": "022020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
}
] }
headers = {
"authorization": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
breakup: [
{
ret_period: '032020',
liability: {iamt: 1000, camt: 150, samt: 200, csamt: 300}
},
{
ret_period: '022020',
liability: {iamt: 1000, camt: 150, samt: 200, csamt: 300}
}
]
})
};
fetch('https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup', 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.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup",
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([
'breakup' => [
[
'ret_period' => '032020',
'liability' => [
'iamt' => 1000,
'camt' => 150,
'samt' => 200,
'csamt' => 300
]
],
[
'ret_period' => '022020',
'liability' => [
'iamt' => 1000,
'camt' => 150,
'samt' => 200,
'csamt' => 300
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <api-key>",
"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.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup"
payload := strings.NewReader("{\n \"breakup\": [\n {\n \"ret_period\": \"032020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n },\n {\n \"ret_period\": \"022020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
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://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup")
.header("authorization", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"breakup\": [\n {\n \"ret_period\": \"032020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n },\n {\n \"ret_period\": \"022020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"breakup\": [\n {\n \"ret_period\": \"032020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n },\n {\n \"ret_period\": \"022020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1795478400000,
"transaction_id": "00000000-0000-4000-8000-000046983942",
"data": {
"status_cd": "1",
"data": {
"reference_id": "243255"
}
}
}Save GSTR-3B past liability breakup
Declare the liability breakup for past return periods.
POST
/
gst
/
compliance
/
tax-payer
/
gstrs
/
gstr-3b
/
{year}
/
{month}
/
past-liability-breakup
Save GSTR-3B past liability breakup
curl --request POST \
--url https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"breakup": [
{
"ret_period": "032020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
},
{
"ret_period": "022020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
}
]
}
'import requests
url = "https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup"
payload = { "breakup": [
{
"ret_period": "032020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
},
{
"ret_period": "022020",
"liability": {
"iamt": 1000,
"camt": 150,
"samt": 200,
"csamt": 300
}
}
] }
headers = {
"authorization": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
authorization: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
breakup: [
{
ret_period: '032020',
liability: {iamt: 1000, camt: 150, samt: 200, csamt: 300}
},
{
ret_period: '022020',
liability: {iamt: 1000, camt: 150, samt: 200, csamt: 300}
}
]
})
};
fetch('https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup', 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.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup",
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([
'breakup' => [
[
'ret_period' => '032020',
'liability' => [
'iamt' => 1000,
'camt' => 150,
'samt' => 200,
'csamt' => 300
]
],
[
'ret_period' => '022020',
'liability' => [
'iamt' => 1000,
'camt' => 150,
'samt' => 200,
'csamt' => 300
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <api-key>",
"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.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup"
payload := strings.NewReader("{\n \"breakup\": [\n {\n \"ret_period\": \"032020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n },\n {\n \"ret_period\": \"022020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
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://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup")
.header("authorization", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"breakup\": [\n {\n \"ret_period\": \"032020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n },\n {\n \"ret_period\": \"022020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.co.in/gst/compliance/tax-payer/gstrs/gstr-3b/{year}/{month}/past-liability-breakup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"breakup\": [\n {\n \"ret_period\": \"032020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n },\n {\n \"ret_period\": \"022020\",\n \"liability\": {\n \"iamt\": 1000,\n \"camt\": 150,\n \"samt\": 200,\n \"csamt\": 300\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"timestamp": 1795478400000,
"transaction_id": "00000000-0000-4000-8000-000046983942",
"data": {
"status_cd": "1",
"data": {
"reference_id": "243255"
}
}
}Request body schema
View JSON request body schema
Response schema
For successful responses, this schema describes the GSTN payload atdata.data.
View response JSON schema
Excel field reference
View Excel field reference
Authorizations
GST taxpayer access token returned by Verify OTP.
Path Parameters
Body
application/json
Response
200 - application/json
GSTN response. data.status_cd is "1" for success and "0" for a business error.
- Option 1
- GSTN business error
A GSTN success or GSTN business-failure response. Both variants use HTTP 200.