GSTNexa

GSTR-1: outward supplies

integration guide

Every sale you report, invoice by invoice. GSTR-1 is the heaviest call in the cycle and the one everything downstream is built on: your buyer's GSTR-2B, and your own GSTR-3B liability.

All GST return guides

Overview

GSTR-1 is a statement of outward supplies, filed monthly on the 11th, or quarterly under QRMP with the IFF covering the first two months. It is not a payment return — no tax is settled here. What it does is populate your buyers' GSTR-2A and GSTR-2B, and pre-fill your own GSTR-3B. A mistake here shows up in someone else's credit, which is why amendments get their own form.

Save is not file

A save returns a reference id. The portal processes it in the background, and the data is not in the return until the status reads P. Two different things, two different buttons.

Build it in sections

The payload is a set of named blocks. Save them together or a few at a time, but keep the builders separate — the error report comes back per section.

It cannot be revised

Once filed, a GSTR-1 stays filed. Corrections go through GSTR-1A for the same period, before you file GSTR-3B.

The sections

Each block of the payload has a read endpoint of the same name, so you can pull back what the portal holds for any one of them. Where a section has an amendment twin, its name ends in a.

SectionAmendment What it carriesNotes
b2b b2ba Supplies to registered persons The bulk of most returns. One block per buyer GSTIN, invoices nested inside.
b2cl b2cla Large inter-state supplies to consumers Unregistered buyers, inter-state, above the invoice value threshold.
b2cs b2csa All other supplies to consumers Summarised by state and rate, not invoice by invoice.
cdnr cdnra Credit and debit notes to registered persons Linked to the original invoice.
cdnur cdnura Credit and debit notes to unregistered persons Same idea, for B2C.
exp expa Exports With or without payment of tax; carries the shipping bill details.
at ata Advances received Tax on advances where the supply has not happened yet.
txp txpa Advances adjusted Advances from an earlier period now set against a supply.
nil — Nil rated, exempt and non-GST supplies A small summary block, easy to forget and commonly left empty.
hsnsum — HSN summary Quantity and value by HSN code. Validate it before saving — see validatehsnsum.
dociss — Documents issued Serial ranges of invoices, notes and vouchers issued in the period.
ecom ecoma Supplies through an e-commerce operator Where the operator pays the tax.
supeco supecoa Supplier view of e-commerce supplies The supplier side of the same transactions.

Read any section with GET /gstr1/<section>?gstin=&retperiod= — for example /gstr1/b2b. The same paths exist under /gstr1a/ for amendments.

API inventory

Beyond the per-section reads above, these are the calls that move a GSTR-1 through its life.

MethodPathPurpose
GET /gstr1/retsum Summary of what is saved for the period, with the chksum you file
PUT /gstr1/retsave Saves one or more sections; returns a reference id
POST /gstr1/reset Clears everything saved for the period and starts again
GET /gstr1/validatehsnsum Checks the HSN summary against the invoices before you save it
GET /gstr1/einvoice Invoices that reached GSTR-1 from the e-invoice system
POST /gstr1/retfile File with DSC
POST /gstr1/retevcfile File with EVC
GET /gstr/retstatus Status of a save, by reference id
GET /gstr/rettrack Whether the period is already filed, and its ARN

Before any call

No return API works without a live taxpayer session. Every flow on this site starts the same way, and the session is shared across returns — authenticate once per taxpayer, not once per return.

  1. 1 The taxpayer enables API access On the GST portal: My Profile → Manage API Access, choosing a session duration.
  2. 2 Request the OTP GET /authentication/otprequest?email= with headers gst_username, state_cd, ip_address, client_id, client_secret.
  3. 3 Exchange it for a token GET /authentication/authtoken?email=&otp= with the same headers plus txn. The sandbox OTP is 575757.
  4. 4 Keep it alive GET /authentication/refreshtoken before expiry. If the refresh fails, request a new OTP. Never retry a filing call on an expired session.
  5. 5 Pre-check Use GET /gstr/rettrack to confirm the period is not already filed before you start.

The one that catches everyone: GET calls carry the period in the query string as retperiod, while PUT and POST carry it as a header named ret_period.

Filing lifecycle

One loop — the save status — and one fork at the end between DSC and EVC.

GSTR-1, start to ARN 10 steps
  1. 1 Open a session authentication/authtoken OTP, token, keep the txn.
  2. 2 Check the period GET /gstr/rettrack Already filed? Stop and show the ARN.
  3. 3 Read what is there GET /gstr1/retsum A draft may already exist on the portal.
  4. 4 Pull e-invoice data GET /gstr1/einvoice Already-reported invoices; do not send them twice.
  5. 5 Build the sections b2b, b2cl, b2cs, cdnr, exp, at, nil, hsnsum, dociss from your own books.
  6. 6 Validate the HSN summary GET /gstr1/validatehsnsum Before saving, not after.
  7. 7 Save PUT /gstr1/retsave Returns a reference id, not a result.
  8. 8 Poll the save GET /gstr/retstatus PE or ER sends you back to step 5.
  9. 9 Read the summary GET /gstr1/retsum Store the chksum; show the totals for sign-off.
  10. 10 File with DSC POST /gstr1/retfile content + pkcs7. Required for companies.
  11. 10 or file with EVC POST /gstr1/retevcfile otpforevc first, then pan + evcotp.
  12. ✓ ARN Store it. GSTR-3B for the period can now be prepared.

Step 10 is a fork, not two steps: the user signs with a DSC or with an EVC OTP, never both.

GSTR-1A amendments

A filed GSTR-1 cannot be edited. GSTR-1A corrects the same period, and it has a window: after GSTR-1 is filed and before GSTR-3B for that period. Use it rather than carrying the correction into the next month, so the liability lands where it belongs.

MethodPathPurpose
PUT /gstr1a/retsave Save the amendment
GET /gstr1a/retsum Summary of the amendment
GET /gstr1a/proceedfile Proceed to file — a step GSTR-1 itself does not have
POST /gstr1a/retsubmit Submit before filing
POST /gstr1a/retfile File with DSC
POST /gstr1a/retevcfile File with EVC
POST /gstr1a/reset Clear the amendment and start again

Note the two extra steps: GSTR-1A has proceedfile and retsubmit, which plain GSTR-1 does not. Build it as its own flow rather than reusing the GSTR-1 one.

Save status and errors

A save never returns a result — it returns a reference id. Poll GET /gstr/retstatus?gstin=&returnperiod=&refid= with that id until the portal reports one of these, and never call a filing endpoint while the latest save is not P.

CodeMeaningWhat your application does
REC Received, not processed yet Poll after a short delay
IP In progress Poll, backing off after a few tries
P Processed Move to the next step
PE Processed with errors Show error_report per section; fix and save again
ER Error, nothing saved Show error_cd and message; fix and save again

Session expired

Try one refresh. If that fails, ask for a new OTP. Never auto-retry a File call.

A File call that timed out

Do not send it again. Check return track first — if it already shows Filed, store the ARN from there.

Polling

Exponential back-off with a maximum number of attempts, in a queue job rather than the web request.

Concurrency

One txn per call, and a lock per GSTIN + period + form so two users cannot save or file at once.

Audit

Store request, response, txn, reference id and error_cd for every call. Support tickets always ask for the txn.

Developer checklist

The ticks are yours alone — nothing is saved or sent anywhere.

Stuck on one of these calls against a sandbox GSTIN? The agent knows these flows.

Ask the GST AI Agent All return guides

We use cookies to give you the best possible experience while you browse through our website. By pursuing the use of our website you implicitly agree to the usage of cookies on this site. Learn more

Your Cookie Preference

We use different types of cookies to optimize your experience on our website. Click on the categories that you want to allow. Visit our website to learn more about our Cookie Policy.

Essential

These cookies are necessary for the basic functionality of the website. Without these cookies, certain functions, like sign-in and your saved preferences, will not work.

Performance

These cookies are used to enhance your browsing experience and assist us with support tools, such as live chat.

Analytics

These cookies help us understand how our website is used, so we can improve it over time.