> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cedarai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch get note summaries

> Returns note summaries for many entities in one round trip. Designed for list/grid pages that show a notes-count column. Entities with zero notes are omitted from the response.



## OpenAPI

````yaml /user-docs/api-reference/service.swagger.json post /v1/notes/batch-get-summaries
openapi: 3.0.1
info:
  title: protobuf/linda/service.proto
  version: version not set
servers:
  - description: Production (US)
    url: https://api.linda.cedarai.com
  - description: Production (EU)
    url: https://api.linda.cedarai.se
security: []
tags:
  - name: LindaService
paths:
  /v1/notes/batch-get-summaries:
    post:
      tags:
        - LindaService
      summary: Batch get note summaries
      description: >-
        Returns note summaries for many entities in one round trip. Designed for
        list/grid pages that show a notes-count column. Entities with zero notes
        are omitted from the response.
      operationId: BatchGetNoteSummaries
      parameters:
        - description: Carrier ID the request is scoped to.
          in: header
          name: Carrier
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lindaBatchGetNoteSummariesReq'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lindaBatchGetNoteSummariesResp'
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
          description: An unexpected error response.
      security:
        - ApiKeyAuth: []
          AssumeUserAuth: []
components:
  schemas:
    lindaBatchGetNoteSummariesReq:
      properties:
        entities:
          description: |-
            Entities to fetch summaries for. The server groups by entity type
            internally and runs one SQL query per type. No hard cap on the
            number of entries, but practical limits apply (page sizes of a few
            hundred entities per request are typical).
          items:
            $ref: '#/components/schemas/lindaEntityRef'
          type: array
      type: object
    lindaBatchGetNoteSummariesResp:
      properties:
        summaries:
          description: |-
            One summary per entity that has at least one note. **Entities with
            zero notes are omitted from the response** — clients should default
            missing entries to "0 notes" rather than expecting one row per
            requested entity.
          items:
            $ref: '#/components/schemas/lindaNoteSummaryEntry'
          type: array
      type: object
    googleRpcStatus:
      properties:
        code:
          format: int32
          type: integer
        details:
          items:
            $ref: '#/components/schemas/protobufAny'
          type: array
        message:
          type: string
      type: object
    lindaEntityRef:
      description: |-
        A lightweight `(entity_type, entity_id)` pair used by
        `BatchGetNoteSummaries` to fetch summaries for many entities at once.

        Example:

            { "entity_type": "shipment", "entity_id": "5f3c..." }
      properties:
        entity_id:
          description: |-
            Entity ID as a string. Format depends on entity type — see
            `NoteReference.entity_id` for the per-type breakdown.
          type: string
        entity_type:
          description: Entity type (e.g. `shipment`, `equipment`, `waybill`).
          type: string
      type: object
    lindaNoteSummaryEntry:
      description: |-
        One row of summary data for a single entity, returned by
        `GetNoteSummary` and `BatchGetNoteSummaries`. Designed for list-page
        badges and counters.
      properties:
        entity_id:
          description: The entity ID these summary numbers describe.
          type: string
        entity_type:
          description: The entity these summary numbers describe.
          type: string
        latest_note:
          $ref: '#/components/schemas/lindaNoteEntry'
        total_count:
          description: Total non-deleted notes on this entity.
          format: int32
          type: integer
      type: object
    protobufAny:
      additionalProperties:
        type: object
      description: >-
        `Any` contains an arbitrary serialized protocol buffer message along
        with a

        URL that describes the type of the serialized message.


        In its binary encoding, an `Any` is an ordinary message; but in other
        wire

        forms like JSON, it has a special encoding. The format of the type URL
        is

        described on the `type_url` field.


        Protobuf APIs provide utilities to interact with `Any` values:


        - A 'pack' operation accepts a message and constructs a generic `Any`
        wrapper
          around it.
        - An 'unpack' operation reads the content of an `Any` message, either
        into an
          existing message or a new one. Unpack operations must check the type of the
          value they unpack against the declared `type_url`.
        - An 'is' operation decides whether an `Any` contains a message of the
        given
          type, i.e. whether it can 'unpack' that type.

        The JSON format representation of an `Any` follows one of these cases:


        - For types without special-cased JSON encodings, the JSON format
          representation of the `Any` is the same as that of the message, with an
          additional `@type` field which contains the type URL.
        - For types with special-cased JSON encodings (typically called
        'well-known'
          types, listed in https://protobuf.dev/programming-guides/json/#any), the
          JSON format representation has a key `@type` which contains the type URL
          and a key `value` which contains the JSON-serialized value.

        The text format representation of an `Any` is like a message with one
        field

        whose name is the type URL in brackets. For example, an `Any` containing
        a

        `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2
        }`.
      properties:
        '@type':
          description: >-
            Identifies the type of the serialized Protobuf message with a URI
            reference

            consisting of a prefix ending in a slash and the fully-qualified
            type name.


            Example: type.googleapis.com/google.protobuf.StringValue


            This string must contain at least one `/` character, and the content
            after

            the last `/` must be the fully-qualified name of the type in
            canonical

            form, without a leading dot. Do not write a scheme on these URI
            references

            so that clients do not attempt to contact them.


            The prefix is arbitrary and Protobuf implementations are expected to

            simply strip off everything up to and including the last `/` to
            identify

            the type. `type.googleapis.com/` is a common default prefix that
            some

            legacy implementations require. This prefix does not indicate the
            origin of

            the type, and URIs containing it are not expected to respond to any

            requests.


            All type URL strings must be legal URI references with the
            additional

            restriction (for the text format) that the content of the reference

            must consist only of alphanumeric characters, percent-encoded
            escapes, and

            characters in the following set (not including the outer backticks):

            `/-.~_!$&()*+,;=`. Despite our allowing percent encodings,
            implementations

            should not unescape them to prevent confusion with existing parsers.
            For

            example, `type.googleapis.com%2FFoo` should be rejected.


            In the original design of `Any`, the possibility of launching a type

            resolution service at these type URLs was considered but Protobuf
            never

            implemented one and considers contacting these URLs to be
            problematic and

            a potential security issue. Do not attempt to contact type URLs.
          type: string
      type: object
    lindaNoteEntry:
      description: |-
        A single note in a thread. Threaded notes are anchored to an
        `(entity_type, entity_id)` pair and ordered by `created_at`.
      properties:
        attachments:
          description: >-
            File attachments. Each entry includes a fresh presigned download URL

            (5-minute TTL). Re-fetch the note rather than caching `url` past
            expiry.
          items:
            $ref: '#/components/schemas/lindaNoteAttachment'
          type: array
        content:
          description: |-
            Markdown body. May contain inline reference tokens of the form
            `<<ref:{entity_type}:{entity_id}:{display_text}>>` for `@`-mentions.
            Each inline token must have a matching `NoteReference` entry in
            `references` so reverse-lookup queries work correctly.

            Example:

                "Held at <<ref:equipment:54321:BNSF 54321>> waiting on clearance.
                Spoke to <<ref:customer:1842:Acme Corp>> about ETA."
          type: string
        content_redacted:
          description: >-
            Content contains hidden-reference markers; content edits require
            explicit

            removal acknowledgement. Sharing/attachment-only edits preserve the
            body.
          type: boolean
        created_at:
          format: date-time
          type: string
        created_by_name:
          description: Display name of the author at the time the note was written.
          type: string
        created_by_uuid:
          description: >-
            Operational author email from the JWT or API-key assumed-user
            attribution.

            Assumed attribution does not grant Only me access or sharing-change
            authority.

            Despite the field name, this is an email, not a UUID.
          type: string
        entity_id:
          description: The host entity's ID as a string (UUID or stringified int64).
          type: string
        entity_type:
          description: The host entity this note is attached to (e.g. `shipment`).
          type: string
        note_id:
          description: Server-assigned UUID. Stable across edits.
          type: string
        references:
          description: |-
            Structured references mentioned inside `content`. Used for reverse
            lookups and stale-detection.
          items:
            $ref: '#/components/schemas/lindaNoteReference'
          type: array
        sharing:
          $ref: '#/components/schemas/lindaNoteSharing'
        updated_at:
          description: >-
            Set when the note has been edited at least once. Unset on the first
            read.
          format: date-time
          type: string
      type: object
    lindaNoteAttachment:
      description: |-
        A file attached to a note. Attachments are stored in S3 and surfaced
        to clients via short-lived presigned download URLs.
      properties:
        attachment_id:
          description: Server-assigned UUID for this attachment.
          type: string
        created_at:
          format: date-time
          type: string
        file_name:
          description: |-
            Original filename as supplied at upload time. Path components are
            stripped server-side; only the base name is kept.
          type: string
        media_type:
          description: |-
            MIME type. Defaults to `application/octet-stream` if the upload did
            not specify one.
          type: string
        note_id:
          description: ID of the parent note this file is attached to.
          type: string
        size_bytes:
          description: Size of the file in bytes.
          format: int64
          type: string
        url:
          description: >-
            Presigned GET URL for downloading the file. **Expires after 5
            minutes.**

            Re-fetch the parent note to get a fresh URL — never persist this

            value past its TTL.
          type: string
      type: object
    lindaNoteReference:
      description: >-
        A structured reference to another Cedar entity from inside a note.
        References

        are how `@`-mentions persist: each chip in the editor becomes both an
        inline

        token in `NoteEntry.content` (e.g. `<<ref:equipment:54321:BNSF 54321>>`)
        and

        a sidecar `NoteReference` row that powers reverse-lookup queries via

        `ListNotes.referenced_entity_type`/`referenced_entity_id`.


        Example:

            {
              "entity_type":  "equipment",
              "entity_id":    "54321",
              "display_text": "BNSF 54321"
            }
      properties:
        display_text:
          description: |-
            Human-readable label for the chip at the time the note was authored
            (e.g. `BNSF 54321`). Stored as-is so old notes keep their original
            wording even if the entity is later renamed.
          type: string
        entity_id:
          description: >-
            The referenced entity's ID, encoded as a string. Format depends on

            entity type: int64 for
            equipment/waybill/customer/invoice/charge/grouping,

            UUID for shipment/work_order/trip_plan/booking/commodity_unit, or a

            composite string for `interchange` (`direction:trainId:timestamp`).
          type: string
        entity_type:
          description: >-
            The entity type being referenced. Must be one of the registered
            types

            (e.g. `equipment`, `shipment`, `waybill`, `work_order`, `customer`,

            `invoice`, `charge`, `trip_plan`, `booking`). See `SearchReferences`
            for

            the full list of searchable types.
          type: string
        is_stale:
          description: >-
            Server-set on read responses: true if the referenced entity has been

            deleted. Frontends render stale chips as dimmed strikethrough so
            users

            can tell the link is broken without losing the note's history.
          type: boolean
        url:
          description: >-
            Optional pre-resolved URL hint. Frontends usually ignore this and

            resolve the URL from the entity type + ID via their own route
            registry.
          type: string
      type: object
    lindaNoteSharing:
      properties:
        mode:
          $ref: '#/components/schemas/NoteSharingMode'
        parties:
          description: >-
            Fixed recipients, not the author's current bindings. My people is a
            preset

            selecting one named customer/railroad. All modes also require record
            access.
          items:
            $ref: '#/components/schemas/lindaNoteSharingParty'
          type: array
      type: object
    NoteSharingMode:
      description: |2-
         - ONLY_ME: Requires a personally authenticated user (currently a verified JWT).
        An API key's assumed-user attribution does not establish that identity.
      enum:
        - ALL_PARTIES
        - ONLY_ME
        - SELECTED_PARTIES
      type: string
    lindaNoteSharingParty:
      description: A named party eligible to receive a note.
      properties:
        display_name:
          title: resolved by the server, never trusted from a write
          type: string
        party_id:
          type: string
        party_type:
          title: carrier, customer, or customer_location
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-arms-api-key
      type: apiKey
    AssumeUserAuth:
      in: header
      name: x-arms-assume-user
      type: apiKey

````

## Related topics

- [Get note summary for one entity](https://docs.cedarai.com/api-reference/lindaservice/get-note-summary-for-one-entity.md)
- [API Introduction](https://docs.cedarai.com/user-docs/api-reference/introduction.md)
- [Notes](https://docs.cedarai.com/user-docs/arms/ops/notes.md)
- [Get Charges Table Summary](https://docs.cedarai.com/api-reference/chargeservice/get-charges-table-summary.md)
- [AI summary of a note thread](https://docs.cedarai.com/api-reference/lindaservice/ai-summary-of-a-note-thread.md)
