Build GSTR-1 JSON (Outward Supplies Return)
Skill: Convert sales data into the GSTR-1 offline-utility JSON
Region: India
Category: Tax — GST returns
Does: Takes a period's outward-supply (sales) data and maps it onto the GSTR-1 JSON in the GST offline-utility format — sectioned into b2b, b2cl, b2cs, cdnr, exp, hsn, nil and doc_issue — for upload to the GST portal (or filing via GSP/API).
System: GST portal (gst.gov.in) — Returns, GSTR-1 / IFF
GSTR-1 reports outward supplies for a tax period; it is filed monthly (turnover > ₹5 crore or opted-in) or quarterly under QRMP (with the IFF for the first two months of a quarter). The JSON top level carries
gstin,fp(filing periodMMYYYY) andversion/hash. Section structure and code lists change between releases — always generate against the current GSTR-1 offline-tool schema and validate on the portal before filing.
When this applies
- A registered taxpayer reporting outward supplies for the period (monthly, or quarterly under QRMP with the optional IFF for invoice upload in months 1–2).
- E-invoiced B2B documents auto-populate the
b2bsection from the IRP — reconcile rather than re-key. - Due 11th of the following month (monthly) / 13th after quarter-end (quarterly).
Input data required
| Section | Reports |
|---|---|
b2b |
supplies to registered persons (by recipient GSTIN), invoice-wise with item rate detail |
b2cl |
inter-state B2C invoices to unregistered persons above ₹1,00,000 (invoice-wise, by POS) |
b2cs |
all other B2C (intra-state + small inter-state) — rate-wise summary by POS |
cdnr / cdnur |
credit/debit notes to registered / unregistered persons |
exp |
exports (with payment WPAY / without payment WOPAY), shipping bill detail |
hsn |
HSN/SAC-wise summary of all outward supplies |
nil |
nil-rated, exempt and non-GST supplies |
doc_issue |
document series issued (invoices, credit/debit notes) with from/to and cancelled counts |
Document structure (offline-utility JSON)
{
"gstin": "29AABCU9603R1ZM",
"fp": "052025",
"version": "GST3.2.1",
"hash": "hash",
"b2b": [ { "ctin": <recipient GSTIN>,
"inv": [ { "inum", "idt", "val", "pos", "rchrg", "inv_typ",
"itms": [ { "num", "itm_det": { "txval","rt","camt","samt","iamt","csamt" } } ] } ] } ],
"b2cs": [ { "sply_ty":"INTRA","pos","typ":"OE","txval","rt","camt","samt","csamt" } ],
"hsn": { "data": [ { "num","hsn_sc","desc","uqc","qty","txval","rt","iamt","camt","samt","csamt" } ] },
"doc_issue": { "doc_det": [ { "doc_num":1, "docs":[ { "num":1,"from","to","totnum","cancel","net_issue" } ] } ] }
}
Key rules: rt is the combined GST rate (e.g. 18 even though split into CGST 9 + SGST 9). pos is the 2-digit place-of-supply state code. Intra-state lines carry camt+samt; inter-state carry iamt. inv_typ is R (regular), SEWP/SEWOP (SEZ), DE (deemed export).
Calculation rules
- Per item:
camt = samt = txval × rt / 2(intra-state);iamt = txval × rt(inter-state, POS ≠ supplier state). - Invoice
val= total invoice value including taxes; sum ofitmstaxable + tax must reconcile to it. b2csis aggregated by POS + rate + supply type (no invoice numbers).hsnsummary must cover all outward supplies and reconcile to the section totals; HSN digit requirement depends on turnover (4/6 digits) and is mandatory rate-wise.
Worked example (one B2B invoice + HSN summary, outline)
{
"gstin": "29AABCU9603R1ZM",
"fp": "052025",
"version": "GST3.2.1",
"hash": "hash",
"b2b": [
{
"ctin": "29AAACR5055K1Z5",
"inv": [
{
"inum": "INV-2025-0042",
"idt": "04-05-2025",
"val": 17700.00,
"pos": "29",
"rchrg": "N",
"inv_typ": "R",
"itms": [
{ "num": 1, "itm_det": { "txval": 15000.00, "rt": 18.0,
"camt": 1350.00, "samt": 1350.00, "iamt": 0.00, "csamt": 0.00 } }
]
}
]
}
],
"hsn": {
"data": [
{ "num": 1, "hsn_sc": "73269099", "desc": "Steel bracket", "uqc": "NOS",
"qty": 100, "txval": 15000.00, "rt": 18.0,
"iamt": 0.00, "camt": 1350.00, "samt": 1350.00, "csamt": 0.00 }
]
},
"doc_issue": {
"doc_det": [
{ "doc_num": 1, "docs": [ { "num": 1, "from": "INV-2025-0001", "to": "INV-2025-0042",
"totnum": 42, "cancel": 0, "net_issue": 42 } ] }
]
}
}
Upload via the offline tool or GSP/API; the portal validates and returns a summary for filing.
Validation checklist
- Current GSTR-1 offline-tool version / schema used;
gstinandfp(MMYYYY) correct - B2B keyed by valid recipient
ctin;pos,inv_typ,rchrgset per invoice - Inter-state vs intra-state tax split correct (
iamtvscamt+samt) against POS - B2CL (inter-state > ₹1,00,000) vs B2CS (rate-wise summary) classified correctly
-
expshipping-bill detail and WPAY/WOPAY flag present for exports -
hsnsummary covers all supplies and reconciles to section totals (correct HSN digits) -
doc_issueseries complete; e-invoice auto-populated B2B reconciled, not duplicated - Filed by the due date (11th monthly / 13th quarterly under QRMP)
Last updated: 2026-06-04 — confirm the active schema version, field codes, and portal/API requirements against the current GSTN (gst.gov.in) specifications before use.