Upload document
Uploads a document (PDF, JPG or PNG, max. 10 MB) and returns a document ID. The file is deduplicated via SHA256 hash. The document ID can then be referenced when creating a booking via POST /v1/bookings.
POST
/v1/documents Authorization
Authorization string header required API key in the format
ll_.... Pass as a Bearer token. Request Body multipart/form-data
file file required Document file (PDF/JPG/PNG, max. 10 MB). MIME type is additionally validated via magic bytes.
Responses
200
Success
400
INVALID_FILE_TYPE
400
EMPTY_FILE
400
FILE_TOO_LARGE
400
MIME_MISMATCH
POST
cURL /v1/documents -cmd">curl --request -method">POST -punct">\
--url 'https://api.ledgerlou.de/v1/documents' -punct">\
--header 'Authorization: Bearer ll_your_key' 200 Response
JSON {
"id": "<string>",
"mime_type": "<string>",
"original_name": "<string>"
}