when available use id to get document,
fixed optional schema argument cardinality