---
title: "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 &lt;3-char notes excluded. Always 200 with `[]` on no key / no match."
method: GET
path: "/Estimates/line-item-notes/suggestions"
tags: ["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 &lt;3-char notes excluded. Always 200 with \`\[\]\` on no key / no match.

`GET /Estimates/line-item-notes/suggestions`

## Request

- Base URL: `https://api.clinicos.vet/backend/business`
- URL: `https://api.clinicos.vet/backend/business/Estimates/line-item-notes/suggestions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/Estimates/line-item-notes/suggestions/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `serviceCatalogItemId` string
- `inventoryItemId` string
- `retailItemId` string
- `billableItemId` string
- `q` string
- `limit` union
  - integer
  - string, int32

## Response `200`

OK

- LineItemNoteSuggestionDto[]
  - `source` string: "history" (a note previously used on this item) or "saved" (ITE-574 template).
  - `text` string
  - `templateId` string, nullable: Saved-template id when string LineItemNoteSuggestionDto.Source is "saved"; always null for history.

## Changes

- **2026-09-11** `503cd0546309`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/Estimates/line-item-notes/suggestions/get.md)

---

[API](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1.md) - [All operations](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/revisions/099cf36186e0?raw)
