1 Endpoint
POST /api/v1/uploads/receiptRequires scope expenses:write. Accepts multipart form-data (recommended) or raw binary with Content-Type application/pdf or image/*.
2 Multipart fields
| Field | Required | Notes |
|---|---|---|
| file / files / data | Yes | PDF or image |
| note / reason / description | No | Free-text note |
| owner_email / owner_id | No | Attribute to a member |
| category_code | No | Hint |
| external_id | No | Idempotency / correlation |
3 Example
curl -X POST "https://book-keeping.codefusion.com.lk/api/v1/uploads/receipt" \
-H "Authorization: Bearer bk_live_YOUR_KEY" \
-F "file=@./receipt.pdf;type=application/pdf" \
-F "owner_email=user@example.com" \
-F "note=From n8n"4 Status codes
| Code | Meaning |
|---|---|
| 201 | All files OK |
| 207 | Partial success |
| 401 | Missing / invalid API key |
| 403 | Missing expenses:write |
| 409 | All duplicates |
| 422 | Validation / OCR failures |