Endpointtoday's app
Call POST /gateway/asset-service/api/v1/annual-action-plan-extendedService asset-service Features KAP / Annual Action Plan 2025-26 When User saves AAP (queued directly, no ledger) Auth X-SESSIONID stamped when queued (CoreAPI dooWithRetry); X-REQUESTID idempotency key In the App Service Use case Creates the farmer's 2025-26 annual action plan when a cadre (not a unit in-charge) saves the KAP 25-26 form (ActionPlanFragment2025To2026 -> AnnualActionPlan2025To2026ViewModel -> IeRepositoryImpl.updateAnnualActionPlan2526Data(isUIC=false) -> IEFlatEntity.postAnnualActionPlan2526). The operation goes straight into the CoreAPI offline queue (dooWithRetry) with no sync ledger, so it does not appear in ledger-based pending counts. On 2xx, AnnualActionPlan2526PostRH only updates the last-sync time. On error it retries later and nothing is shown to the user.
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<uuid v4> Idempotency key added by the offline queue (OperationManagerImpl). A 409 replaces it with a new UUID. It is removed for multipart requests. Content-Typeapplication/json Set by the HTTP client for JSON bodies.
Request Example request body (synthetic data) {
"id": 0,
"ownerEntityId": "880001",
"ownerEntityType": "ENTITY_TYPE.IE",
"category": "C3",
"designation": "Farmer",
"totalLandExtent": "2.5",
"agrade202425PrePopulatedData": "1",
"agrade202425UpdatedData": "1",
"agrade202526": "2",
"atm202425PrePopulated": "0",
"atm202425": "0",
"atm202526": "1",
"c1Extent202425PrePopulatedData": "0.5",
"c1Extent202425UpdatedData": "0.5",
"c1Extent202526": "1.0",
"desiCows202425PrePopulatedData": "1",
"desiCows202425UpdatedData": "1",
"desiCows202526": "2",
"dkg202425PrePopulatedSeasonal": true,
"dkg202425UpdatedSeasonal": true,
"dkg202526Seasonal": false,
"dkg202425PrePopulated365": false,
"dkg202425Updated365": false,
"dkg202526365": true,
"dkg202425PrePopulatedNo": false,
"dkg202425UpdatedNo": false,
"dkg202526No": false,
"nfExtentInCB202425PrePopulatedData": "1.0",
"nfExtentInCB202425UpdatedData": "1.0",
"nfExtentInCB202526": "1.5",
"pmdsExtent202425PrePopulatedData": "0.5",
"pmdsExtent202425UpdatedData": "0.5",
"pmdsExtent202526": "1.0",
"s2sExtent202425PrePopulatedData": "0",
"s2sExtent202425UpdatedData": "0",
"s2sExtent202526": "0.5",
"appCreatedAt": "1748772000000",
"participatingInApp202526": true,
"participationRemarksApp202526": null,
"pmds201920": false,
"pmds202021": false,
"pmds202122": true,
"pmds202223": true,
"pmds202324": true,
"pmds202425": true,
"isPMDS_24_25": true,
"category_24_25": "C3",
"total_land_extent_24_25": "2.5",
"dgcPmds": true,
"dgcKharif": true,
"dgcRabi": false,
"dgcRdss1": false,
"dgcRdss2": false,
"dgcNotParticipating": false
}Field Type Required Notes idint No Server id. 0 on POST. On GET the app keeps the row with the highest id. ownerEntityIdstring Yes Farmer IE id. ownerEntityTypestring Yes Always ENTITY_TYPE.IE. category, designation, totalLandExtentstring No Farmer category (C1 to C5), role and total land, from the KAP 25-26 header. *202425PrePopulated*string|boolean No Last season values pre-filled from the AAP2025_26 dataset, shown read-only. *202425Updated*string|boolean No Cadre-corrected last-season values. *202526*string|boolean No Planned 2025-26 values: A-grade crops, ATM, C1 extent, desi cows, DKG (seasonal / 365 / no), NF extent in compact block, PMDS extent, S2S extent. Numeric values are sent as strings. participatingInApp202526, participationRemarksApp202526boolean/string No Participation toggle and remarks. pmds201920..pmds202425, isPMDS_24_25, category_24_25, total_land_extent_24_25boolean/string No PMDS history and 24-25 snapshot. dgcPmds, dgcKharif, dgcRabi, dgcRdss1, dgcRdss2, dgcNotParticipatingboolean No DGC season participation checkboxes. appCreatedAtstring (epoch ms) No Set to System.currentTimeMillis() when saving.
Response Example response body (synthetic data) {
"id": 7001,
"ownerEntityId": "880001",
"ownerEntityType": "ENTITY_TYPE.IE",
"category": "C3",
"designation": "Farmer",
"totalLandExtent": "2.5",
"agrade202425PrePopulatedData": "1",
"agrade202425UpdatedData": "1",
"agrade202526": "2",
"atm202425PrePopulated": "0",
"atm202425": "0",
"atm202526": "1",
"c1Extent202425PrePopulatedData": "0.5",
"c1Extent202425UpdatedData": "0.5",
"c1Extent202526": "1.0",
"desiCows202425PrePopulatedData": "1",
"desiCows202425UpdatedData": "1",
"desiCows202526": "2",
"dkg202425PrePopulatedSeasonal": true,
"dkg202425UpdatedSeasonal": true,
"dkg202526Seasonal": false,
"dkg202425PrePopulated365": false,
"dkg202425Updated365": false,
"dkg202526365": true,
"dkg202425PrePopulatedNo": false,
"dkg202425UpdatedNo": false,
"dkg202526No": false,
"nfExtentInCB202425PrePopulatedData": "1.0",
"nfExtentInCB202425UpdatedData": "1.0",
"nfExtentInCB202526": "1.5",
"pmdsExtent202425PrePopulatedData": "0.5",
"pmdsExtent202425UpdatedData": "0.5",
"pmdsExtent202526": "1.0",
"s2sExtent202425PrePopulatedData": "0",
"s2sExtent202425UpdatedData": "0",
"s2sExtent202526": "0.5",
"appCreatedAt": "1748772000000",
"participatingInApp202526": true,
"participationRemarksApp202526": null,
"pmds201920": false,
"pmds202021": false,
"pmds202122": true,
"pmds202223": true,
"pmds202324": true,
"pmds202425": true,
"isPMDS_24_25": true,
"category_24_25": "C3",
"total_land_extent_24_25": "2.5",
"dgcPmds": true,
"dgcKharif": true,
"dgcRabi": false,
"dgcRdss1": false,
"dgcRdss2": false,
"dgcNotParticipating": false
}Field Type Required Notes (body)AnnualActionPlan2526 Not read. Only a non-null rawResponse is checked.
Errors Status When What the app does 401Session expired 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. 409Duplicate 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 (AnnualActionPlan2526PostRH). 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.
Source data/src/main/java/org/mindtree/app/agricultor/data/entity/IEFlatEntity.kt data/src/main/java/org/mindtree/app/agricultor/data/entity/AnnualActionPlan2526.kt app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/IeRepositoryImpl.kt app/src/main/java/org/platformcommons/urvi/view/aap_25_26/AnnualActionPlan2025To2026ViewModel.kt app/src/main/java/org/platformcommons/urvi/view/aap_25_26/ActionPlanFragment2025To2026.kt data/src/main/java/org/mindtree/app/agricultor/data/sync/rh/AnnualActionPlan2526PostRH.kt