Uploads the abstract file a cadre attaches to an endorsement on the endorsement screen (EndorsementRepositoryImpl.uploadEndorsementAbstract -> DataRepository.uploadEndorsementAbstract). The repository saves the file path on the row and adds an ENDORSEMENT_ATTACHMENT POST ledger entry that depends on the endorsement POST. EndorsementWorker.postAttachment queues EndorsementEntity.postAttachment(): multipart "file" plus URI params for the endorsement id and uuid. On 2xx, EndorsementAttachmentRH only closes the ledger; the body is not read. On error it retries later.
Headers
Header
Value
Notes
X-SESSIONID
<session id>
Stamped by CoreAPI when the queued operation runs (CoreAPIDefaultImpl.doOperation). On a 401 the token is invalidated and the call retried. BaseResponseHandler also refreshes the session after a 500 on a gateway URL (first 5 attempts).
X-REQUESTID
(removed)
CoreAPIDefaultImpl.processOperation removes X-REQUESTID for multipart requests, so file uploads have no idempotency key.
Content-Type
multipart/form-data; boundary=<generated>
Built by CoreAPI makeMultiPartHttpRequest because the operation has a File param.
Parameters
Param
In
Required
Example
Notes
endorsementID
query
Yes
3101
EndorsementEntity.id. If the parent POST has not finished, this may be 0 because the value is captured when the operation is built.
endorsementUUID
query
Yes
e0000000-0000-4000-8000-000000003101
EndorsementEntity.uuid.
file
form
Yes
SHG_A_abstract.xlsx
File at EndorsementEntity.abstractFile. PII: abstract report contents.
CoreAPI invalidates the session id and retries once. If it still fails, the response handler returns TryAgain.LATER and the operation stays in the queue.
409
Duplicate X-REQUESTID
SyncQueueProcessor records the request id and swaps in a fresh X-REQUESTID for the next attempt.
4xx/5xx (other)
Server rejects or fails
onError returns TryAgain.LATER (EndorsementAttachmentRH). Each failure is logged in the local error_log table (URL, body, headers). Every 10th attempt (up to attempt 5000) the whole operation is copied to Firestore urvi_sync_log. A 500 on a gateway URL in the first 5 attempts forces a session refresh.