Sales Orders

Confirmed sales orders. Read-only via the API.

GET/api/v1/sales-orders

List sales orders

Scope: salesOrders.read

Parameters

NameInTypeRequiredDescription
pagequerynumberOptional1-based page number.
limitquerynumberOptionalPage size, max 200.
qquerystringOptionalFree-text search on sales order number.

Example request

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

Example response

JSON
{
  "id": "clx8so000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "salesOrderNumber": "SO-00031",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "quoteId": "clx7quo00000000000000001",
  "status": "CONFIRMED",
  "orderDate": "2026-08-22T00:00:00.000Z",
  "expectedShipmentDate": "2026-08-29T00: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": "Delivery within 7 business days.",
  "createdBy": "clxusr0000000000000000001",
  "updatedBy": null,
  "createdAt": "2026-08-22T08:10:00.000Z",
  "updatedAt": "2026-08-22T08:10:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden

GET/api/v1/sales-orders/{id}

Get a sales order

Scope: salesOrders.read

Includes the order's line items under `lineItems` (not `items` — differs from quotes).

Parameters

NameInTypeRequiredDescription
idpathstringRequiredSales order ID.

Example request

curl "https://invoice.avscorp.in/api/v1/sales-orders/clx8so000000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx8so000000000000000001",
  "organizationId": "clx0org000000000000000001",
  "salesOrderNumber": "SO-00031",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "quoteId": "clx7quo00000000000000001",
  "status": "CONFIRMED",
  "orderDate": "2026-08-22T00:00:00.000Z",
  "expectedShipmentDate": "2026-08-29T00: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": "Delivery within 7 business days.",
  "createdBy": "clxusr0000000000000000001",
  "updatedBy": null,
  "createdAt": "2026-08-22T08:10:00.000Z",
  "updatedAt": "2026-08-22T08:10:00.000Z",
  "lineItems": [
    {
      "id": "clx8soi00000000000000001",
      "organizationId": "clx0org000000000000000001",
      "salesOrderId": "clx8so000000000000000001",
      "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