cardinal

RPC reference

The app's RPC endpoints, for scripts and other apps that drive GST from code.

Every RPC answers POST /api/rpc/gst_compliance.<name> with a JSON body of its arguments, and runs as the calling user. The "Needs" column is the right the caller must hold.

curl -X POST https://HOST/api/rpc/gst_compliance.update_taxes_in_items \
  -H "Authorization: token API_KEY:API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"hsn_code": "84713010"}'

Masters and transactions

RPCArgumentsNeedsDoes
gstin_infogstinread GSTINThe GSTIN's row after asking the government, or the cached row
update_gstin_statusgstinread GSTINQueues a refresh of one GSTIN
update_gstin_in_other_documentsprevious_gstin, gstin, gst_categorya userMoves addresses and draft vouchers to a new GSTIN
backfill_company_gstincompanywrite GST SettingsFills Company GSTIN on the company's GL rows on GST accounts that lack it
update_taxes_in_itemshsn_codewrite ItemQueues a job that writes the code's taxes to every Item of the code
gst_detailsrectype, doc, triggera userThe GST fields a voucher form fills when a party, address or item changes
make_bill_of_entrysource_namecreate Bill of EntryA Bill of Entry drafted from a submitted Purchase Invoice
make_journal_entry_for_paymentsource_namecreate Journal EntryThe payment Journal Entry for a Bill of Entry
gstr3b_generatenamewrite GSTR 3B ReportQueues the report's generation

e-Waybill (gst_compliance.ewaybill.*)

Each takes rectype and name of the voucher (or names for the list actions) and needs a signed-in user. The voucher's own rights are checked inside.

RPCDoes
infoThe buttons and dialog fields this voucher offers
generate, cancelGenerate or cancel through NIC
update_vehicle, update_transporterPart B or transporter update
extend_validity, schedule_extensionExtend now, or at the 01:00 job
fetch, find_by_dateRead an e-waybill back, or find one made on the portal
mark_generated, mark_cancelledRecord what was done on the portal
offline_jsonThe portal's JSON for one or more vouchers
print_numbersThe live e-waybills of selected invoices, for printing
bulk_generate, bulk_update_transporterThe Sales Invoice list's bulk actions

GSTR-1 (gst_compliance.gstr1.*)

RPCNeedsDoes
generatewrite GST Return LogQueues the period's books
get_data, summaryread GST Return LogOne category's rows, or the totals
download, download_excelread GST Return LogThe portal JSON, or the Excel workbook
mark_as_filed, upload_filed_jsonwrite GST Return LogRecord the filing, or store the filed JSON and compare
hsn_jsonread Sales InvoiceTable 12 as JSON, from the HSN wise Summary of Outward Supplies report

Reconciliation (gst_compliance.reconcile.*)

RPCNeedsDoes
data, ims_dataread GST Inward SupplyThe rows the Purchase Reconciliation and IMS pages show
reconcilewrite Purchase InvoiceRuns the match
link, unlink, copy_valueswrite Purchase InvoicePair, break a pair, copy the supplier's bill number and date
accept, pending, ignorewrite Purchase InvoiceThe row actions
import_file, downloadwrite Purchase InvoiceImport a portal JSON by File name, or queue a download
export, emailexport GST Inward Supply, email Purchase InvoiceThe Excel export, and mail to a supplier
ims_action, ims_uploadwrite Purchase InvoiceSet IMS actions, or send them to the portal

Realtime events

EventSent when
gst_compliance.gstr1_generatedA GSTR-1 generation finishes, on the user's topic
gst_compliance.gstr3b_generatedA GSTR 3B Report finishes, on the record's topic

On this page