# POST /inventory/purchase-orders/:purchase_order_id/lines

**Resource:** [INVENTORY](./inventory.md)  
**MCP tool:** `add_purchase_order_line`  
**Scopes:** `purchase_orders:write`  
**Write operation:** yes

Add a product and quantity to a purchase order that is still open.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `purchase_order_id` | path | string | yes | The purchase order (its UUID). |
| `product_id` | body | string | yes | The product being ordered. |
| `quantity` | body | number | yes | How many to order, a whole number above 0. |
| `unit_cost` | body | number | no | Cost per unit, before tax. |
| `description` | body | string | no | Optional note for this line. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/inventory/purchase-orders/:purchase_order_id/lines"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"product_id":"...","quantity":"...","unit_cost":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`