Quotes

Sales quotes. Read-only via the API — creation/editing happens in the web app.

GET/api/v1/quotes

List quotes

Scope: quotes.read

Parameters

NameInTypeRequiredDescription
pagequerynumberOptional1-based page number.
limitquerynumberOptionalPage size, max 200.
qquerystringOptionalFree-text search on quote number.
customerIdquerystringOptionalFilter to one customer's records. A customer outside your access returns an empty list.

Example request

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

Example response

JSON
{
  "id": "clx7quo00000000000000001",
  "organizationId": "clx0org000000000000000001",
  "quoteNumber": "QT-00017",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "status": "SENT",
  "quoteDate": "2026-08-20T00:00:00.000Z",
  "expiryDate": "2026-09-19T00:00:00.000Z",
  "sellerLegalName": "AVS Traders Pvt Ltd",
  "sellerGstin": "29AAAAA0000A1Z5",
  "sellerStateCode": "29",
  "placeOfSupplyStateCode": "29",
  "currencyCode": "INR",
  "exchangeRate": 1,
  "subTotal": 10000,
  "discountTotal": 0,
  "documentDiscount": 0,
  "documentDiscountIsPercent": true,
  "cgstTotal": 900,
  "sgstTotal": 900,
  "igstTotal": 0,
  "adjustmentLabel": null,
  "adjustmentAmount": 0,
  "roundOff": 0,
  "total": 11800,
  "warehouseId": "clx9wh0000000000000000001",
  "notes": null,
  "termsAndConditions": "Valid for 30 days from quote date.",
  "createdBy": "clxusr0000000000000000001",
  "updatedBy": null,
  "createdAt": "2026-08-20T07:00:00.000Z",
  "updatedAt": "2026-08-20T07:00:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden

GET/api/v1/quotes/{id}

Get a quote

Scope: quotes.read

Includes the quote's line items under `items`.

Parameters

NameInTypeRequiredDescription
idpathstringRequiredQuote ID.

Example request

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

Example response

JSON
{
  "id": "clx7quo00000000000000001",
  "organizationId": "clx0org000000000000000001",
  "quoteNumber": "QT-00017",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "status": "SENT",
  "quoteDate": "2026-08-20T00:00:00.000Z",
  "expiryDate": "2026-09-19T00:00:00.000Z",
  "sellerLegalName": "AVS Traders Pvt Ltd",
  "sellerGstin": "29AAAAA0000A1Z5",
  "sellerStateCode": "29",
  "placeOfSupplyStateCode": "29",
  "currencyCode": "INR",
  "exchangeRate": 1,
  "subTotal": 10000,
  "discountTotal": 0,
  "documentDiscount": 0,
  "documentDiscountIsPercent": true,
  "cgstTotal": 900,
  "sgstTotal": 900,
  "igstTotal": 0,
  "adjustmentLabel": null,
  "adjustmentAmount": 0,
  "roundOff": 0,
  "total": 11800,
  "warehouseId": "clx9wh0000000000000000001",
  "notes": null,
  "termsAndConditions": "Valid for 30 days from quote date.",
  "createdBy": "clxusr0000000000000000001",
  "updatedBy": null,
  "createdAt": "2026-08-20T07:00:00.000Z",
  "updatedAt": "2026-08-20T07:00:00.000Z",
  "items": [
    {
      "id": "clx7qi000000000000000001",
      "organizationId": "clx0org000000000000000001",
      "quoteId": "clx7quo00000000000000001",
      "itemId": "clx3itm000000000000000001",
      "itemVariantId": null,
      "description": "Vinyl Banner Print - Standard",
      "hsnOrSac": "4911",
      "quantity": 20,
      "unit": "PCS",
      "rate": 500,
      "discount": 0,
      "taxRatePercent": 18,
      "taxableAmount": 10000,
      "cgstAmount": 900,
      "sgstAmount": 900,
      "igstAmount": 0,
      "total": 11800,
      "sortOrder": 0,
      "width": null,
      "height": null,
      "lengthUnit": null,
      "qtyCount": null
    }
  ]
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found

POST/api/v1/quotes

Create a quote

Scope: quotes.createSupports Idempotency-Key

Saved as DRAFT unless `status` says otherwise. Counts toward the plan's monthly quote limit. Accepts an optional Idempotency-Key header.

Request body

FieldTypeRequiredConstraints
customerIdstringRequiredmin length 1
salespersonIdstringOptionalmax length 30
sellerRegistrationIdanyOptional—
quoteDatestringRequired—
expiryDateanyOptional—
currencyCodestringOptionalmin length 3; max length 3; default "INR"
exchangeRatenumberOptionaldefault 1
placeOfSupplyStateCodeanyOptional—
warehouseIdanyOptional—
notesanyOptional—
termsAndConditionsanyOptional—
statusstringOptionalone of: DRAFT, SENT; default "DRAFT"
opportunityIdanyOptional—
linesarrayRequired—

Example request

curl -X POST "https://pre-invoice.avscorp.in/api/v1/quotes" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "customerId": "clx1cus000000000000000001",
  "quoteDate": "2026-10-29",
  "lines": [
    {
      "description": "Cotton shirt",
      "quantity": 2,
      "rate": 450,
      "taxRatePercent": 5
    }
  ]
}'

Example response

JSON
{
  "id": "clx7quo00000000000000001",
  "quoteNumber": "QT-0001",
  "status": "DRAFT",
  "total": 945
}

Possible errors: unauthorized, insufficient_scope, forbidden, validation_error, conflict