> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fire.rest/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a PO line

> Fully replaces a DRAFT purchase order line. Same fields as on creation.

<ParamField header="x-api-key" type="string" required>
  API key with `inventory:write` scope.
</ParamField>

<ParamField path="vendorId" type="string" required>
  Vendor UUID.
</ParamField>

<ParamField path="orderId" type="string" required>
  Purchase order UUID. Must be in `DRAFT` status.
</ParamField>

<ParamField path="lineId" type="string" required>
  Purchase order line UUID.
</ParamField>

<ParamField body="qty" type="number" required>
  Updated ordered quantity in the entry unit.
</ParamField>

<ParamField body="qty_base" type="number">
  Updated quantity in the item's base unit. Optional when the line references `unit_code` or `item_unit_id` — the server derives it as `qty × factor_to_base`.
</ParamField>

<ParamField body="unit_cost" type="number">
  Updated cost per unit.
</ParamField>

<ParamField body="unit_label" type="string">
  Updated unit label.
</ParamField>

<ParamField body="tax_amount" type="number">
  Updated tax amount.
</ParamField>

<ParamField body="delivery_amount" type="number">
  Updated delivery amount.
</ParamField>

<ParamField body="total_amount" type="number">
  Updated total amount.
</ParamField>

<ParamField body="markup_amount" type="number">
  Updated markup amount.
</ParamField>

<ParamField body="notes" type="string">
  Updated line notes.
</ParamField>

<ParamField body="metadata" type="object">
  Updated extra data.
</ParamField>

<ResponseField name="line" type="object">
  Updated line with full detail.
</ResponseField>

<RequestExample>
  ```json theme={null}
  {
    "qty": 15,
    "qty_base": 15000,
    "unit_cost": 4.3
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "line": {
      "id": "pol_01...",
      "purchase_order_id": "po_01j5k...",
      "item_id": "itm_chicken_01...",
      "qty": 15,
      "qty_base": 15000,
      "unit_cost": 4.3
    }
  }
  ```
</ResponseExample>
