Skip to main content

Documents API

All document endpoints are nested under entries: /entries/{entryId}/documents

List Documents

GET /entries/{entryId}/documents

Response:

[
{
"id": "uuid",
"entryId": 21,
"documentName": "invoice-june.pdf",
"documentType": "BASIS",
"status": "APPROVED",
"mimeType": "application/pdf",
"fileSize": 245000,
"uploadedBy": "uuid",
"approvedBy": "uuid",
"comment": null,
"createdAt": "2025-06-15T10:30:00Z",
"updatedAt": "2025-06-16T09:00:00Z"
}
]

Get Document

GET /entries/{entryId}/documents/{documentId}

Returns a single document object with the same shape as the list response.

Upload Document

POST /entries/{entryId}/documents/upload?workspaceId={id}
Content-Type: multipart/form-data
FieldDescription
fileThe document file
documentTypeBASIS, PAYMENT_PROOF, SUPPORTING, or CREDIT_NOTE

Permission required: entry.create

Request Document

POST /entries/{entryId}/documents/request
{
"documentName": "Bank statement",
"documentType": "PAYMENT_PROOF",
"comment": "Please provide bank statement for verification"
}

Creates a document placeholder with REQUESTED status. Permission required: entry.review

Fulfill Document Request

POST /entries/{entryId}/documents/{documentId}/fulfill?workspaceId={id}
Content-Type: multipart/form-data
FieldDescription
fileThe document file

Uploads a file for a previously requested document. Permission required: entry.create

Approve Document

PATCH /entries/{entryId}/documents/{documentId}/approve

Approves the document and triggers completeness recalculation. Permission required: entry.review

Reject Document

PATCH /entries/{entryId}/documents/{documentId}/reject
{
"reason": "Document is illegible"
}

Rejects the document with a reason. Permission required: entry.review