Upload a support document for a pre-appointment
POST/v1/checkin/appointments/:id/documents
Uploads a support document as multipart/form-data with two parts: a binary file part and a request_data part (Content-Type application/json) carrying the metadata. provider_product_codes selects the target charges: empty/absent completes the PENDING placeholders of all charges of the pre-appointment for the given support_file_code (case-insensitive); a non-empty list restricts completion to the matching charges (codes without a corresponding charge are silently ignored). To replace a document that is already received, send explicit provider_product_codes: without them there is nothing pending to complete and the request fails with 422. The replacement is resolved per charge: PENDING placeholders are completed first; otherwise the most recently received document of the charge is replaced. If the support document's keep_support_file_history setting is false (default), the file is overwritten on the same record (same id); if true, the previous document stays active and a new record (new id) is added. The setting is copied to each document when its placeholder is created, so a change applies only to documents created afterwards. The response contains only the resulting document and the AI validation restarts. The previous file is not removed from storage. A channel can only replace documents it uploaded itself (403 otherwise). The file is uploaded to storage only once and shared across every completed placeholder. Returns 201 with one array element per completed document. Supported file types: PDF, JPEG, and PNG. Maximum file size: 45MB.
Request
Responses
- 201
- 401
- 403
- 404
- 413
- 422
- 502
Document(s) uploaded successfully: one array element per completed placeholder
Unauthorized: missing or invalid Bearer token
Forbidden - your credentials are not authorised for this operation, or the document to replace was uploaded through the other channel
Pre-appointment not found or does not belong to the authenticated provider
Uploaded file exceeds the maximum allowed size (45MB). Depending on the environment, the platform gateway may answer 500 without a message instead of 413
Request validation failed, unsupported file type (MIME type not in whitelist, missing support_file_code, invalid pattern, or missing file), or there is nothing to complete or replace for the given support_file_code and provider_product_codes (no PENDING placeholder and, with explicit provider_product_codes, no received document)
Bad Gateway: document storage service is unavailable