---
title: "Changes to Revert an UNPAID invoice back to an editable estimate. Archives the bill (marks it\n    InvoiceStatus.Superseded, keeping its lines as a read-only record), unstamps\n    the dispense-linked transactions (so the dispenses re-appear as unbilled on the estimate),\n    releases its appointment, reopens the source estimate to Draft, and records an\n    ConsentEventType.InvoiceReverted consent event. Blocked once the invoice has\n    any payment (PartiallyPaid/Paid or any non-failed Payment) — those need refund/void first.\n    Does NOT reverse dispenses: lines stay Performed with their InventoryTransactionId on the\nestimate; returning stock is the separate per-line void flow. Routed under /invoices\n(absolute route) to match the bill it acts on; Billing-permission gated at controller level."
method: POST
path: "/invoices/{invoiceId}/revert-to-estimate"
---

# Changes to Revert an UNPAID invoice back to an editable estimate. Archives the bill (marks it
    InvoiceStatus.Superseded, keeping its lines as a read-only record), unstamps
    the dispense-linked transactions (so the dispenses re-appear as unbilled on the estimate),
    releases its appointment, reopens the source estimate to Draft, and records an
    ConsentEventType.InvoiceReverted consent event. Blocked once the invoice has
    any payment (PartiallyPaid/Paid or any non-failed Payment) — those need refund/void first.
    Does NOT reverse dispenses: lines stay Performed with their InventoryTransactionId on the
estimate; returning stock is the separate per-line void flow. Routed under /invoices
(absolute route) to match the bill it acts on; Billing-permission gated at controller level.

`POST /invoices/{invoiceId}/revert-to-estimate`

> 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/invoices/:invoiceId/revert-to-estimate/post.md) - [API](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1.md) - [Page](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/invoices/:invoiceId/revert-to-estimate/post)
