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
| RPC | Arguments | Needs | Does |
|---|---|---|---|
gstin_info | gstin | read GSTIN | The GSTIN's row after asking the government, or the cached row |
update_gstin_status | gstin | read GSTIN | Queues a refresh of one GSTIN |
update_gstin_in_other_documents | previous_gstin, gstin, gst_category | a user | Moves addresses and draft vouchers to a new GSTIN |
backfill_company_gstin | company | write GST Settings | Fills Company GSTIN on the company's GL rows on GST accounts that lack it |
update_taxes_in_items | hsn_code | write Item | Queues a job that writes the code's taxes to every Item of the code |
gst_details | rectype, doc, trigger | a user | The GST fields a voucher form fills when a party, address or item changes |
make_bill_of_entry | source_name | create Bill of Entry | A Bill of Entry drafted from a submitted Purchase Invoice |
make_journal_entry_for_payment | source_name | create Journal Entry | The payment Journal Entry for a Bill of Entry |
gstr3b_generate | name | write GSTR 3B Report | Queues 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.
| RPC | Does |
|---|---|
info | The buttons and dialog fields this voucher offers |
generate, cancel | Generate or cancel through NIC |
update_vehicle, update_transporter | Part B or transporter update |
extend_validity, schedule_extension | Extend now, or at the 01:00 job |
fetch, find_by_date | Read an e-waybill back, or find one made on the portal |
mark_generated, mark_cancelled | Record what was done on the portal |
offline_json | The portal's JSON for one or more vouchers |
print_numbers | The live e-waybills of selected invoices, for printing |
bulk_generate, bulk_update_transporter | The Sales Invoice list's bulk actions |
GSTR-1 (gst_compliance.gstr1.*)
| RPC | Needs | Does |
|---|---|---|
generate | write GST Return Log | Queues the period's books |
get_data, summary | read GST Return Log | One category's rows, or the totals |
download, download_excel | read GST Return Log | The portal JSON, or the Excel workbook |
mark_as_filed, upload_filed_json | write GST Return Log | Record the filing, or store the filed JSON and compare |
hsn_json | read Sales Invoice | Table 12 as JSON, from the HSN wise Summary of Outward Supplies report |
Reconciliation (gst_compliance.reconcile.*)
| RPC | Needs | Does |
|---|---|---|
data, ims_data | read GST Inward Supply | The rows the Purchase Reconciliation and IMS pages show |
reconcile | write Purchase Invoice | Runs the match |
link, unlink, copy_values | write Purchase Invoice | Pair, break a pair, copy the supplier's bill number and date |
accept, pending, ignore | write Purchase Invoice | The row actions |
import_file, download | write Purchase Invoice | Import a portal JSON by File name, or queue a download |
export, email | export GST Inward Supply, email Purchase Invoice | The Excel export, and mail to a supplier |
ims_action, ims_upload | write Purchase Invoice | Set IMS actions, or send them to the portal |
Realtime events
| Event | Sent when |
|---|---|
gst_compliance.gstr1_generated | A GSTR-1 generation finishes, on the user's topic |
gst_compliance.gstr3b_generated | A GSTR 3B Report finishes, on the record's topic |