Debit Notes
Vendor debit notes against bills. Uses the debitNotes.* scope (bills.* tokens keep working).
GET
/api/v1/debit-notesList debit notes
Scope:
debitNotes.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://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:
debitNotes.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://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
POST
/api/v1/debit-notesCreate a debit note
Scope:
debitNotes.createSupports Idempotency-KeyNeeds the `debitNotes.create` permission. Accepts an optional Idempotency-Key header. Returns only { id, total }.
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
vendorId | string | Required | min length 1 |
sellerRegistrationId | any | Optional | — |
billId | any | Optional | — |
debitNoteDate | string | Required | — |
placeOfSupplyStateCode | any | Optional | — |
currencyCode | string | Optional | min length 3; max length 3; default "INR" |
exchangeRate | number | Optional | default 1 |
reason | any | Optional | — |
notes | any | Optional | — |
termsAndConditions | any | Optional | — |
warehouseId | any | Optional | — |
status | string | Optional | one of: DRAFT, OPEN; default "DRAFT" |
autoAllocateToBill | boolean | Optional | default true |
lines | array | Required | — |
Example request
curl -X POST "https://invoice.avscorp.in/api/v1/debit-notes" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"vendorId": "clx4ven000000000000000001",
"debitNoteDate": "2026-10-29",
"lines": [
{
"description": "Cotton shirt",
"quantity": 2,
"rate": 450,
"taxRatePercent": 5
}
]
}'Example response
JSON
{
"id": "clxadn000000000000000001",
"total": 945
}Possible errors: unauthorized, insufficient_scope, forbidden, validation_error, conflict