Credit Notes

Customer credit notes against invoices. Read-only via the API; uses the invoices.* permission scope.

GET/api/v1/credit-notes

List credit notes

Scope: invoices.read

Parameters

NameInTypeRequiredDescription
pagequerynumberOptional1-based page number.
limitquerynumberOptionalPage size, max 200.
qquerystringOptionalFree-text search on credit note number or reason.

Example request

curl "https://pre-invoice.avscorp.in/api/v1/credit-notes" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx9cn000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "creditNoteNumber": "CN-00009",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "invoiceId": "clxAinv0000000000000000001",
  "status": "OPEN",
  "creditNoteDate": "2026-09-05T00:00:00.000Z",
  "sellerLegalName": "AVS Traders Pvt Ltd",
  "sellerGstin": "29AAAAA0000A1Z5",
  "sellerStateCode": "29",
  "placeOfSupplyStateCode": "29",
  "currencyCode": "INR",
  "exchangeRate": 1,
  "subTotal": 2000,
  "discountTotal": 0,
  "cgstTotal": 180,
  "sgstTotal": 180,
  "igstTotal": 0,
  "roundOff": 0,
  "total": 2360,
  "allocatedAmount": 2360,
  "balanceUnallocated": 0,
  "reason": "Damaged goods returned",
  "notes": null,
  "termsAndConditions": null,
  "warehouseId": "clx9wh0000000000000000001",
  "createdBy": "clxusr0000000000000000001",
  "updatedBy": null,
  "createdAt": "2026-09-05T09:30:00.000Z",
  "updatedAt": "2026-09-05T09:30:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden

GET/api/v1/credit-notes/{id}

Get a credit note

Scope: invoices.read

Includes items, allocations (against invoices/cash), and inventory movements.

Parameters

NameInTypeRequiredDescription
idpathstringRequiredCredit note ID.

Example request

curl "https://pre-invoice.avscorp.in/api/v1/credit-notes/clx9cn000000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx9cn000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "creditNoteNumber": "CN-00009",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "invoiceId": "clxAinv0000000000000000001",
  "status": "OPEN",
  "creditNoteDate": "2026-09-05T00:00:00.000Z",
  "sellerLegalName": "AVS Traders Pvt Ltd",
  "sellerGstin": "29AAAAA0000A1Z5",
  "sellerStateCode": "29",
  "placeOfSupplyStateCode": "29",
  "currencyCode": "INR",
  "exchangeRate": 1,
  "subTotal": 2000,
  "discountTotal": 0,
  "cgstTotal": 180,
  "sgstTotal": 180,
  "igstTotal": 0,
  "roundOff": 0,
  "total": 2360,
  "allocatedAmount": 2360,
  "balanceUnallocated": 0,
  "reason": "Damaged goods returned",
  "notes": null,
  "termsAndConditions": null,
  "warehouseId": "clx9wh0000000000000000001",
  "createdBy": "clxusr0000000000000000001",
  "updatedBy": null,
  "createdAt": "2026-09-05T09:30:00.000Z",
  "updatedAt": "2026-09-05T09:30:00.000Z",
  "items": [
    {
      "id": "clx9cni00000000000000001",
      "organizationId": "clx0org000000000000000001",
      "creditNoteId": "clx9cn000000000000000001",
      "itemId": "clx3itm000000000000000001",
      "itemVariantId": "clx7var000000000000000002",
      "originalInvoiceItemId": "clxAinvi000000000000000001",
      "description": "Vinyl Banner Print - Standard",
      "hsnOrSac": "4911",
      "quantity": 4,
      "unit": "PCS",
      "rate": 500,
      "discount": 0,
      "taxRatePercent": 18,
      "taxableAmount": 2000,
      "cgstAmount": 180,
      "sgstAmount": 180,
      "igstAmount": 0,
      "total": 2360,
      "restock": true,
      "sortOrder": 0,
      "width": null,
      "height": null,
      "lengthUnit": null,
      "qtyCount": null
    }
  ],
  "allocations": [
    {
      "id": "clx9cna00000000000000001",
      "organizationId": "clx0org000000000000000001",
      "creditNoteId": "clx9cn000000000000000001",
      "invoiceId": "clxAinv0000000000000000001",
      "amount": 2360,
      "allocatedAt": "2026-09-05T09:30:00.000Z",
      "createdBy": "clxusr0000000000000000001"
    }
  ],
  "movements": [
    {
      "id": "clx9sm000000000000000001",
      "organizationId": "clx0org000000000000000001",
      "itemVariantId": "clx7var000000000000000002",
      "warehouseId": "clx9wh0000000000000000001",
      "movementType": "SALES_RETURN_IN",
      "quantity": 4,
      "unitCost": 250.5,
      "totalCost": 1002,
      "balanceAfter": 54,
      "avgCostAfter": 250.5,
      "sourceDocType": "CREDIT_NOTE",
      "sourceDocId": "clx9cn000000000000000001",
      "sourceDocLineId": "clx9cni00000000000000001",
      "lotId": null,
      "notes": null,
      "createdBy": "clxusr0000000000000000001",
      "createdAt": "2026-09-05T09:30:00.000Z"
    }
  ]
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found