Bills
Vendor bills. Read-only via the API.
GET
/api/v1/billsList bills
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 bill number or vendor bill number. |
Example request
curl "https://invoice.avscorp.in/api/v1/bills" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2bil001000000000000001",
"organizationId": "clx2org001000000000000001",
"billNumber": "BILL-2026-0091",
"vendorBillNumber": "VB-7781",
"vendorId": "clx2vnd001000000000000001",
"purchaseOrderId": "clx2po00001000000000000001",
"status": "PARTIALLY_PAID",
"billDate": "2026-07-01T00:00:00.000Z",
"dueDate": "2026-07-31T00:00:00.000Z",
"sellerLegalName": "AVS Textiles Pvt Ltd",
"sellerGstin": "27AAAAA0000A1Z5",
"sellerStateCode": "27",
"placeOfSupplyStateCode": "27",
"currencyCode": "INR",
"exchangeRate": 1,
"subTotal": 50000,
"discountTotal": 0,
"documentDiscount": 0,
"documentDiscountIsPercent": true,
"cgstTotal": 4500,
"sgstTotal": 4500,
"igstTotal": 0,
"adjustmentLabel": null,
"adjustmentAmount": 0,
"roundOff": 0,
"total": 59000,
"amountPaid": 30000,
"balanceDue": 29000,
"itcEligible": true,
"warehouseId": "clx2wh0001000000000000001",
"notes": null,
"createdBy": "clx2usr001000000000000001",
"updatedBy": null,
"createdAt": "2026-07-01T10:00:00.000Z",
"updatedAt": "2026-07-15T08:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
GET
/api/v1/bills/{id}Get a bill
Scope:
bills.readIncludes items and payment allocations. No `movements` key on this module.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Bill ID. |
Example request
curl "https://invoice.avscorp.in/api/v1/bills/clx2bil001000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2bil001000000000000001",
"organizationId": "clx2org001000000000000001",
"billNumber": "BILL-2026-0091",
"vendorBillNumber": "VB-7781",
"vendorId": "clx2vnd001000000000000001",
"purchaseOrderId": "clx2po00001000000000000001",
"status": "PARTIALLY_PAID",
"billDate": "2026-07-01T00:00:00.000Z",
"dueDate": "2026-07-31T00:00:00.000Z",
"sellerLegalName": "AVS Textiles Pvt Ltd",
"sellerGstin": "27AAAAA0000A1Z5",
"sellerStateCode": "27",
"placeOfSupplyStateCode": "27",
"currencyCode": "INR",
"exchangeRate": 1,
"subTotal": 50000,
"discountTotal": 0,
"documentDiscount": 0,
"documentDiscountIsPercent": true,
"cgstTotal": 4500,
"sgstTotal": 4500,
"igstTotal": 0,
"adjustmentLabel": null,
"adjustmentAmount": 0,
"roundOff": 0,
"total": 59000,
"amountPaid": 30000,
"balanceDue": 29000,
"itcEligible": true,
"warehouseId": "clx2wh0001000000000000001",
"notes": null,
"createdBy": "clx2usr001000000000000001",
"updatedBy": null,
"createdAt": "2026-07-01T10:00:00.000Z",
"updatedAt": "2026-07-15T08:00:00.000Z",
"items": [
{
"id": "clx2bit001000000000000001",
"organizationId": "clx2org001000000000000001",
"billId": "clx2bil001000000000000001",
"itemId": "clx2itm001000000000000001",
"itemVariantId": "clx2var001000000000000001",
"description": "Cotton Fabric - Blue",
"hsnOrSac": "5208",
"quantity": 100,
"unit": "MTR",
"rate": 500,
"discount": 0,
"taxRatePercent": 18,
"taxableAmount": 50000,
"cgstAmount": 4500,
"sgstAmount": 4500,
"igstAmount": 0,
"total": 59000,
"sortOrder": 0,
"width": null,
"height": null,
"lengthUnit": null,
"qtyCount": null
}
],
"allocations": [
{
"id": "clx2pma001000000000000001",
"organizationId": "clx2org001000000000000001",
"paymentId": "clx2pmt001000000000000001",
"billId": "clx2bil001000000000000001",
"amount": 30000
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found
POST
/api/v1/billsCreate a bill
Scope:
bills.createSupports Idempotency-Key`vendorBillNumber` is the vendor's own number. Accepts an optional Idempotency-Key header. Returns only { id, status, total }.
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
vendorId | string | Required | min length 1 |
sellerRegistrationId | any | Optional | — |
vendorBillNumber | string | Required | min length 1; max length 100 |
billDate | string | Required | — |
dueDate | any | Optional | — |
currencyCode | string | Optional | min length 3; max length 3; default "INR" |
exchangeRate | number | Optional | default 1 |
placeOfSupplyStateCode | any | Optional | — |
warehouseId | any | Optional | — |
notes | any | Optional | — |
itcEligible | boolean | Optional | default true |
status | string | Optional | one of: DRAFT, OPEN; default "DRAFT" |
applyVendorDebit | boolean | Optional | default false |
tdsSectionId | any | Optional | — |
lines | array | Required | — |
Example request
curl -X POST "https://invoice.avscorp.in/api/v1/bills" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"vendorId": "clx4ven000000000000000001",
"vendorBillNumber": "KM-101",
"billDate": "2026-10-29",
"lines": [
{
"description": "Cotton shirt",
"quantity": 2,
"rate": 450,
"taxRatePercent": 5
}
]
}'Example response
JSON
{
"id": "clx5bil000000000000000001",
"status": "DRAFT",
"total": 945
}Possible errors: unauthorized, insufficient_scope, forbidden, validation_error, conflict