Inventory
Stock-on-hand positions (item variant × warehouse). Read-only via the API.
GET
/api/v1/inventoryList stock positions
Scope:
items.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 item/variant/warehouse name or code. |
Example request
curl "https://invoice.avscorp.in/api/v1/inventory" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2soh001000000000000001",
"itemVariantId": "clx2var001000000000000001",
"warehouseId": "clx2wh0001000000000000001",
"itemId": "clx2itm001000000000000001",
"itemName": "Cotton Fabric",
"variantSize": "Blue - 44in",
"variantSku": "CF-BLUE-44",
"warehouseName": "Main Warehouse",
"warehouseCode": "MAIN",
"quantityOnHand": 40,
"quantityReserved": 5,
"quantityAvailable": 35,
"averageCost": 480.5,
"lowStockThreshold": 10,
"lastMovementAt": "2026-08-12T09:30:00.000Z",
"updatedAt": "2026-08-12T09:30:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
GET
/api/v1/inventory/{id}Get a stock position
Scope:
items.readAdds up to 100 recent inventory movements for this item variant + warehouse, newest first.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Stock-on-hand position ID. |
Example request
curl "https://invoice.avscorp.in/api/v1/inventory/clx2soh001000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2soh001000000000000001",
"itemVariantId": "clx2var001000000000000001",
"warehouseId": "clx2wh0001000000000000001",
"itemId": "clx2itm001000000000000001",
"itemName": "Cotton Fabric",
"variantSize": "Blue - 44in",
"variantSku": "CF-BLUE-44",
"warehouseName": "Main Warehouse",
"warehouseCode": "MAIN",
"quantityOnHand": 40,
"quantityReserved": 5,
"quantityAvailable": 35,
"averageCost": 480.5,
"lowStockThreshold": 10,
"lastMovementAt": "2026-08-12T09:30:00.000Z",
"updatedAt": "2026-08-12T09:30:00.000Z",
"movements": [
{
"id": "clx2mov001000000000000001",
"movementType": "PURCHASE_RETURN_OUT",
"quantity": 10,
"unitCost": 480,
"totalCost": 4800,
"balanceAfter": 40,
"avgCostAfter": 480.5,
"sourceDocType": "DEBIT_NOTE",
"sourceDocId": "clx2dn0001000000000000001",
"notes": null,
"createdAt": "2026-08-12T09:30:00.000Z"
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found