---
title: "Changes to Link a pre-existing open estimate to an appointment. Honors the unique index on\n    `treatment_plans.appointment_id` (one estimate per appointment):\n    * No estimate on the appointment yet → set AppointmentId on the chosen one.\n* The appointment's auto-created estimate is empty → drop it and re-point the chosen\n    estimate (preserves the chosen estimate's identity + consent history).\n* The appointment's estimate already has lines → merge the chosen estimate's lines into\n    it and remove the chosen estimate. Its consent trail moves to the survivor first and an\n    ConsentEventType.EstimateMerged event records the merge (ITE-1450).\n    A removed estimate's consent events are always re-parented, never cascade-deleted.\n    Returns the resulting estimate the Services tab should render."
method: POST
path: "/Estimates/{id}/link-appointment"
---

# Changes to Link a pre-existing open estimate to an appointment. Honors the unique index on
    `treatment_plans.appointment_id` (one estimate per appointment):
    * No estimate on the appointment yet → set AppointmentId on the chosen one.
* The appointment's auto-created estimate is empty → drop it and re-point the chosen
    estimate (preserves the chosen estimate's identity + consent history).
* The appointment's estimate already has lines → merge the chosen estimate's lines into
    it and remove the chosen estimate. Its consent trail moves to the survivor first and an
    ConsentEventType.EstimateMerged event records the merge (ITE-1450).
    A removed estimate's consent events are always re-parented, never cascade-deleted.
    Returns the resulting estimate the Services tab should render.

`POST /Estimates/{id}/link-appointment`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 4 of 14 revisions.

- **2026-10-28** `099cf36186e0`: 18 info
- **2026-10-21** `85ee96c0bb96`: 6 info
- **2026-10-11** `f7ab358172d0`: 42 info
- **2026-09-30** `d58b40cfca93`: 3 info

## Changes

- **2026-10-28** `099cf36186e0`: 18 info
  - added the optional property `groups/items/isPinned` to the response with the `200` status (media type: text/plain)
  - added the optional property `groups/items/isPinned` to the response with the `200` status (media type: application/json)
  - added the optional property `groups/items/isPinned` to the response with the `200` status (media type: text/json)
  - added the optional property `groups/items/origin` to the response with the `200` status (media type: text/plain)
  - added the optional property `groups/items/origin` to the response with the `200` status (media type: application/json)
  - added the optional property `groups/items/origin` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/groupCodeId` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/groupCodeId` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/groupCodeId` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/groupCodeName` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/groupCodeName` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/groupCodeName` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/kitInstanceId` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/kitInstanceId` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/kitInstanceId` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/vatCategory` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/vatCategory` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/vatCategory` to the response with the `200` status (media type: text/json)
- **2026-10-21** `85ee96c0bb96`: 6 info
  - added the optional property `groups` to the response with the `200` status (media type: text/plain)
  - added the optional property `groups` to the response with the `200` status (media type: application/json)
  - added the optional property `groups` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/groupId` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/groupId` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/groupId` to the response with the `200` status (media type: text/json)
- **2026-10-11** `f7ab358172d0`: 42 info
  - added the optional property `items/items/appliedDiscount` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/appliedDiscount` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/appliedDiscount` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/discount` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/discount` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/discount` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/discountAmount` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/discountAmount` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/discountAmount` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/discountSetAt` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/discountSetAt` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/discountSetAt` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/discountSetById` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/discountSetById` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/discountSetById` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/discountSetByName` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/discountSetByName` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/discountSetByName` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/dispensedQuantity` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/dispensedQuantity` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/dispensedQuantity` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/isFlatRate` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/isFlatRate` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/isFlatRate` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/originalUnitPrice` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/originalUnitPrice` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/originalUnitPrice` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/priceOverriddenAt` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/priceOverriddenAt` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/priceOverriddenAt` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/priceOverriddenById` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/priceOverriddenById` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/priceOverriddenById` to the response with the `200` status (media type: text/json)
  - added the optional property `items/items/priceOverriddenByName` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/priceOverriddenByName` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/priceOverriddenByName` to the response with the `200` status (media type: text/json)
  - added the optional property `orderDiscount` to the response with the `200` status (media type: text/plain)
  - added the optional property `orderDiscount` to the response with the `200` status (media type: application/json)
  - added the optional property `orderDiscount` to the response with the `200` status (media type: text/json)
  - added the optional property `orderDiscountAmount` to the response with the `200` status (media type: text/plain)
  - …2 more
- **2026-09-30** `d58b40cfca93`: 3 info
  - added the optional property `items/items/createdByAi` to the response with the `200` status (media type: text/plain)
  - added the optional property `items/items/createdByAi` to the response with the `200` status (media type: application/json)
  - added the optional property `items/items/createdByAi` to the response with the `200` status (media type: text/json)

---

[Operation](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/Estimates/:id/link-appointment/post.md) - [API](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1.md) - [Page](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/Estimates/:id/link-appointment/post)
