create_ledger
Create a new TallyPrime ledger or rename and update an existing one by passing oldName, setting parent group, GST/PAN, contact, and opening balance details.
Instructions
Create a new ledger (account) in TallyPrime, or rename/update an existing one by passing oldName
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pan | No | India PAN (Permanent Account Number) for this party ledger, e.g. 'BOUPA8950A'. | |
| trn | No | Tax Registration Number (UAE VAT TRN) for this party ledger, e.g. '100326595400003'. | |
| name | Yes | Name of the new ledger, or the new name when renaming an existing one | |
| No | Contact email for this ledger. | ||
| gstin | No | India GSTIN (GST Identification Number) for this party ledger, e.g. '33BOUPA8950A1Z1'. This is India's equivalent of the UAE trn field, not an alias for it — set whichever applies to the company's country. | |
| phone | No | Landline phone number for this ledger. | |
| state | No | State/Emirate, e.g. 'Dubai'. Plain free text — Tally does not validate this against a master list, so match this company's existing convention (check get_company_info or an existing ledger) rather than a formal name. | |
| mobile | No | Mobile number for this ledger. | |
| parent | Yes | Parent group, e.g. 'Sundry Debtors', 'Sundry Creditors', 'Bank Accounts' | |
| address | No | Mailing address, one line per array entry (e.g. ['Office 12, Port Saeed', 'Deira']). | |
| country | No | Country, e.g. 'UAE'. Plain free text — Tally does not validate or normalize this (e.g. 'United Arab Emirates' is stored literally, not converted to 'UAE'), so match this company's existing convention (check get_company_info or an existing ledger) instead of guessing a formal name. | |
| oldName | No | Exact name of an existing ledger to alter/rename (optional). If provided, updates that ledger instead of creating a new one — pass the same value as 'name' to update parent/opening balance without renaming. | |
| pincode | No | Postal/PIN code (optional — omit for countries that don't use one). | |
| website | No | Website for this ledger. | |
| creditLimit | No | Credit limit amount for this party ledger. Setting this also enables 'override credit limit' so the limit actually takes effect. | |
| extraFields | No | Escape hatch for any other native Tally ledger field not covered above — pass exact Tally XML tag names as keys (e.g. {'LEDGERCONTACT': 'Ahmed'}). Not validated; use exact Tally field names from a master export. | |
| mailingName | No | Mailing name for the address, if different from the ledger name. | |
| contactPerson | No | Contact person's name for this ledger — distinct from the ledger/party name itself. | |
| vatDealerType | No | UAE VAT dealer type for this party ledger, e.g. 'Regular', 'Unregistered'. This is UAE's equivalent of India's gstRegistrationType, not an alias for it — set whichever applies to the company's country. | |
| openingBalance | No | Opening balance (optional, defaults to 0) | |
| gstTypeOfSupply | No | India GST type of supply for this ledger — 'Goods' or 'Services'. Confirmed live as a real, independently settable field. | |
| billCreditPeriod | No | Credit period in days for bill-wise settlement. | |
| maintainBillWise | No | Enable bill-wise tracking on this ledger (required for create_voucher's Agst Ref / New Ref bill allocation to work). Almost always wanted for Sundry Debtors/Creditors party ledgers. Defaults to false/off. | |
| gstRegistrationType | No | India GST registration type for this party, e.g. 'Regular', 'Composition', 'Unregistered', 'Consumer'. Plain text matching Tally's own options — check an existing ledger or Tally's own dropdown if unsure of this company's exact wording. | |
| addressApplicableFrom | No | Date in DD-MM-YYYY format from which this address is effective. Required by Tally for the address to actually persist (it's a date-versioned list internally) — defaults to today if any address field is set and this is omitted. |