Purchase Items
Manage line items on a vendor bill / purchase order. Use after creating a purchases header. Use action=“create” to add a line (requires purchase_id and name or catalog_item_id). Totals on the parent purchase are recalculated automatically.
Input Schema
| Parameter | Type | Description |
|---|---|---|
| action | string | Action to perform: create, list, update, delete |
| id | string | Item UUID (required for update, delete) |
| purchase_id | string | Purchase UUID (required for create, list) |
| catalog_item_id | string | Catalog Item UUID (optional; hydrates name/unit_cost) |
| name | string | Line name (optional if catalog_item_id is provided) |
| quantity | number | Quantity (defaults to 1) |
| unit_cost | number | Unit cost (optional if catalog_item_id provides cost) |
| limit | number | Limit results for list |
| offset | number | Offset results for list |
Example
{
"action": "create",
"purchase_id": "YOUR_PURCHASE_ID",
"catalog_item_id": "YOUR_CATALOG_ITEM_ID",
"name": "Raw materials",
"quantity": 5,
"unit_cost": 20
}Last updated on