Files

File a new document

Files the document’s record, linked to the lease, unit, building or contact it is about. Its bytes follow in two calls: POST /documents/{id}/content with the size and SHA-256, then PUT the file to the same address. The links decide which region the bytes are stored in, so they are set here, before any bytes exist.

post/api/v1/documents

Request

  • Base URL: http://localhost:5180
  • URL: http://localhost:5180/api/v1/documents
  • Auth: API key in cookie better-auth.session_token

Request body

namestring required
kind'lease' | 'lease_annex' | 'inspection_report' | 'invoice' | 'receipt' | 'quote' | 'supplier_invoice' | 'certificate' | 'id_document' | 'proof_of_income' | 'insurance_policy' | 'deed' | 'floor_plan' | 'photo' | 'correspondence' | 'formal_notice' | 'statement' | 'tax_document' | 'lease_termination' | 'lease_amendment' | 'other'
contentTypestring required
sizeinteger required
leaseIdstring

Stable record id, e.g. lse_012.

unitIdstring

Stable record id, e.g. lse_012.

buildingIdstring

Stable record id, e.g. lse_012.

contactIdstring

Stable record id, e.g. lse_012.

Response

Filed, waiting for its bytes.

okunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.