Debit Notes
Vendor debit notes against bills. Read-only via the API; uses the bills.* permission scope.
GET
/api/v1/debit-notesList debit notes
Scope:
bills.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | Optional | 1-based page number. |
limit | query | number | Optional | Page size, max 200. |
q | query | string | Optional | Free-text search on debit note number or reason. |
Example request
curl "https://pre-invoice.avscorp.in/api/v1/debit-notes" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2dn0001000000000000001",
"organizationId": "clx2org001000000000000001",
"debitNoteNumber": "DN-2026-0004",
"vendorId": "clx2vnd001000000000000001",
"billId": "clx2bil001000000000000001",
"status": "OPEN",
"debitNoteDate": "2026-08-12T00:00:00.000Z",
"sellerLegalName": "AVS Textiles Pvt Ltd",
"sellerGstin": "27AAAAA0000A1Z5",
"sellerStateCode": "27",
"placeOfSupplyStateCode": "27",
"currencyCode": "INR",
"exchangeRate": 1,
"subTotal": 5000,
"discountTotal": 0,
"cgstTotal": 450,
"sgstTotal": 450,
"igstTotal": 0,
"roundOff": 0,
"total": 5900,
"allocatedAmount": 5900,
"balanceUnallocated": 0,
"reason": "Damaged goods returned",
"notes": null,
"termsAndConditions": null,
"warehouseId": "clx2wh0001000000000000001",
"createdBy": "clx2usr001000000000000001",
"updatedBy": null,
"createdAt": "2026-08-12T09:30:00.000Z",
"updatedAt": "2026-08-12T09:30:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
GET
/api/v1/debit-notes/{id}Get a debit note
Scope:
bills.readIncludes items, allocations (against bills/cash), and inventory movements.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Debit note ID. |
Example request
curl "https://pre-invoice.avscorp.in/api/v1/debit-notes/clx2dn0001000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2dn0001000000000000001",
"organizationId": "clx2org001000000000000001",
"debitNoteNumber": "DN-2026-0004",
"vendorId": "clx2vnd001000000000000001",
"billId": "clx2bil001000000000000001",
"status": "OPEN",
"debitNoteDate": "2026-08-12T00:00:00.000Z",
"sellerLegalName": "AVS Textiles Pvt Ltd",
"sellerGstin": "27AAAAA0000A1Z5",
"sellerStateCode": "27",
"placeOfSupplyStateCode": "27",
"currencyCode": "INR",
"exchangeRate": 1,
"subTotal": 5000,
"discountTotal": 0,
"cgstTotal": 450,
"sgstTotal": 450,
"igstTotal": 0,
"roundOff": 0,
"total": 5900,
"allocatedAmount": 5900,
"balanceUnallocated": 0,
"reason": "Damaged goods returned",
"notes": null,
"termsAndConditions": null,
"warehouseId": "clx2wh0001000000000000001",
"createdBy": "clx2usr001000000000000001",
"updatedBy": null,
"createdAt": "2026-08-12T09:30:00.000Z",
"updatedAt": "2026-08-12T09:30:00.000Z",
"items": [
{
"id": "clx2dni001000000000000001",
"organizationId": "clx2org001000000000000001",
"debitNoteId": "clx2dn0001000000000000001",
"itemId": "clx2itm001000000000000001",
"itemVariantId": "clx2var001000000000000001",
"originalBillItemId": "clx2bit001000000000000001",
"description": "Cotton Fabric - Blue",
"hsnOrSac": "5208",
"quantity": 10,
"unit": "MTR",
"rate": 500,
"discount": 0,
"taxRatePercent": 18,
"taxableAmount": 5000,
"cgstAmount": 450,
"sgstAmount": 450,
"igstAmount": 0,
"total": 5900,
"restock": true,
"sortOrder": 0,
"width": null,
"height": null,
"lengthUnit": null,
"qtyCount": null
}
],
"allocations": [
{
"id": "clx2dna001000000000000001",
"organizationId": "clx2org001000000000000001",
"debitNoteId": "clx2dn0001000000000000001",
"billId": "clx2bil001000000000000001",
"amount": 5900,
"allocatedAt": "2026-08-12T09:30:00.000Z",
"createdBy": "clx2usr001000000000000001"
}
],
"movements": [
{
"id": "clx2mov001000000000000001",
"organizationId": "clx2org001000000000000001",
"itemVariantId": "clx2var001000000000000001",
"warehouseId": "clx2wh0001000000000000001",
"movementType": "PURCHASE_RETURN_OUT",
"quantity": 10,
"unitCost": 480,
"totalCost": 4800,
"balanceAfter": 40,
"avgCostAfter": 480,
"sourceDocType": "DEBIT_NOTE",
"sourceDocId": "clx2dn0001000000000000001",
"sourceDocLineId": "clx2dni001000000000000001",
"lotId": null,
"notes": null,
"createdBy": "clx2usr001000000000000001",
"createdAt": "2026-08-12T09:30:00.000Z"
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found