# PATCH /opportunities/:opportunity_id/product-costs/:cost_id

**Resource:** [Opportunities](./opportunities.md)  
**MCP tool:** `update_opportunity_product_cost`  
**Scopes:** `opportunities:write`  
**Write operation:** yes

Update a supplier cost on an opportunity product line. Only the fields you send change; send null to clear one. Get cost_id from list_opportunity_product_costs.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `opportunity_id` | path | string | yes |  |
| `cost_id` | path | string | yes | The cost line to update, from list_opportunity_product_costs. |
| `label` | body | string | no | Label for the cost line, e.g. "Standard Cost" or "Labour". Shown as Product Name when the cost comes from a supplier catalog product. |
| `unit_cost` | body | number | no | Cost Price per unit, in the cost line's currency. |
| `quantity` | body | number | no | Qty: how many units this cost line covers. |
| `currency` | body | string | no | Currency code, e.g. AUD. |
| `unit` | body | string | no | Unit the quantity counts: once-off, each, minute, hour, day, month, year, kg or unit. Omit or send an empty string for no unit. |
| `sku` | body | string | no | SKU: the supplier's reference code. |
| `supplier_id` | body | string | no | Supplier: UUID of a company marked as a supplier in this workspace. |
| `supplier_product_id` | body | string | no | Supplier Catalog Product: UUID of the item in that supplier's catalog this cost comes from. |
| `notes` | body | string | no | Notes about the cost 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 PATCH   "https://api.trustpager.com/functions/v1/api/v1/opportunities/:opportunity_id/product-costs/:cost_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"label":"...","unit_cost":"...","quantity":"..."}'
```

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