Skip to main content
Version: v1.0.0(int)

W166: List documents for an entity

Returns one parent's attachments, newest first. Triggered when an order detail page opens its documents section.

Steps

  1. List by entity. Call Documents.listByEntity(entityType, entityId).

Returns

The Document rows, ordered by createdAt descending.

Business rules

  • The org-scoped query returns only the caller's rows; an unknown parent yields an empty list rather than a 404 (same behavior the old nested lists had).

Errors

None.