Company Documents

Create company documents from uploaded files

Turns files the caller has uploaded into company documents, filed on companyId (default: the caller's own company), which must be in the caller's network — else 404. shareWithCompanyId, also in the network, auto-approves a share of every new document with that company. The caller becomes the owner. Files the caller did not upload are skipped rather than failing the batch, so the response can hold fewer documents than were sent, or none. isPublic is honoured as sent. Responds 201 with the stored documents as a bare array, not wrapped in { data, metadata }: both frontends read it that way. fileUrl is a read-only signed link valid for an hour and originalFileUrl is the storage key. Publishes a created event per document, and a cascade-tracing event when any is of a node-mapping type.

post/api/company-documents/bulk-create

Request body

companyIdstring nullable
shareWithCompanyIdstring

Response

Default Response

idstring required
companyIdstring nullable required
ownerCompanyIdstring nullable required
namestring required
documentTypeIdstring nullable required
fileIdstring nullable required
fileUrlstring nullable required
originalFileUrlstring nullable required
fileTypestring nullable required
fileContentTypestring nullable required
typestring nullable required
createdAtstring date-time nullable required
updatedAtstring date-time nullable required

Changes

Changed in 1 of the 56 revisions of this API.1

Of the 56 revisions, 1 has no diff computed.