Skip to main content
POST
/
gst
/
compliance
/
tax-payer
/
invoices
/
status
/
save
Save Invoice Status
curl --request POST \
  --url https://api.sandbox.co.in/gst/compliance/tax-payer/invoices/status/save \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "rtin": "24SHUBH3221U1Z1",
  "reqtyp": "SAVE",
  "invdata": {
    "b2b": [
      {
        "stin": "24MAYAS0100J1JD",
        "inum": "b1",
        "inv_typ": "R",
        "action": "A",
        "srcform": "R1",
        "rtnprd": "012023",
        "idt": "23-01-2023",
        "val": 1000,
        "pos": "24",
        "txval": 100,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "remarks": "Business to business changes"
      }
    ],
    "b2ba": [
      {
        "oinum": "ab2",
        "oidt": "24-02-2023",
        "stin": "24MAYAS0100J1JD",
        "rtnprd": "012023",
        "inum": "b1a",
        "action": "A",
        "inv_typ": "R",
        "srcform": "R1",
        "idt": "24-02-2023",
        "val": 1000,
        "pos": "07",
        "txval": 100,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "itcRedReq": "Y",
        "declIgst": 2000,
        "declSgst": 500,
        "declCgst": 500,
        "declCess": 100,
        "remarks": "Business to business ammendment changes"
      }
    ],
    "b2bdn": [
      {
        "stin": "24MAYAS0100J1JD",
        "nt_num": "dn2",
        "action": "A",
        "inv_typ": "R",
        "srcform": "R1",
        "rtnprd": "012023",
        "nt_dt": "24-02-2023",
        "val": 1000.1,
        "pos": "07",
        "txval": 1000.1,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "remarks": "Business to business debit changes"
      }
    ],
    "b2bdna": [
      {
        "stin": "24MAYAS0100J1JD",
        "ont_num": "ca2",
        "ont_dt": "24-02-2023",
        "nt_num": "dn2",
        "action": "A",
        "inv_typ": "R",
        "srcform": "R1",
        "rtnprd": "012023",
        "nt_dt": "24-02-2023",
        "val": 1000.1,
        "pos": "07",
        "txval": 1000.1,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "itcRedReq": "Y",
        "declIgst": 2000,
        "declSgst": 500,
        "declCgst": 500,
        "declCess": 100,
        "remarks": "Business to business debit ammendment changes"
      }
    ],
    "b2bcn": [
      {
        "stin": "24MAYAS0100J1JD",
        "nt_num": "dn2",
        "action": "A",
        "inv_typ": "R",
        "srcform": "R1",
        "rtnprd": "012023",
        "nt_dt": "24-02-2023",
        "val": 1000.1,
        "pos": "07",
        "txval": 1000.1,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "itcRedReq": "Y",
        "declIgst": 2000,
        "declSgst": 500,
        "declCgst": 500,
        "declCess": 100,
        "remarks": "Business to business credit changes"
      }
    ],
    "b2bcna": [
      {
        "stin": "24MAYAS0100J1JD",
        "ont_num": "ca2",
        "ont_dt": "24-02-2023",
        "nt_num": "dn2",
        "action": "A",
        "inv_typ": "R",
        "srcform": "R1",
        "rtnprd": "012023",
        "nt_dt": "24-02-2023",
        "val": 1000.1,
        "pos": "07",
        "txval": 1000.1,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "itcRedReq": "Y",
        "declIgst": 2000,
        "declSgst": 500,
        "declCgst": 500,
        "declCess": 100,
        "remarks": "Business to business credit ammendment changes"
      }
    ],
    "ecom": [
      {
        "stin": "24MAYAS0100J1JD",
        "rtnprd": "012023",
        "inum": "sd3",
        "action": "A",
        "srcform": "R1",
        "idt": "24-02-2023",
        "val": 1000,
        "pos": "07",
        "txval": 1000,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "remarks": "E-com operator changes"
      }
    ],
    "ecoma": [
      {
        "stin": "24MAYAS0100J1JD",
        "oinum": "get5",
        "oidt": "24-02-2023",
        "rtnprd": "012023",
        "inum": "sd3",
        "action": "A",
        "srcform": "R1",
        "idt": "24-02-2023",
        "val": 1000,
        "pos": "07",
        "txval": 1000,
        "iamt": 20,
        "camt": 20,
        "samt": 20,
        "cess": 0,
        "prev_status": "A",
        "itcRedReq": "Y",
        "declIgst": 2000,
        "declSgst": 500,
        "declCgst": 500,
        "declCess": 100,
        "remarks": "E-com operator changes ammendment changes"
      }
    ]
  }
}
'
import requests

url = "https://api.sandbox.co.in/gst/compliance/tax-payer/invoices/status/save"

payload = {
"rtin": "24SHUBH3221U1Z1",
"reqtyp": "SAVE",
"invdata": {
"b2b": [
{
"stin": "24MAYAS0100J1JD",
"inum": "b1",
"inv_typ": "R",
"action": "A",
"srcform": "R1",
"rtnprd": "012023",
"idt": "23-01-2023",
"val": 1000,
"pos": "24",
"txval": 100,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"remarks": "Business to business changes"
}
],
"b2ba": [
{
"oinum": "ab2",
"oidt": "24-02-2023",
"stin": "24MAYAS0100J1JD",
"rtnprd": "012023",
"inum": "b1a",
"action": "A",
"inv_typ": "R",
"srcform": "R1",
"idt": "24-02-2023",
"val": 1000,
"pos": "07",
"txval": 100,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"itcRedReq": "Y",
"declIgst": 2000,
"declSgst": 500,
"declCgst": 500,
"declCess": 100,
"remarks": "Business to business ammendment changes"
}
],
"b2bdn": [
{
"stin": "24MAYAS0100J1JD",
"nt_num": "dn2",
"action": "A",
"inv_typ": "R",
"srcform": "R1",
"rtnprd": "012023",
"nt_dt": "24-02-2023",
"val": 1000.1,
"pos": "07",
"txval": 1000.1,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"remarks": "Business to business debit changes"
}
],
"b2bdna": [
{
"stin": "24MAYAS0100J1JD",
"ont_num": "ca2",
"ont_dt": "24-02-2023",
"nt_num": "dn2",
"action": "A",
"inv_typ": "R",
"srcform": "R1",
"rtnprd": "012023",
"nt_dt": "24-02-2023",
"val": 1000.1,
"pos": "07",
"txval": 1000.1,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"itcRedReq": "Y",
"declIgst": 2000,
"declSgst": 500,
"declCgst": 500,
"declCess": 100,
"remarks": "Business to business debit ammendment changes"
}
],
"b2bcn": [
{
"stin": "24MAYAS0100J1JD",
"nt_num": "dn2",
"action": "A",
"inv_typ": "R",
"srcform": "R1",
"rtnprd": "012023",
"nt_dt": "24-02-2023",
"val": 1000.1,
"pos": "07",
"txval": 1000.1,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"itcRedReq": "Y",
"declIgst": 2000,
"declSgst": 500,
"declCgst": 500,
"declCess": 100,
"remarks": "Business to business credit changes"
}
],
"b2bcna": [
{
"stin": "24MAYAS0100J1JD",
"ont_num": "ca2",
"ont_dt": "24-02-2023",
"nt_num": "dn2",
"action": "A",
"inv_typ": "R",
"srcform": "R1",
"rtnprd": "012023",
"nt_dt": "24-02-2023",
"val": 1000.1,
"pos": "07",
"txval": 1000.1,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"itcRedReq": "Y",
"declIgst": 2000,
"declSgst": 500,
"declCgst": 500,
"declCess": 100,
"remarks": "Business to business credit ammendment changes"
}
],
"ecom": [
{
"stin": "24MAYAS0100J1JD",
"rtnprd": "012023",
"inum": "sd3",
"action": "A",
"srcform": "R1",
"idt": "24-02-2023",
"val": 1000,
"pos": "07",
"txval": 1000,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"remarks": "E-com operator changes"
}
],
"ecoma": [
{
"stin": "24MAYAS0100J1JD",
"oinum": "get5",
"oidt": "24-02-2023",
"rtnprd": "012023",
"inum": "sd3",
"action": "A",
"srcform": "R1",
"idt": "24-02-2023",
"val": 1000,
"pos": "07",
"txval": 1000,
"iamt": 20,
"camt": 20,
"samt": 20,
"cess": 0,
"prev_status": "A",
"itcRedReq": "Y",
"declIgst": 2000,
"declSgst": 500,
"declCgst": 500,
"declCess": 100,
"remarks": "E-com operator changes ammendment changes"
}
]
}
}
headers = {
"authorization": "<authorization>",
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {
authorization: '<authorization>',
'x-api-key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
rtin: '24SHUBH3221U1Z1',
reqtyp: 'SAVE',
invdata: {
b2b: [
{
stin: '24MAYAS0100J1JD',
inum: 'b1',
inv_typ: 'R',
action: 'A',
srcform: 'R1',
rtnprd: '012023',
idt: '23-01-2023',
val: 1000,
pos: '24',
txval: 100,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
remarks: 'Business to business changes'
}
],
b2ba: [
{
oinum: 'ab2',
oidt: '24-02-2023',
stin: '24MAYAS0100J1JD',
rtnprd: '012023',
inum: 'b1a',
action: 'A',
inv_typ: 'R',
srcform: 'R1',
idt: '24-02-2023',
val: 1000,
pos: '07',
txval: 100,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
itcRedReq: 'Y',
declIgst: 2000,
declSgst: 500,
declCgst: 500,
declCess: 100,
remarks: 'Business to business ammendment changes'
}
],
b2bdn: [
{
stin: '24MAYAS0100J1JD',
nt_num: 'dn2',
action: 'A',
inv_typ: 'R',
srcform: 'R1',
rtnprd: '012023',
nt_dt: '24-02-2023',
val: 1000.1,
pos: '07',
txval: 1000.1,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
remarks: 'Business to business debit changes'
}
],
b2bdna: [
{
stin: '24MAYAS0100J1JD',
ont_num: 'ca2',
ont_dt: '24-02-2023',
nt_num: 'dn2',
action: 'A',
inv_typ: 'R',
srcform: 'R1',
rtnprd: '012023',
nt_dt: '24-02-2023',
val: 1000.1,
pos: '07',
txval: 1000.1,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
itcRedReq: 'Y',
declIgst: 2000,
declSgst: 500,
declCgst: 500,
declCess: 100,
remarks: 'Business to business debit ammendment changes'
}
],
b2bcn: [
{
stin: '24MAYAS0100J1JD',
nt_num: 'dn2',
action: 'A',
inv_typ: 'R',
srcform: 'R1',
rtnprd: '012023',
nt_dt: '24-02-2023',
val: 1000.1,
pos: '07',
txval: 1000.1,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
itcRedReq: 'Y',
declIgst: 2000,
declSgst: 500,
declCgst: 500,
declCess: 100,
remarks: 'Business to business credit changes'
}
],
b2bcna: [
{
stin: '24MAYAS0100J1JD',
ont_num: 'ca2',
ont_dt: '24-02-2023',
nt_num: 'dn2',
action: 'A',
inv_typ: 'R',
srcform: 'R1',
rtnprd: '012023',
nt_dt: '24-02-2023',
val: 1000.1,
pos: '07',
txval: 1000.1,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
itcRedReq: 'Y',
declIgst: 2000,
declSgst: 500,
declCgst: 500,
declCess: 100,
remarks: 'Business to business credit ammendment changes'
}
],
ecom: [
{
stin: '24MAYAS0100J1JD',
rtnprd: '012023',
inum: 'sd3',
action: 'A',
srcform: 'R1',
idt: '24-02-2023',
val: 1000,
pos: '07',
txval: 1000,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
remarks: 'E-com operator changes'
}
],
ecoma: [
{
stin: '24MAYAS0100J1JD',
oinum: 'get5',
oidt: '24-02-2023',
rtnprd: '012023',
inum: 'sd3',
action: 'A',
srcform: 'R1',
idt: '24-02-2023',
val: 1000,
pos: '07',
txval: 1000,
iamt: 20,
camt: 20,
samt: 20,
cess: 0,
prev_status: 'A',
itcRedReq: 'Y',
declIgst: 2000,
declSgst: 500,
declCgst: 500,
declCess: 100,
remarks: 'E-com operator changes ammendment changes'
}
]
}
})
};

fetch('https://api.sandbox.co.in/gst/compliance/tax-payer/invoices/status/save', 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/invoices/status/save",
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([
'rtin' => '24SHUBH3221U1Z1',
'reqtyp' => 'SAVE',
'invdata' => [
'b2b' => [
[
'stin' => '24MAYAS0100J1JD',
'inum' => 'b1',
'inv_typ' => 'R',
'action' => 'A',
'srcform' => 'R1',
'rtnprd' => '012023',
'idt' => '23-01-2023',
'val' => 1000,
'pos' => '24',
'txval' => 100,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'remarks' => 'Business to business changes'
]
],
'b2ba' => [
[
'oinum' => 'ab2',
'oidt' => '24-02-2023',
'stin' => '24MAYAS0100J1JD',
'rtnprd' => '012023',
'inum' => 'b1a',
'action' => 'A',
'inv_typ' => 'R',
'srcform' => 'R1',
'idt' => '24-02-2023',
'val' => 1000,
'pos' => '07',
'txval' => 100,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'itcRedReq' => 'Y',
'declIgst' => 2000,
'declSgst' => 500,
'declCgst' => 500,
'declCess' => 100,
'remarks' => 'Business to business ammendment changes'
]
],
'b2bdn' => [
[
'stin' => '24MAYAS0100J1JD',
'nt_num' => 'dn2',
'action' => 'A',
'inv_typ' => 'R',
'srcform' => 'R1',
'rtnprd' => '012023',
'nt_dt' => '24-02-2023',
'val' => 1000.1,
'pos' => '07',
'txval' => 1000.1,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'remarks' => 'Business to business debit changes'
]
],
'b2bdna' => [
[
'stin' => '24MAYAS0100J1JD',
'ont_num' => 'ca2',
'ont_dt' => '24-02-2023',
'nt_num' => 'dn2',
'action' => 'A',
'inv_typ' => 'R',
'srcform' => 'R1',
'rtnprd' => '012023',
'nt_dt' => '24-02-2023',
'val' => 1000.1,
'pos' => '07',
'txval' => 1000.1,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'itcRedReq' => 'Y',
'declIgst' => 2000,
'declSgst' => 500,
'declCgst' => 500,
'declCess' => 100,
'remarks' => 'Business to business debit ammendment changes'
]
],
'b2bcn' => [
[
'stin' => '24MAYAS0100J1JD',
'nt_num' => 'dn2',
'action' => 'A',
'inv_typ' => 'R',
'srcform' => 'R1',
'rtnprd' => '012023',
'nt_dt' => '24-02-2023',
'val' => 1000.1,
'pos' => '07',
'txval' => 1000.1,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'itcRedReq' => 'Y',
'declIgst' => 2000,
'declSgst' => 500,
'declCgst' => 500,
'declCess' => 100,
'remarks' => 'Business to business credit changes'
]
],
'b2bcna' => [
[
'stin' => '24MAYAS0100J1JD',
'ont_num' => 'ca2',
'ont_dt' => '24-02-2023',
'nt_num' => 'dn2',
'action' => 'A',
'inv_typ' => 'R',
'srcform' => 'R1',
'rtnprd' => '012023',
'nt_dt' => '24-02-2023',
'val' => 1000.1,
'pos' => '07',
'txval' => 1000.1,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'itcRedReq' => 'Y',
'declIgst' => 2000,
'declSgst' => 500,
'declCgst' => 500,
'declCess' => 100,
'remarks' => 'Business to business credit ammendment changes'
]
],
'ecom' => [
[
'stin' => '24MAYAS0100J1JD',
'rtnprd' => '012023',
'inum' => 'sd3',
'action' => 'A',
'srcform' => 'R1',
'idt' => '24-02-2023',
'val' => 1000,
'pos' => '07',
'txval' => 1000,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'remarks' => 'E-com operator changes'
]
],
'ecoma' => [
[
'stin' => '24MAYAS0100J1JD',
'oinum' => 'get5',
'oidt' => '24-02-2023',
'rtnprd' => '012023',
'inum' => 'sd3',
'action' => 'A',
'srcform' => 'R1',
'idt' => '24-02-2023',
'val' => 1000,
'pos' => '07',
'txval' => 1000,
'iamt' => 20,
'camt' => 20,
'samt' => 20,
'cess' => 0,
'prev_status' => 'A',
'itcRedReq' => 'Y',
'declIgst' => 2000,
'declSgst' => 500,
'declCgst' => 500,
'declCess' => 100,
'remarks' => 'E-com operator changes ammendment changes'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>",
"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"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.co.in/gst/compliance/tax-payer/invoices/status/save"

payload := strings.NewReader("{\n \"rtin\": \"24SHUBH3221U1Z1\",\n \"reqtyp\": \"SAVE\",\n \"invdata\": {\n \"b2b\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"inum\": \"b1\",\n \"inv_typ\": \"R\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"idt\": \"23-01-2023\",\n \"val\": 1000,\n \"pos\": \"24\",\n \"txval\": 100,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"Business to business changes\"\n }\n ],\n \"b2ba\": [\n {\n \"oinum\": \"ab2\",\n \"oidt\": \"24-02-2023\",\n \"stin\": \"24MAYAS0100J1JD\",\n \"rtnprd\": \"012023\",\n \"inum\": \"b1a\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 100,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business ammendment changes\"\n }\n ],\n \"b2bdn\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"Business to business debit changes\"\n }\n ],\n \"b2bdna\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"ont_num\": \"ca2\",\n \"ont_dt\": \"24-02-2023\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business debit ammendment changes\"\n }\n ],\n \"b2bcn\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business credit changes\"\n }\n ],\n \"b2bcna\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"ont_num\": \"ca2\",\n \"ont_dt\": \"24-02-2023\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business credit ammendment changes\"\n }\n ],\n \"ecom\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"rtnprd\": \"012023\",\n \"inum\": \"sd3\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 1000,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"E-com operator changes\"\n }\n ],\n \"ecoma\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"oinum\": \"get5\",\n \"oidt\": \"24-02-2023\",\n \"rtnprd\": \"012023\",\n \"inum\": \"sd3\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 1000,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"E-com operator changes ammendment changes\"\n }\n ]\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("authorization", "<authorization>")
req.Header.Add("x-api-key", "<x-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/invoices/status/save")
.header("authorization", "<authorization>")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rtin\": \"24SHUBH3221U1Z1\",\n \"reqtyp\": \"SAVE\",\n \"invdata\": {\n \"b2b\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"inum\": \"b1\",\n \"inv_typ\": \"R\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"idt\": \"23-01-2023\",\n \"val\": 1000,\n \"pos\": \"24\",\n \"txval\": 100,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"Business to business changes\"\n }\n ],\n \"b2ba\": [\n {\n \"oinum\": \"ab2\",\n \"oidt\": \"24-02-2023\",\n \"stin\": \"24MAYAS0100J1JD\",\n \"rtnprd\": \"012023\",\n \"inum\": \"b1a\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 100,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business ammendment changes\"\n }\n ],\n \"b2bdn\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"Business to business debit changes\"\n }\n ],\n \"b2bdna\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"ont_num\": \"ca2\",\n \"ont_dt\": \"24-02-2023\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business debit ammendment changes\"\n }\n ],\n \"b2bcn\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business credit changes\"\n }\n ],\n \"b2bcna\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"ont_num\": \"ca2\",\n \"ont_dt\": \"24-02-2023\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business credit ammendment changes\"\n }\n ],\n \"ecom\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"rtnprd\": \"012023\",\n \"inum\": \"sd3\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 1000,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"E-com operator changes\"\n }\n ],\n \"ecoma\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"oinum\": \"get5\",\n \"oidt\": \"24-02-2023\",\n \"rtnprd\": \"012023\",\n \"inum\": \"sd3\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 1000,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"E-com operator changes ammendment changes\"\n }\n ]\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.co.in/gst/compliance/tax-payer/invoices/status/save")

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

request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rtin\": \"24SHUBH3221U1Z1\",\n \"reqtyp\": \"SAVE\",\n \"invdata\": {\n \"b2b\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"inum\": \"b1\",\n \"inv_typ\": \"R\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"idt\": \"23-01-2023\",\n \"val\": 1000,\n \"pos\": \"24\",\n \"txval\": 100,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"Business to business changes\"\n }\n ],\n \"b2ba\": [\n {\n \"oinum\": \"ab2\",\n \"oidt\": \"24-02-2023\",\n \"stin\": \"24MAYAS0100J1JD\",\n \"rtnprd\": \"012023\",\n \"inum\": \"b1a\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 100,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business ammendment changes\"\n }\n ],\n \"b2bdn\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"Business to business debit changes\"\n }\n ],\n \"b2bdna\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"ont_num\": \"ca2\",\n \"ont_dt\": \"24-02-2023\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business debit ammendment changes\"\n }\n ],\n \"b2bcn\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business credit changes\"\n }\n ],\n \"b2bcna\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"ont_num\": \"ca2\",\n \"ont_dt\": \"24-02-2023\",\n \"nt_num\": \"dn2\",\n \"action\": \"A\",\n \"inv_typ\": \"R\",\n \"srcform\": \"R1\",\n \"rtnprd\": \"012023\",\n \"nt_dt\": \"24-02-2023\",\n \"val\": 1000.1,\n \"pos\": \"07\",\n \"txval\": 1000.1,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"Business to business credit ammendment changes\"\n }\n ],\n \"ecom\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"rtnprd\": \"012023\",\n \"inum\": \"sd3\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 1000,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"remarks\": \"E-com operator changes\"\n }\n ],\n \"ecoma\": [\n {\n \"stin\": \"24MAYAS0100J1JD\",\n \"oinum\": \"get5\",\n \"oidt\": \"24-02-2023\",\n \"rtnprd\": \"012023\",\n \"inum\": \"sd3\",\n \"action\": \"A\",\n \"srcform\": \"R1\",\n \"idt\": \"24-02-2023\",\n \"val\": 1000,\n \"pos\": \"07\",\n \"txval\": 1000,\n \"iamt\": 20,\n \"camt\": 20,\n \"samt\": 20,\n \"cess\": 0,\n \"prev_status\": \"A\",\n \"itcRedReq\": \"Y\",\n \"declIgst\": 2000,\n \"declSgst\": 500,\n \"declCgst\": 500,\n \"declCess\": 100,\n \"remarks\": \"E-com operator changes ammendment changes\"\n }\n ]\n }\n}"

response = http.request(request)
puts response.read_body
{
  "code": 200,
  "data": {
    "data": {
      "reference_id": "0032e479bcb644c"
    },
    "status_cd": "1"
  },
  "timestamp": 1763446641000,
  "transaction_id": "0f7f60a2-862c-4a1b-b6b4-baa76c6faae6"
}

Request body schema

View request body schema

Headers

authorization
string
required

GST taxpayer access token. For token-generation steps, refer to the Generate Taxpayer Session recipe, then pass the token in the authorization header.

x-api-version
string
default:1.0.0

API version

x-api-key
string
required

API key for identification

Body

application/json

The body is of type object.

Response

200 - application/json

200 Invoice status save initiated

code
number
Example:

200

data
object
timestamp
number
Example:

1763446641000

transaction_id
string
Example:

"0f7f60a2-862c-4a1b-b6b4-baa76c6faae6"