Estimates
Autocomplete suggestions for the line-item note field (ITE-573 + ITE-574): saved note templates merged with distinct notes previously used on estimate lines for the same catalog item. Saved entries carry `source: "saved"` + their `templateId`; history entries carry `source: "history"` + null. Serves the FE combobox (ITE-575). Saved-template candidacy: templates with an attachment to the line's item id, tag attachments whose Smart Tag is assigned to the line's item (service/inventory lines only — retail and billable items are not taggable), plus any-item templates (AppliesToAnyItem, offered on any keyed line); Clinic scope for everyone, Personal scope only for the owner. A history entry whose trimmed case-insensitive text equals a saved template's collapses INTO the saved entry (saved wins). Orphaned templates (item-specific, all items deleted) are never offered. The caller sends exactly one item-id param — whichever FK the line being authored keys on. `PrescriptionItemId` is deliberately NOT a keying param: Rx-created lines always carry `InventoryItemId` too, and a prescription item is a per-prescription governance record, not a reusable catalog identity. Ranking: q match quality (prefix beats substring) → recency → frequency. De-duped case-insensitively on trimmed text; blank or <3-char notes excluded. Always 200 with `[]` on no key / no match.
Changed onget/Estimates/line-item-notes/suggestions
Request
- Base URLhttps://api.clinicos.vet/backend/business
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
serviceCatalogItemIdstring
inventoryItemIdstring
retailItemIdstring
billableItemIdstring
qstring
Response
OK
Changes
- info
endpoint added
- info