Skip to content

loadDocument

Jason Godesky edited this page Aug 9, 2026 · 1 revision

loadDocument is a method that will take a UUID and return the full document.

Parameters

uuid: string

The UUID of the document that you would like to load.

type?: string

A filter that requires that the document match the given type (e.g., 'Actor', 'Item', 'JournalEntry', etc.).

subtype?: string

A filter that requires that the document match the given subtype (the type property on the document).

Returns

A Promise of the document dropped if it (a) can be found and (b) matches the type and subtype provided, or null otherwise.

Examples

import { loadDocument } from '@revolutionarygamesco/common-foundryvtt'

const actor = await loadDocument<foundry.documents.Actor>('Actor.1111111111111111', 'Actor', 'character')

Clone this wiki locally