Queued multipart upload for a farming model: the ATM photo (SYNC_POST_IMAGE -> ATMPicRH, ids as query params) or the ATM geofence KML (SYNC_POST_GEOFENCING -> FarmingModelGeofencingPostRH, ids and saveFileContent=true as form fields). On success the attachment id is saved as imageAttachmentId or geoFencingFileId (with attachmentDateTime). Photo failures rewrite the params with the latest ids and retry.
Headers
Header
Value
Notes
X-SESSIONID
<session token>
Stamped when queued (dooWithRetry); refreshed on 401.
X-ACK-REQUESTID
<X-REQUESTID of an earlier completed op>
Added by SyncQueueProcessor for POST/PUT. X-REQUESTID is removed for multipart requests by CoreAPIDefaultImpl.processOperation.
Content-Type
multipart/form-data; boundary=<generated>
Multipart because the op has a File param.
Parameters
Param
In
Required
Example
Notes
farmingModelId
query
Yes
5501
Query param for photos; multipart form field for geofence.
Attachment id; highest id per type wins. Stored as imageAttachmentId / geoFenceAttachments / geoFencingFileId.
attachmentDateTime
string
Saved as geoFencingCreatedOn.
Errors
Status
When
What the app does
401
Session token expired or invalid
CoreAPI invalidates the session id and retries once immediately; if still failing the op stays in the queue (TryAgain.LATER).
500
Server error on a /gateway URL
BaseResponseHandler fetches a new session id (first 5 attempts) and returns TryAgain.LATER; retried per RetryScheduler policy (retry threshold/delay come from app config).
503
Service unavailable
CoreAPI retries once immediately, then the op is retried later by the sync queue.
any non-2xx
Any other failure
Handler onError -> TryAgain.LATER (op stays queued and is visible in Pending Sync); a row is written to the local error_log table (Sync Error Log screen) with URL, body, headers and raw response; every 10th attempt the op is mirrored to Firestore for support.