Queued directly from AtmHarvestViewModel.postFarmingModelHarvest when the user saves an ATM harvest (no sync ledger entry). Harvest rows are first stored in farming_model_harvest and the farming model line items are marked PENDING (continuous) or COMPLETED (whole crop). FarmingModelHarvestPostRH does nothing on success; failures retry from the queue (and appear in Pending Sync as 'Add ATM harvest log').
Headers
Header
Value
Notes
X-SESSIONID
<session token>
Stamped when the operation is queued (dooWithRetry) and re-set by CoreAPI at send time; refreshed on 401.
X-REQUESTID
<uuid v4>
Idempotency key generated by OperationManagerImpl.createOperation for POST/PUT/PATCH when the op enters the offline queue.
X-ACK-REQUESTID
<X-REQUESTID of an earlier completed op>
Added by SyncQueueProcessor for POST/PUT/PATCH: acknowledges a request id the device already saw succeed.
Local autoincrement id (sent but meaningless to server).
Response
Field
Type
Required
Notes
(body)
unknown
Not read by the app.
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.