bettergst api, version 1

send a month's sales to bettergst from your own software: a billing system, a point of sale, an accounting package. bettergst builds the gstr-1 and gstr-3b from what you send, checks it, and the business files from bettergst as usual.

every address below starts with https://bettergst.com/api/v1. requests and answers are json, except the file upload, which is a form.

on this page

authentication

each business has one api key. an owner of the business makes it in bettergst: open the business, then manage, the api section, create key. the key is shown once; bettergst keeps only a fingerprint of it. replace key makes a new one and stops the old one at once; remove key stops it.

send the key on every request:

Authorization: Bearer <your key>

a key works only for its own business, named by its gstin in the address. a missing key, a wrong key and an unknown gstin all answer 401.

months

a month is YYYY-MM, the month of the return: 2026-11 is november 2026.

PUT /businesses/{gstin}/months/{month}

sends the month's documents. the body is one of two things.

the month's documents in bettergst's month model (described below):

{
  "documents": {
    "v": 2,
    "b2c": [
      {
        "hsn": "6109",
        "description": "T-shirts",
        "uqc": "PCS",
        "qty": 40,
        "rate": 5,
        "taxable": 18000
      }
    ]
  }
}

or the month's gstr-1 as the gstn offline tool's json, the file tally, busy, marg, vyapar, mybillbook and swipe export for the portal:

{
  "gstr1": {
    "gstin": "19ABCDE1234F1Z5",
    "fp": "112026",
    "b2b": [],
    "b2cs": [],
    "hsn": {},
    "doc_issue": {}
  }
}

its gstin must be this business's and its fp (the return period, MMYYYY) this month.

the answers:

answerwhen
{ "ok": true, "received": "documents", "changed": true }the documents were stored.
{ "ok": true, "received": "documents", "changed": false }the same documents were already stored; nothing changed.
{ "ok": true, "received": "gstr1", "changed": true }the gstn file was stored as the month's sales file.
{ "ok": true, "received": "gstr1", "changed": false }the same file was already stored.
{ "ok": true, "frozen": true, "drift": false }gstr-1 is filed for the month; what you sent matches what you sent before, or you had sent nothing for this month before it was filed. nothing was changed.
{ "ok": true, "frozen": true, "drift": true }gstr-1 is filed for the month; what you sent differs from what you sent before it was filed, and nothing was changed.

what you send replaces what you sent before. sales the business typed in bettergst for the month stay and are added to yours. send your whole month each time. bettergst builds the month's return at once from your documents, what was typed in bettergst and the month's files (a gstn file sent here, platform reports uploaded below): GET then shows the checked return.

GET /businesses/{gstin}/months/{month}

what bettergst holds for the month:

{
  "gstin": "19ABCDE1234F1Z5",
  "month": "2026-11",
  "status": "ready",
  "statusText": "ready to file",
  "documents": {
    "v": 2,
    "source": {
      "door": "api",
      "receivedAt": "2026-11-30T18:04:00.000Z"
    },
    "b2c": []
  },
  "typed": true,
  "figures": {
    "taxable": 18000,
    "tax": 900
  },
  "packet": {
    "ok": true,
    "failing": []
  },
  "filed": {
    "gstr1": null,
    "gstr3b": null
  },
  "files": [
    {
      "id": "3f0c...",
      "kind": "sales",
      "format": "gstn-json",
      "name": "gstr1-2026-11.json",
      "size": 5120,
      "uploadedAt": "2026-11-30T18:04:00.000Z"
    }
  ]
}
  • status is one of empty, draft, not-ready, ready, gstr1-filed, filed, and statusText says it in the words bettergst shows: not started, not complete, needs attention, ready to file, gstr-3b pending, filed.
  • documents is the month model you sent last, or null when you have not sent one.
  • typed is there, true, when the month also holds sales typed in bettergst: your documents are then not the whole month. left out otherwise.
  • packet is the checked return once bettergst has built it: ok, and each failing check's id and detail, a sentence. null until it is built.
  • filed holds each return's arn and when it was filed, once it is.

POST /businesses/{gstin}/months/{month}/files

uploads a report: a form (multipart/form-data) with

fieldvalue
kinda platform, zomato, swiggy, other95, amazon, flipkart, meesho, other52; or sales
formatfor sales only, and optional: gstn-json (the offline tool's json), gstn-xlsx (the gstn excel template) or template-xlsx (bettergst's own workbook); left out, bettergst reads it from the file
filethe file: up to 15 mb; excel, csv or tab-separated text (amazon's tax report) for a platform report; json, .xlsx or .xls for a sales file

a month may hold several files of one kind (two zomato reports for one month, say); each upload adds one, and the month's return is built again from every file: amazon, flipkart and meesho reports become the month's invoices, credit notes and table 14(a); zomato and swiggy reports table 14(b); a sales file the documents in it. the answer:

{
  "ok": true,
  "file": {
    "id": "3f0c...",
    "kind": "zomato",
    "name": "zomato-nov.xlsx",
    "size": 48213,
    "uploadedAt": "2026-11-30T18:04:00.000Z"
  }
}
curl -H "Authorization: Bearer $KEY" \
  -F kind=sales -F format=gstn-json -F file=@gstr1.json \
  https://bettergst.com/api/v1/businesses/19ABCDE1234F1Z5/months/2026-11/files

the month model

documents is one month. every list may be left out. dates are YYYY-MM-DD. amounts are rupees before tax, up to two decimals. a rate is one of 0, 0.25, 1.5, 3, 5, 12, 18, 28, 40 (from october 2025: 0, 5, 18, 40, and the three small ones for bullion and stones). a place of supply (pos) is the two-digit state code, 96 for a buyer abroad. a document number is at most 16 characters of A-Z 0-9 - /.

a line, used throughout: hsn or sac code (4 to 8 digits; 4 or 6 by the turnover band), a description, a gstn unit (NOS, PCS, KGS, ...; NA for services), quantity (0 for services), rate and taxable value.

{
  "hsn": "6109",
  "description": "T-shirts",
  "uqc": "PCS",
  "qty": 40,
  "rate": 5,
  "taxable": 18000
}

v: always 2.

nil: true for a month with nothing in it; every list stays empty.

{
  "v": 2,
  "nil": true
}

takings: one amount for the month, for a business that issues numbered bills by the day.

{
  "takings": {
    "amount": 105000,
    "inclusive": true
  }
}

b2c: sales to people in your own state, as lines. a line may say "inclusive": true when its amount was entered with gst included and taxable worked out from it; bettergst reads only taxable.

{
  "b2c": [
    {
      "hsn": "6109",
      "description": "T-shirts",
      "uqc": "PCS",
      "qty": 40,
      "rate": 5,
      "taxable": 18000
    }
  ]
}

b2cOther: sales to people in another state, one entry per invoice; the number and date are needed above ₹1,00,000.

{
  "b2cOther": [
    {
      "pos": "27",
      "invoiceNo": "SH/112",
      "date": "2026-11-04",
      "lines": [
        {
          "hsn": "8471",
          "description": "Laptop",
          "uqc": "NOS",
          "qty": 1,
          "rate": 18,
          "taxable": 120000
        }
      ]
    }
  ]
}

b2b: invoices to businesses with a gstin. type is R (regular, the default), SEWP or SEWOP (an sez unit, with or without tax), DE (deemed export); rcm: true when the buyer pays the tax under reverse charge.

{
  "b2b": [
    {
      "gstin": "27AAACR5055K1Z7",
      "name": "Buyer Pvt Ltd",
      "invoiceNo": "SH/113",
      "date": "2026-11-05",
      "pos": "27",
      "type": "R",
      "lines": [
        {
          "hsn": "6109",
          "description": "T-shirts",
          "uqc": "PCS",
          "qty": 500,
          "rate": 5,
          "taxable": 150000
        }
      ]
    }
  ]
}

exports: invoices to clients abroad, in their currency. payment is lut (under lut, no tax) or igst (with igst at taxRate). goods add the shipping bill. client is optional: the return carries no name for a client abroad.

{
  "exports": [
    {
      "no": "EX/7",
      "date": "2026-11-10",
      "client": "Acme Inc",
      "currency": "USD",
      "amount": 2400,
      "rate": 84.1,
      "sac": "998314",
      "payment": "lut"
    }
  ]
}

notes: credit and debit notes, against a registered buyer (gstin and name) or an unregistered one (place of supply, and kind: b2cs, b2cl, expwp, expwop).

{
  "notes": [
    {
      "type": "credit",
      "noteNo": "CN/3",
      "date": "2026-11-20",
      "against": {
        "gstin": "27AAACR5055K1Z7",
        "name": "Buyer Pvt Ltd",
        "invoiceNo": "SH/113",
        "supply": "R"
      },
      "lines": [
        {
          "hsn": "6109",
          "description": "Returned T-shirts",
          "uqc": "PCS",
          "qty": 10,
          "rate": 5,
          "taxable": 3000
        }
      ]
    }
  ]
}

exempt: nil-rated, exempt and non-gst sales, by buyer and whether across states.

{
  "exempt": [
    {
      "kind": "nil",
      "buyer": "unregistered",
      "inter": false,
      "amount": 12000
    }
  ]
}

advances: for services, advances received and advances adjusted against invoices, by place of supply and rate.

{
  "advances": {
    "received": [
      {
        "pos": "19",
        "rate": 18,
        "amount": 50000
      }
    ],
    "adjusted": []
  }
}

series: the document numbers used in the month (table 13). bettergst works them out from the documents when this is left out. a series covers the numbers inside it; invoices listed one by one whose numbers no series covers get rows of their own, one per prefix, lowest to highest, the numbers in between not listed counted as cancelled.

{
  "series": [
    {
      "nature": "invoice",
      "prefix": "SH/",
      "from": 101,
      "to": 180,
      "cancelled": 2
    }
  ]
}

platforms: sales through zomato, swiggy, amazon, flipkart, meesho or another operator: none, files (the reports are uploaded), or typed with the figures.

{
  "platforms": {
    "zomato": {
      "mode": "files"
    },
    "swiggy": {
      "mode": "typed",
      "typed": {
        "netValue": 41000,
        "gstPaid": 2050
      }
    }
  }
}

rcm: purchases where you pay the tax under reverse charge: import (foreign services), rent, freight or other.

{
  "rcm": [
    {
      "kind": "rent",
      "description": "Shop rent",
      "rate": 18,
      "taxable": 30000,
      "inter": false
    }
  ]
}

reversal: input credit you know is blocked, to be reversed.

{
  "reversal": {
    "blocked": 1800
  }
}

source is set by bettergst to say how the month arrived; anything you send in it is replaced.

errors

an error answers with a status and one sentence, the same words bettergst shows on screen:

{
  "error": "b2b invoice 2, line 1: the hsn or sac code is 4 to 8 digits"
}
statusmeaning
400the request cannot be used; the sentence says why and where.
401the key is missing or not this business's.
409gstr-1 is filed for the month and a file cannot be added.
413the body is over 15 mb.
415the file is not a type bettergst takes for that kind.
429too many requests; wait as Retry-After says.
500something went wrong on bettergst's side; the answer carries an id to quote.

rate limits

about 60 requests a minute per key, with short bursts allowed. over it, the answer is 429 with a Retry-After header in seconds.

idempotency

every request may be repeated. sending the same documents or the same gstn file again changes nothing and says "changed": false. a month's documents are compared without regard to the order of the fields in an object; the order of the items in a list counts.

after filing

once the month's gstr-1 is filed, what bettergst stored is what was filed, and it stays so. a later PUT stores nothing and answers frozen: true, with drift: true when what you sent differs from what you sent before it was filed. if you had sent nothing for the month before it was filed, there is nothing to compare with and the answer is drift: false. corrections then go in a later month's return as amendments. file uploads for a filed month answer 409.