Purchase Orders
Purchase orders sent to vendors. Read-only via the API.
GET
/api/v1/purchase-ordersList purchase orders
Scope:
purchaseOrders.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 purchase order number. |
Example request
curl "https://invoice.avscorp.in/api/v1/purchase-orders" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2po00001000000000000001",
"organizationId": "clx2org001000000000000001",
"purchaseOrderNumber": "PO-2026-0037",
"vendorId": "clx2vnd001000000000000001",
"status": "CONFIRMED",
"orderDate": "2026-06-20T00:00:00.000Z",
"expectedDeliveryDate": "2026-06-30T00: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,
"warehouseId": "clx2wh0001000000000000001",
"notes": null,
"termsAndConditions": null,
"createdBy": "clx2usr001000000000000001",
"updatedBy": null,
"createdAt": "2026-06-20T09:00:00.000Z",
"updatedAt": "2026-06-20T09:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
GET
/api/v1/purchase-orders/{id}Get a purchase order
Scope:
purchaseOrders.readLine items are nested under `lines` (this module's own naming — not `items` or `lineItems`).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Purchase order ID. |
Example request
curl "https://invoice.avscorp.in/api/v1/purchase-orders/clx2po00001000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2po00001000000000000001",
"organizationId": "clx2org001000000000000001",
"purchaseOrderNumber": "PO-2026-0037",
"vendorId": "clx2vnd001000000000000001",
"status": "CONFIRMED",
"orderDate": "2026-06-20T00:00:00.000Z",
"expectedDeliveryDate": "2026-06-30T00: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,
"warehouseId": "clx2wh0001000000000000001",
"notes": null,
"termsAndConditions": null,
"createdBy": "clx2usr001000000000000001",
"updatedBy": null,
"createdAt": "2026-06-20T09:00:00.000Z",
"updatedAt": "2026-06-20T09:00:00.000Z",
"lines": [
{
"id": "clx2poi001000000000000001",
"organizationId": "clx2org001000000000000001",
"purchaseOrderId": "clx2po00001000000000000001",
"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
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found