GSTR-2B Fetch API

Fetch auto-drafted GSTR-2B input tax credit statements for any GSTIN. Returns the full JSON of inward supplies, ITC eligibility, and reverse-charge entries.

Get sandbox keys → View OpenAPI docs Talk to sales

What is the GSTR-2B Fetch API?

GSTR-2B is the monthly auto-drafted ITC statement based on documents filed by your suppliers. The WhiteBooks GSTR-2B Fetch API retrieves it for a given GSTIN + tax period and returns the full structured JSON — invoice-level supplier breakdown, ITC eligible vs ineligible split, reverse-charge entries, and import-of-services items.

Most teams pair this with the GSTR-2B Reconciliation API to auto-match against the purchase register and surface mismatches. WhiteBooks caches the fetch for 4 hours per GSTIN/period to keep your sync costs low.

Quick spec

Code examples

curl Node.jsPythonJava
curl -X POST 'https://apisandbox.whitebooks.in/gst/api/v1/gstr2b/fetch' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ /* payload */ }'
Node.js
const res = await fetch('https://apisandbox.whitebooks.in/gst/api/v1/gstr2b/fetch', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + accessToken,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
});
const data = await res.json();
Python
import requests

resp = requests.post(
    'https://apisandbox.whitebooks.in/gst/api/v1/gstr2b/fetch',
    headers={'Authorization': f'Bearer {access_token}'},
    json=payload,
)
data = resp.json()
Java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://apisandbox.whitebooks.in/gst/api/v1/gstr2b/fetch"))
    .header("Authorization", "Bearer " + accessToken)
    .header("Content-Type", "application/json")
    .post(BodyPublishers.ofString(payload))
    .build();
HttpResponse<String> resp = HttpClient.newHttpClient()
    .send(req, BodyHandlers.ofString());

Integrate in 3 steps

  1. Sign up at accounts.whitebooks.in — sandbox credentials issued instantly, no sales gate.
  2. Make your first call against the sandbox base URL using the code example above. Validate against your local model.
  3. Move to production once your tests pass — switch host to https://api.whitebooks.in/gst. Same payload, same response shape.

Frequently asked questions

How often does GSTR-2B refresh?

GSTN regenerates GSTR-2B on the 14th of each month for the previous tax period. The WhiteBooks API always serves the latest published version.

Can I fetch GSTR-2B for past periods?

Yes — pass any tax period from July 2020 onwards. Older periods may have slower response (GSTN cache miss).

What auth does this API use?

OAuth 2.0 client-credentials grant. Token expiry: 1 hour. Refresh via POST /oauth/token.

Are bulk fetches supported?

Yes. POST a list of up to 100 GSTINs per call; the response is a structured array with success/error per GSTIN.

Explore the full GST API

This is one endpoint inside the WhiteBooks GST API suite. See the full documentation — every endpoint, every parameter, every error code.

Open the GST API page →

Related GST API endpoints

GSTR-1 Filing API → GSTR-3B Filing API → GSTR-9 Annual Return API → GSTR-2B Reconciliation API →