Documents

Update a document

patch/companies/{companyId}/documents/{id}

Request

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

Path parameters

companyId, string uuid required
id, string uuid required

Request body

UpdateDocumentInput required
type, 'invoice' | 'bill' | 'receipt' | 'contract' | 'statement'
status, 'needs_review' | 'reviewed' | 'processed' | 'archived'
name, string
vendorName, string nullable
customerName, string nullable
invoiceNumber, string nullable
amountCents, integer nullable
currency, string nullable

Must be supplied atomically with amountCents; non-null values are normalized to uppercase and restricted to registered scale-two ISO 4217 currencies.

categoryGlAccountId, string nullable
dueDate, string nullable
fileKey, string nullable

null detaches the file. A string 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 nullable
sizeBytes, integer nullable
fileName, string nullable
mimeType, string nullable
transactionId, string nullable
category, string nullable
docDate, string nullable
notes, string nullable
metadata, object

Response

Document updated

DocumentResponse required
success, boolean required
data, Document required

Changes

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