Vendor Ledger
Computed running-balance statement per vendor (bills, payments, debit notes). Read-only; uses the reports.read scope.
GET
/api/v1/vendor-ledgerList ledger-eligible vendors
Scope:
reports.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | Optional | Free-text search on display name, GSTIN, phone, or email. |
Example request
curl "https://invoice.avscorp.in/api/v1/vendor-ledger" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"vendorId": "clx2vnd001000000000000001",
"displayName": "Shree Textile Suppliers",
"openingBalance": 0,
"currencyCode": "INR"
}Possible errors: unauthorized, insufficient_scope, forbidden
GET
/api/v1/vendor-ledger/{id}Get a vendor's computed ledger
Scope:
reports.readid is the vendorId. Optional ?from=YYYY-MM-DD&to=YYYY-MM-DD windows the `entries` array. Payables sign convention: bills/debit notes credit the balance, payments debit it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Vendor ID. |
from | query | string | Optional | Window start date, YYYY-MM-DD. |
to | query | string | Optional | Window end date, YYYY-MM-DD. |
Example request
curl "https://invoice.avscorp.in/api/v1/vendor-ledger/clx2vnd001000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"vendor": {
"id": "clx2vnd001000000000000001",
"displayName": "Shree Textile Suppliers"
},
"entries": [
{
"date": "2026-07-01T00:00:00.000Z",
"type": "invoice",
"number": "BILL-2026-0091",
"debit": 0,
"credit": 59000,
"status": "PARTIALLY_PAID",
"balance": 59000
},
{
"date": "2026-07-15T00:00:00.000Z",
"type": "payment",
"number": "PMT-2026-0058",
"debit": 30000,
"credit": 0,
"status": "",
"balance": 29000
}
],
"openingBalance": 0,
"outstanding": 29000
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found