---
title: "Create a template. Duplicate rule: same trimmed case-folded text + same scope (and same owner, for Personal) UNIONS the incoming attachments into the existing row and returns it with 200 instead of minting a second one — so \"Save note\" of the same wording on a second med naturally accretes attachments. Any-item absorbs: if either side applies to any item, the merged result does."
method: POST
path: "/line-item-notes"
tags: ["LineItemNotes"]
---

# Create a template. Duplicate rule: same trimmed case-folded text + same scope (and same owner, for Personal) UNIONS the incoming attachments into the existing row and returns it with 200 instead of minting a second one — so "Save note" of the same wording on a second med naturally accretes attachments. Any-item absorbs: if either side applies to any item, the merged result does.

`POST /line-item-notes`

## Request

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

## Request body

- SaveLineItemNoteTemplateRequest: Body for both POST /line-item-notes and PUT /line-item-notes/{id}. Text is trimmed on write and capped at 2000 chars. bool SaveLineItemNoteTemplateRequest.AppliesToAnyItem true requires an empty List&lt;LineItemNoteAttachmentDto&gt; SaveLineItemNoteTemplateRequest.Attachments list; false requires at least one attachment. The list is capped at 50 and de-duped server-side.
  - `text` string
  - `title` string, nullable
  - `appliesToAnyItem` boolean
  - `attachments` LineItemNoteAttachmentDto[]
    - `itemType` integer
    - `itemId` string
  - `scope` integer

## Response `200`

OK

- LineItemNoteTemplateDto
  - `id` string
  - `text` string: The note body stamped into the line (client-facing copy).
  - `title` string, nullable: Optional short label for the picker.
  - `appliesToAnyItem` boolean: True = offered on every keyed line (and List&lt;LineItemNoteAttachmentDto&gt; LineItemNoteTemplateDto.Attachments is empty). False with a non-empty list = offered only on those items' lines. False with an EMPTY list = orphaned (its items were deleted): offered nowhere, shown as unattached in settings.
  - `attachments` LineItemNoteAttachmentDto[]
    - `itemType` integer
    - `itemId` string
  - `scope` integer
  - `createdByUserId` string, nullable
  - `usageCount` union
    - integer
    - string, int32
  - `lastUsedAt` string, date-time, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `201`: Created
- `400`: Bad Request

## Changes

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

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/line-item-notes/post.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)
