Request a scoped, size-capped upload slot. Returns a file id and a single-use, short-lived presigned S3 PUT URL the partner uploads the bytes to directly. No document bytes ever cross the API.
MIME content type the file is stored as (PDF only), compared without case or parameters. The upload PUT carries the type uploadHeaders gives.
Original file name; its extension decides the type the file is stored as
What a partner-uploaded document is, which fixes its content-type allowlist, size cap, and retention policy. LAB_REQUISITION_PDF: the requisition the partner attaches when it accepts an order. LAB_REPORT_PDF: a result report the partner attaches when it delivers results.
- Mock serverhttps://api-docs.lobbie.com/_mock/openapi/partner/v2/account/{accountId}/file
- Productionhttps://api-prod.lobbie.com/lobbie/api/partner/v2/account/{accountId}/file
curl -i -X POST \
'https://api-docs.lobbie.com/_mock/openapi/partner/v2/account/{accountId}/file' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"contentType": "application/pdf",
"fileName": "requisition-9001.pdf",
"kind": "LAB_REQUISITION_PDF",
"sizeBytes": 482113
}'Upload slot created
Lifecycle status of an uploaded file. PENDING: the upload slot exists and the presigned URL was issued, but the bytes have not been finalized yet, so the file cannot be referenced. CLEAN: the finalized bytes passed validation (content-type allowlist, size, and magic-byte format) and the file may be referenced by an order. The name follows the file-upload framework's terminology and is forward-compatible with the malware scan that framework adds in a later phase; today it means "passed validation, safe to reference". A CLEAN file that is not referenced within 24 hours of finalizing is discarded and reads as not found. REJECTED: the finalized bytes failed validation; the file is not referenceable and its bytes are removed.
Headers that must accompany the upload PUT — the signature covers all of them, so a PUT missing any one is refused by S3
{ "Content-Length": "482113", "Content-Type": "application/pdf", "If-None-Match": "*" }
{ "expiresAt": "2025-01-15T14:00:00Z", "id": 5501, "status": "PENDING", "uploadHeaders": { "Content-Length": "482113", "Content-Type": "application/pdf", "If-None-Match": "*" }, "uploadMethod": "PUT", "uploadUrl": "https://s3.amazonaws.com/lobbie-partner-uploads/abc123?X-Amz-Signature=..." }