GST APIEnvironment:
Default OTP575757
API Reference
Overview
Public
Authentication
GSTR
GSTR1
GSTR1A
GSTR2A
GSTR2B
GSTR2X
GSTR3B
GSTR4
Save GSTR4 dataPUT
Get B2B InvoicesGET
Get B2B Unregistered InvoiceGET
Get IMPSGET
Get CDNR InvoicesGET
API call for getting all Credit/ Debit Notes issued to un-registered persons for a return period.GET
API call for getting invoices for Tax on Outward Supplies for a return period. GET
Get ATGET
Get TXPGET
Get GSTR1 SummaryGET
Submit GSTR4 dataPOST
Get TDSGET
File GSTR4 dataPOST
File GSTR4 dataPOST
API call for offsetting the liabilities and interest from GSTR4POST
Get B2BA InvoicesGET
Get B2BUR AmendmentGET
Get Imports of Services AmendmentGET
Get CDNR AmendmentGET
Get CDNUR AmendmentGET
Get TXOS AmendmentGET
Get Advances Paid AmendmentGET
Get Advances Adjusted AmendmentGET
GSTR4A
GSTR4Annual
GSTR5
GSTR6
GSTR6A
GSTR7
GSTR8
GSTR9
GSTR9A
GSTR9C
SPIKE
ALL
IMS
ITC03
ITC04
CMP
Payment
Ledger
e-Invoice
Notices
GST APIGSTR4Save GSTR4 data

Save GSTR4 data

PUThttps://apisandbox.whitebooks.in/gstr4/retsave

Used to save entire GSTR4 invoices.

Parameters

query parameters
emailstringrequired
User Email
header parameters
gstinstringrequired
GST Number
ret_periodstringrequired
Return Period (MMYYYY)
gst_usernamestringrequired
GST UserName
state_cdstringrequired
State Code
ip_addressstringrequired
IP Address
txnstringrequired
Transaction
client_idstringrequired
Client ID
client_secretstringrequired
Client Secret

Request Body

application/jsonrequired
gstinstringoptional
Supplier GSTIN
Example: "27AHQPA7588L1ZJ"
fpstringoptional
Financial Period
Example: "022024"
atarray<object>optional
Array items:
itmsarray<object>optional
Array items:
ad_amtnumberoptional
Amount
Example: 454555
rtnumberoptional
rate
Example: 5
iamtnumberoptional
IGST Amount as per invoice
Example: 325
camtnumberoptional
CGST Amount as per invoice
Example: 0
samtnumberoptional
SGST Amount as per invoice
Example: 0
csamtnumberoptional
Cess Amount as per invoice
Example: 500
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
sply_tystringoptional
Supply Type
Example: "INTER"
flagstringoptional
Taxpayer action
Example: "R"
ataarray<object>optional
Array items:
itmsarray<object>optional
Array items:
ad_amtnumberoptional
Amount
Example: 454555
rtnumberoptional
rate
Example: 5
iamtnumberoptional
IGST Amount as per invoice
Example: 325
camtnumberoptional
CGST Amount as per invoice
Example: 0
samtnumberoptional
SGST Amount as per invoice
Example: 0
csamtnumberoptional
Cess Amount as per invoice
Example: 500
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
sply_tystringoptional
Supply Type
Example: "INTER"
flagstringoptional
Taxpayer action
Example: "R"
omonstringoptional
Original Return Period which needs to be amended
Example: "062024"
b2barray<object>optional
Array items:
ctinstringoptional
GSTIN/UID of the Receiver taxpayer/UN,Govt Bodies
Example: "01AABCE2207R1Z5"
cfsstringoptional
Example: "N"
invarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
itmsarray<object>optional
b2baarray<object>optional
Array items:
ctinstringoptional
GSTIN/UID of the Receiver taxpayer/UN,Govt Bodies
Example: "01AABCE2207R1Z5"
invarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "A"
oidtstringoptional
Original Invoice date
Example: "S008400"
oinumstringoptional
Original Invoice Number
Example: "02-03-2024"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
itmsarray<object>optional
b2burarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
sply_tystringoptional
Supply Type
Example: "INTER"
itmsarray<object>optional
Array items:
numintegeroptional
Serial no
Example: 1
itm_detobjectoptional
b2buraarray<object>optional
Array items:
oidtstringoptional
Supplier Invoice date
Example: "24-02-24"
oinumstringoptional
Supplier Invoice Number
Example: "S008400"
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
sply_tystringoptional
Supply Type
Example: "INTER"
itmsarray<object>optional
Array items:
numintegeroptional
Serial no
Example: 1
itm_detobjectoptional
cdnrarray<object>optional
Array items:
ctinstringoptional
GSTIN/UID of the Receiver taxpayer/UN,Govt Bodies
Example: "01AABCE2207R1Z5"
cfsstringoptional
Example: "N"
ntarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
sply_tystringoptional
Supply Type
Example: "INTER"
itmsarray<object>optional
nt_dtstringoptional
Credit/debit note date
Example: "16-03-2024"
nt_numstringoptional
Credit/debit note number
Example: "cdn001"
nttystringoptional
Credit/debit note type
Example: "C"
cdnraarray<object>optional
Array items:
ctinstringoptional
GSTIN/UID of the Receiver taxpayer/UN,Govt Bodies
Example: "01AABCE2207R1Z5"
ntarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
sply_tystringoptional
Supply Type
Example: "INTER"
nt_dtstringoptional
Credit/debit note date
Example: "16-03-2024"
nt_numstringoptional
Credit/debit note number
Example: "cdn001"
nttystringoptional
Credit/debit note type
Example: "C"
ont_dtstringoptional
Original Credit/debit note date
Example: "16-03-2024"
ont_numstringoptional
OriginalCredit/debit note number
Example: "cdn001"
itmsarray<object>optional
cdnurarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
sply_tystringoptional
Supply Type
Example: "INTER"
itmsarray<object>optional
Array items:
numintegeroptional
Serial no
Example: 1
itm_detobjectoptional
nt_dtstringoptional
Credit/debit note date
Example: "16-03-2024"
nt_numstringoptional
Credit/debit note number
Example: "cdn001"
nttystringoptional
Credit/debit note type
Example: "C"
cdnuraarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
rchrgstringoptional
Reverse Charge
Example: "N"
inv_typstringoptional
tax payer action
Example: "R"
sply_tystringoptional
Supply Type
Example: "INTER"
itmsarray<object>optional
Array items:
numintegeroptional
Serial no
Example: 1
itm_detobjectoptional
nt_dtstringoptional
Credit/debit note date
Example: "16-03-2024"
nt_numstringoptional
Credit/debit note number
Example: "cdn001"
nttystringoptional
Credit/debit note type
Example: "C"
ont_dtstringoptional
Original Credit/debit note date
Example: "16-03-2024"
ont_numstringoptional
OriginalCredit/debit note number
Example: "cdn001"
imp_sarray<object>optional
Array items:
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
sply_tystringoptional
Supply Type
Example: "INTER"
itmsarray<object>optional
Array items:
numintegeroptional
Serial no
Example: 1
itm_detobjectoptional
imp_saarray<object>optional
Array items:
oidtstringoptional
Original Invoice Date
Example: "24-01-2024"
oinumstringoptional
Original Invoice Number
Example: "S008400"
flagstringoptional
Taxpayer action
Example: "R"
inumstringoptional
Supplier Invoice Number
Example: "S008400"
idtstringoptional
Supplier Invoice Date
Example: "24-01-2024"
valnumberoptional
Supplier Invoice Value
Example: 729248.16
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
sply_tystringoptional
Supply Type
Example: "INTER"
itmsarray<object>optional
Array items:
numintegeroptional
Serial no
Example: 1
itm_detobjectoptional
txosobjectoptional
itmsarray<object>optional
Array items:
camtnumberoptional
CGST Amount as per invoice
Example: 0
samtnumberoptional
SGST Amount as per invoice
Example: 0
rtnumberoptional
rate
Example: 5
trnovrnumberoptional
Turn over
Example: 200
csamtnumberoptional
Cess Amount as per invoice
Example: 500
txosaarray<object>optional
Array items:
omonstringoptional
Original month
Example: "062024"
flagstringoptional
Taxpayer action
Example: "A"
itmsanyoptional
txpdarray<object>optional
Array items:
itmsarray<object>optional
Array items:
ad_amtnumberoptional
Amount
Example: 454555
rtnumberoptional
rate
Example: 5
iamtnumberoptional
IGST Amount as per invoice
Example: 325
camtnumberoptional
CGST Amount as per invoice
Example: 0
samtnumberoptional
SGST Amount as per invoice
Example: 0
csamtnumberoptional
Cess Amount as per invoice
Example: 500
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
sply_tystringoptional
Supply Type
Example: "INTER"
flagstringoptional
Taxpayer action
Example: "R"
txpdaarray<object>optional
Array items:
itmsarray<object>optional
Array items:
ad_amtnumberoptional
Amount
Example: 454555
rtnumberoptional
rate
Example: 5
iamtnumberoptional
IGST Amount as per invoice
Example: 325
camtnumberoptional
CGST Amount as per invoice
Example: 0
samtnumberoptional
SGST Amount as per invoice
Example: 0
csamtnumberoptional
Cess Amount as per invoice
Example: 500
posstringoptional
Maintained in GST System common database POS as provided in law / actual provision of service.
Example: "06"
sply_tystringoptional
Supply Type
Example: "INTER"
flagstringoptional
Taxpayer action
Example: "R"
omonstringoptional
Original Return Period which needs to be amended
Example: "062024"

Response

Not Found. If requested entity is not found or if requested API is not found.
PUT/gstr4/retsave
1const response = await fetch('https://apisandbox.whitebooks.in/gstr4/retsave?email=value', {
2 method: 'PUT',
3 headers: {
4 gstin: "value",
5 ret_period: "value",
6 gst_username: "value",
7 state_cd: "value",
8 ip_address: "value",
9 txn: "value",
10 client_id: "value",
11 client_secret: "value",
12 Content-Type: "application/json"
13},
14 body: JSON.stringify({
15 "gstin": "27AHQPA7588L1ZJ",
16 "fp": "022024",
17 "at": [
18 {
19 "itms": [
20 {
21 "ad_amt": 454555,
22 "rt": 5,
23 "iamt": 325,
24 "camt": 0,
25 "samt": 0,
26 "csamt": 500
27 }
28 ],
29 "pos": "06",
30 "sply_ty": "INTER",
31 "flag": "R"
32 }
33 ],
34 "ata": [
35 {
36 "itms": [
37 {
38 "ad_amt": 454555,
39 "rt": 5,
40 "iamt": 325,
41 "camt": 0,
42 "samt": 0,
43 "csamt": 500
44 }
45 ],
46 "pos": "06",
47 "sply_ty": "INTER",
48 "flag": "R",
49 "omon": "062024"
50 }
51 ],
52 "b2b": [
53 {
54 "ctin": "01AABCE2207R1Z5",
55 "cfs": "N",
56 "inv": [
57 {
58 "flag": "R",
59 "inum": "S008400",
60 "idt": "24-01-2024",
61 "val": 729248.16,
62 "pos": "06",
63 "rchrg": "N",
64 "inv_typ": "R",
65 "itms": [
66 "..."
67 ]
68 }
69 ]
70 }
71 ],
72 "b2ba": [
73 {
74 "ctin": "01AABCE2207R1Z5",
75 "inv": [
76 {
77 "flag": "A",
78 "oidt": "S008400",
79 "oinum": "02-03-2024",
80 "inum": "S008400",
81 "idt": "24-01-2024",
82 "val": 729248.16,
83 "pos": "06",
84 "rchrg": "N",
85 "inv_typ": "R",
86 "itms": [
87 "..."
88 ]
89 }
90 ]
91 }
92 ],
93 "b2bur": [
94 {
95 "flag": "R",
96 "inum": "S008400",
97 "idt": "24-01-2024",
98 "val": 729248.16,
99 "pos": "06",
100 "rchrg": "N",
101 "inv_typ": "R",
102 "sply_ty": "INTER",
103 "itms": [
104 {
105 "num": 1,
106 "itm_det": {
107 "txval": "...",
108 "rt": "...",
109 "iamt": "...",
110 "camt": "...",
111 "samt": "...",
112 "csamt": "..."
113 }
114 }
115 ]
116 }
117 ],
118 "b2bura": [
119 {
120 "oidt": "24-02-24",
121 "oinum": "S008400",
122 "flag": "R",
123 "inum": "S008400",
124 "idt": "24-01-2024",
125 "val": 729248.16,
126 "pos": "06",
127 "rchrg": "N",
128 "inv_typ": "R",
129 "sply_ty": "INTER",
130 "itms": [
131 {
132 "num": 1,
133 "itm_det": {
134 "txval": "...",
135 "rt": "...",
136 "iamt": "...",
137 "camt": "...",
138 "samt": "...",
139 "csamt": "..."
140 }
141 }
142 ]
143 }
144 ],
145 "cdnr": [
146 {
147 "ctin": "01AABCE2207R1Z5",
148 "cfs": "N",
149 "nt": [
150 {
151 "flag": "R",
152 "inum": "S008400",
153 "idt": "24-01-2024",
154 "val": 729248.16,
155 "pos": "06",
156 "rchrg": "N",
157 "inv_typ": "R",
158 "sply_ty": "INTER",
159 "itms": [
160 "..."
161 ],
162 "nt_dt": "16-03-2024",
163 "nt_num": "cdn001",
164 "ntty": "C"
165 }
166 ]
167 }
168 ],
169 "cdnra": [
170 {
171 "ctin": "01AABCE2207R1Z5",
172 "nt": [
173 {
174 "flag": "R",
175 "inum": "S008400",
176 "idt": "24-01-2024",
177 "val": 729248.16,
178 "pos": "06",
179 "rchrg": "N",
180 "inv_typ": "R",
181 "sply_ty": "INTER",
182 "nt_dt": "16-03-2024",
183 "nt_num": "cdn001",
184 "ntty": "C",
185 "ont_dt": "16-03-2024",
186 "ont_num": "cdn001",
187 "itms": [
188 "..."
189 ]
190 }
191 ]
192 }
193 ],
194 "cdnur": [
195 {
196 "flag": "R",
197 "inum": "S008400",
198 "idt": "24-01-2024",
199 "val": 729248.16,
200 "pos": "06",
201 "rchrg": "N",
202 "inv_typ": "R",
203 "sply_ty": "INTER",
204 "itms": [
205 {
206 "num": 1,
207 "itm_det": {
208 "txval": "...",
209 "rt": "...",
210 "iamt": "...",
211 "camt": "...",
212 "samt": "...",
213 "csamt": "..."
214 }
215 }
216 ],
217 "nt_dt": "16-03-2024",
218 "nt_num": "cdn001",
219 "ntty": "C"
220 }
221 ],
222 "cdnura": [
223 {
224 "flag": "R",
225 "inum": "S008400",
226 "idt": "24-01-2024",
227 "val": 729248.16,
228 "pos": "06",
229 "rchrg": "N",
230 "inv_typ": "R",
231 "sply_ty": "INTER",
232 "itms": [
233 {
234 "num": 1,
235 "itm_det": {
236 "txval": "...",
237 "rt": "...",
238 "iamt": "...",
239 "camt": "...",
240 "samt": "...",
241 "csamt": "..."
242 }
243 }
244 ],
245 "nt_dt": "16-03-2024",
246 "nt_num": "cdn001",
247 "ntty": "C",
248 "ont_dt": "16-03-2024",
249 "ont_num": "cdn001"
250 }
251 ],
252 "imp_s": [
253 {
254 "flag": "R",
255 "inum": "S008400",
256 "idt": "24-01-2024",
257 "val": 729248.16,
258 "pos": "06",
259 "sply_ty": "INTER",
260 "itms": [
261 {
262 "num": 1,
263 "itm_det": {
264 "txval": "...",
265 "rt": "...",
266 "iamt": "...",
267 "csamt": "..."
268 }
269 }
270 ]
271 }
272 ],
273 "imp_sa": [
274 {
275 "oidt": "24-01-2024",
276 "oinum": "S008400",
277 "flag": "R",
278 "inum": "S008400",
279 "idt": "24-01-2024",
280 "val": 729248.16,
281 "pos": "06",
282 "sply_ty": "INTER",
283 "itms": [
284 {
285 "num": 1,
286 "itm_det": {
287 "txval": "...",
288 "rt": "...",
289 "iamt": "...",
290 "csamt": "..."
291 }
292 }
293 ]
294 }
295 ],
296 "txos": {
297 "itms": [
298 {
299 "camt": 0,
300 "samt": 0,
301 "rt": 5,
302 "trnovr": 200,
303 "csamt": 500
304 }
305 ]
306 },
307 "txosa": [
308 {
309 "omon": "062024",
310 "flag": "A",
311 "itms": {}
312 }
313 ],
314 "txpd": [
315 {
316 "itms": [
317 {
318 "ad_amt": 454555,
319 "rt": 5,
320 "iamt": 325,
321 "camt": 0,
322 "samt": 0,
323 "csamt": 500
324 }
325 ],
326 "pos": "06",
327 "sply_ty": "INTER",
328 "flag": "R"
329 }
330 ],
331 "txpda": [
332 {
333 "itms": [
334 {
335 "ad_amt": 454555,
336 "rt": 5,
337 "iamt": 325,
338 "camt": 0,
339 "samt": 0,
340 "csamt": 500
341 }
342 ],
343 "pos": "06",
344 "sply_ty": "INTER",
345 "flag": "R",
346 "omon": "062024"
347 }
348 ]
349}),
350});
351
352const data = await response.json();
353console.log(data);
No example available.