tally_create_ledger
Create a new TallyPrime ledger under an existing group; previews changes and returns a confirm token before any write, rejecting duplicate names or missing groups.
Instructions
Create a NEW ledger in TallyPrime under an existing group.
WHEN TO USE: the user wants a new account — a customer, supplier, bank, expense head, provision and so on.
REFUSES: a name that already exists (TallyPrime would otherwise silently overwrite that ledger), and a group that does not exist.
Opening balance: give a positive amount and the side (Dr/Cr). It applies from the start of the books; leaving it out means nil.
WRITES TO TALLYPRIME, in two steps. This call only PREVIEWS: it checks the change against the live books and returns exactly what would be written plus a confirmToken — nothing is changed. Show the preview to the user, and only after they approve it call tally_confirm_write with the token. Never confirm on your own initiative, and never confirm a preview the user has not seen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The new ledger name, exactly as it should appear. | |
| No | |||
| group | Yes | Existing group to file it under, e.g. "Sundry Debtors". | |
| gstin | No | GST registration number of the party. | |
| state | No | ||
| address | No | Address lines, in order. | |
| company | No | Company name. Omit to use whichever company TallyPrime has loaded. If given and it is not the loaded one, the call fails with TALLY_COMPANY_NOT_LOADED rather than returning another company's data. | |
| country | No | ||
| pincode | No | Postal / ZIP code. | |
| mailingName | No | Name for letters and statements. | |
| openingSide | No | Required with openingBalance. | |
| isBillWiseOn | No | Maintain balances bill-by-bill. Usually true for customers and suppliers. | |
| openingBalance | No | Positive amount, e.g. "12500.00". Use the side field for debit or credit, never a minus sign. | |
| incomeTaxNumber | No | PAN (India) or other income-tax number. |