Documents

Upload/create a document

post/companies/{companyId}/documents

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    HTTP bearer

Path parameters

companyId, string uuid required

Request body

CreateDocumentInput required
entityId, string uuid

Concrete legal entity selected from the authenticated actor's authorized entity scope. Omit only for restricted, non-financial intake that must be assigned by an administrator.

type, 'invoice' | 'bill' | 'receipt' | 'contract' | 'statement' required
name, string required
vendorName, string
customerName, string
invoiceNumber, string
amountCents, integer
currency, string

Required with amountCents; accepted case-insensitively, normalized to uppercase, and restricted to registered scale-two ISO 4217 currencies.

categoryGlAccountId, string uuid
dueDate, string date
fileKey, string

Optional. Must reference an accepted stored file of the same company (a clean file, or the file the upload flow stored for it); any other key, including a quarantine key, is rejected with 422.

fileUrl, string
sizeBytes, integer
fileName, string
mimeType, string
transactionId, string uuid
category, string
docDate, string date
notes, string
metadata, object

Response

Document created

DocumentResponse required
success, boolean required
data, Document required

Changes

No recorded changes to this operation across all 110 revisions of this API.