Signed JSON Invoice API

Retrieve the NIC-signed full JSON for any previously-generated IRN. The full invoice payload with NIC's digital signature, ready for archival.

Get sandbox keys → View OpenAPI docs Talk to sales

What is the Signed JSON Invoice API?

The Signed JSON Invoice API returns the full invoice JSON as it was processed by NIC IRP, with NIC's digital signature attached as a JWS. This is the canonical e-Invoice — what GST law treats as the legally-binding electronic invoice.

For auditors and tax officers, the signed JSON is the source of truth. Most accounting systems archive both the original invoice and the NIC-signed JSON as a pair, linked by IRN. WhiteBooks retains signed JSON for 7 years per GST law requirements.

Quick spec

Code examples

curl Node.jsPythonJava
curl -X GET 'https://apisandbox.whitebooks.in/einvoice/api/v1/irn/a4d2cb7fe33ab26.../json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'
Node.js
const res = await fetch('https://apisandbox.whitebooks.in/einvoice/api/v1/irn/a4d2cb7fe33ab26.../json', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + accessToken,
    'Content-Type': 'application/json',
  },
});
const data = await res.json();
Python
import requests

resp = requests.get(
    'https://apisandbox.whitebooks.in/einvoice/api/v1/irn/a4d2cb7fe33ab26.../json',
    headers={'Authorization': f'Bearer {access_token}'},
)
data = resp.json()
Java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://apisandbox.whitebooks.in/einvoice/api/v1/irn/a4d2cb7fe33ab26.../json"))
    .header("Authorization", "Bearer " + accessToken)
    .header("Content-Type", "application/json")
    .GET()
    .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/einvoice. Same payload, same response shape.

Frequently asked questions

What's the retention period?

7 years on WhiteBooks side per GST law. Customers should also archive locally for compliance.

What's the signed JSON format?

JWS (JSON Web Signature) per RFC 7515. Header indicates RSA-SHA256, signed with NIC's e-Invoice signing key.

Can I verify the signature?

Yes — NIC's public key is published at the NIC e-Invoice portal. WhiteBooks SDKs include verify helpers.

Is this the same as the QR data?

Different. QR contains a subset (key fields). Signed JSON contains the full invoice payload.

Explore the full e-Invoice API

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

Open the e-Invoice API page →

Related e-Invoice API endpoints

IRN Generation API → IRN Cancellation API → Bulk IRN Generation API (1,000/call) → Signed QR Code Retrieval API →