a905bde4e796

latestOpenAPI 3.1.12026-08-078549932.4 MB
Estimates

Convert a treatment plan to an estimate using the selected tier's quantities.

post/Estimates/{id}/convert-to-invoice

Path parameters

idstring required

Request body

selectedTierstring
consentMethodstring

How consent was captured for this acceptance. Defaults to "InApp" (tap-accept, no signature). Send "Signature" together with string? ConvertToInvoiceRequest.SignatureData and string? ConvertToInvoiceRequest.SignedName to record a drawn-signature acceptance.

signatureDatastring nullable

Base64-encoded PNG of the signature (required when ConsentMethod=Signature).

signedNamestring nullable

Typed name the signer provided (required when ConsentMethod=Signature).

overrideReadinessboolean

Bypass the convert-readiness gate even when lines are unresolved or take-home labels are outstanding. Requires a non-empty string? ConvertToInvoiceRequest.OverrideReason. Billing-permission gated (the controller requires Billing) and recorded on the consent timeline as a ConsentEventType.ConvertReadinessOverridden event.

overrideReasonstring nullable

Why the readiness gate was overridden (required when OverrideReadiness=true).

replaceExistingInvoiceboolean

Confirm replacing the appointment's existing (unpaid) invoice. An appointment can hold only one live invoice (estimates.appointment_id is uniquely indexed). When one already exists, convert returns 409 INVOICE_ALREADY_EXISTS; re-send with this set to archive the old bill (it becomes InvoiceStatus.Superseded, keeping its lines as a record) and create the new one. A paid/partially-paid existing invoice is never replaced — that returns 409 INVOICE_PAID and must be refunded/voided first.

Response

OK

idstring
invoiceNumberstring
clientIdstring nullable
clientNamestring nullable
patientIdstring nullable
patientNamestring nullable
appointmentIdstring nullable
providerModestring
invoiceProviderIdstring nullable
statusstring
taxModestring

"us-sales-tax" or "vat" — snapshot at estimate creation.

notesstring nullable
mergedIntoInvoiceIdstring nullable

Set when this invoice was merged into a new combined invoice (it is then Superseded): the id of the successor bill.

mergedIntoInvoiceNumberstring nullable

Human-readable number of the successor combined invoice this one was merged into (set only on a Superseded source). Lets the UI link forward without a second fetch.

signatureDatastring nullable
signedAtstring date-time nullable
issuedAtstring date-time nullable

When the bill was issued (Draft → Unpaid) and its totals frozen. Null for Drafts and legacy invoices issued before the issue boundary.

createdAtstring date-time
updatedAtstring date-time