Endpointtoday's app
Call POST /ptld/api/customworknode/v1/worknodeietag/urvi/ieService Program TLD (ptld) Features Add/Edit farmer (IE profile) When Queued sync (IE POST) after user adds a farmer Auth X-SESSIONID stamped when queued (CoreAPI dooWithRetry); X-REQUESTID idempotency key In the App Service Use case Queued create of a new farmer added on the Add Farmer screen (IE POST via IEWorker). The worker builds the IE from the local ie tables and the selected work node; on success IEPostRH writes the server person/profile/address/contact/education/family/identifier ids back, sets the IE id on pending role maps and releases dependent ops (portfolio, inventory, role map). On failure it stays queued and retries.
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. Content-Typeapplication/json Added by CoreAPI. X-PASS<redacted: hardcoded value at data/src/main/java/org/mindtree/app/agricultor/data/entity/IE.kt:352> Fixed header added only on this create call; purpose unknown.
Parameters Param In Required Example Notes WorkNodeIdquery Yes 3501Habitation work node id. WorkNodeAliasIdHabitationquery Yes HAB-ALIAS-01Habitation alias. voAliasquery Yes VO-ALIAS-01VO alias of selected work node. voNamequery Yes VO AVO name. shgAliasIdquery No SHG-ALIAS-01From addressLine2 JSON shgId. shgNamequery No SHG AFrom addressLine2 JSON shgName.
Request Example request body (synthetic data) {
"aliasId": "ie-alias-0001",
"iconpic": null,
"id": "40001",
"interestedInTrade": false,
"idString": null,
"iEStatus": {
"dataCode": "IE_STATUS.ACTIVE"
},
"onBoardedTenant": {
"loginName": "tenant_a",
"id": 11
},
"caretakerTenant": {
"loginName": "tenant_a",
"id": 11
},
"person": {
"id": 50001,
"notes": "C4",
"aliasId": "ie-alias-0001",
"personProfile": {
"lastName": "A",
"occupation": "Farming",
"caste": null,
"noOfChildren": 2,
"dateOfBirth": "1985-01-01",
"religion": null,
"firstName": "Farmer",
"middleName": null,
"id": 60001,
"age": 41,
"notes": "Member Category/C4",
"inActiveReason": null,
"gapStartDate": "2026-06-01",
"lifeStatus": {
"dataCode": "LIFE_STATUS.ALIVE"
},
"gender": {
"dataCode": "GENDER.FEMALE"
},
"disabilityStatus": {
"dataCode": "DISABILITY_STATUS.NO"
},
"avgMonthlyIncome": {
"id": 0,
"value": 5000,
"currency": {
"code": "INR"
}
},
"bloodGroup": null,
"salutation": null,
"maritalStatus": {
"dataCode": "MARITAL_STATUS.MARRIED"
},
"category": {
"dataCode": "CATEGORY.SC"
}
},
"personContacts": [
{
"iEId": "ie-alias-0001",
"isPrimary": true,
"id": 0,
"contact": {
"contactValue": "9XXXXXXXX1",
"id": 0,
"contactType": {
"dataCode": "CONTACT_TYPE.MOBILE"
}
}
}
],
"personAddresses": [
{
"iEId": "ie-alias-0001",
"isPrimary": true,
"id": 0,
"address": {
"id": 0,
"pinCode": "5XXXX1",
"addressLine1": "Habitation A",
"addressLine2": "{\"shgId\":\"SHG-ALIAS-01\",\"shgName\":\"SHG A\"}",
"state": {
"dataCode": "STATE.AP"
},
"city": null,
"village": {
"dataCode": "VILLAGE.V001"
},
"panchayat": {
"dataCode": "PANCHAYAT.P001"
},
"district": {
"dataCode": "DISTRICT.D001"
},
"country": {
"dataCode": "COUNTRY.IN"
},
"town": null,
"taluk": {
"dataCode": "MANDAL.M001"
}
}
}
],
"personEducationList": [
{
"iEId": "ie-alias-0001",
"education": "Primary",
"id": 0,
"isActive": true,
"educationCategory": {
"dataCode": "EDUCATION.PRIMARY"
}
}
],
"personFamilyList": [
{
"iEId": "ie-alias-0001",
"age": 45,
"id": 0,
"isActive": true,
"memberName": "Relative A",
"occupation": "Farming",
"notes": null,
"contact": {
"contactValue": "9XXXXXXXX2",
"id": 0,
"isActive": true,
"contactType": {
"dataCode": "CONTACT_TYPE.MOBILE"
}
},
"relationship": {
"dataCode": "RELATIONSHIP.HUSBAND"
}
}
],
"personIdentifierList": [
{
"iEId": "ie-alias-0001",
"id": 0,
"personIdentifierNumber": "XXXX-XXXX-1234",
"identifierType": {
"dataCode": "PERSON_IDENTIFIER.AADHAR_ID"
},
"isActive": true
}
]
},
"iETaggingList": [
{
"iEId": "ie-alias-0001",
"id": 0,
"taggingType": {
"dataCode": "TAGGING_TYPE.WORKNODE"
},
"taggedToTenant": {
"loginName": "tenant_a",
"id": 11
}
}
],
"appId": "ie-alias-0001",
"syncStatus": "SYNC_PENDING"
}Field Type Required Notes aliasIdstring Yes Client farmer id (UUID), unique on ie.aliasId; server echoes it. idstring No Server IE id ('0'/null on create). person.personProfile.firstName / lastName / middleName / dateOfBirth / age / gender / maritalStatus / category / occupation / noOfChildrenmixed Yes Add/Edit farmer form. person.personProfile.notes / person.notes / gapStartDatestring No Member category path (e.g. 'Member Category/C4') and category last-change date; PATCH_CATEGORY sends only id + these. person.personContacts[]array No Mobile number (CONTACT_TYPE.MOBILE). person.personAddresses[].addressobject No Location codes from the selected work node; addressLine2 is a JSON string with shgId/shgName (also lifted into shgAliasId/shgName query params). person.personEducationList[] / personFamilyList[]array No Education and husband/father details. person.personIdentifierList[]array No Aadhaar (PERSON_IDENTIFIER.AADHAR_ID) and ration card numbers; masked here. iETaggingList[]array No Tenant/work node tagging. iEStatus, interestedInTrade, onBoardedTenant, caretakerTenantmixed No Status and tenant references. appId, opId, syncStatusstring No Local columns serialised by Gson; ignored by server.
Response Example response body (synthetic data) {
"aliasId": "ie-alias-0001",
"iconpic": null,
"id": "40001",
"interestedInTrade": false,
"idString": null,
"iEStatus": {
"dataCode": "IE_STATUS.ACTIVE"
},
"onBoardedTenant": {
"loginName": "tenant_a",
"id": 11
},
"caretakerTenant": {
"loginName": "tenant_a",
"id": 11
},
"person": {
"id": 50001,
"notes": "C4",
"aliasId": "ie-alias-0001",
"personProfile": {
"lastName": "A",
"occupation": "Farming",
"caste": null,
"noOfChildren": 2,
"dateOfBirth": "1985-01-01",
"religion": null,
"firstName": "Farmer",
"middleName": null,
"id": 60001,
"age": 41,
"notes": "Member Category/C4",
"inActiveReason": null,
"gapStartDate": "2026-06-01",
"lifeStatus": {
"dataCode": "LIFE_STATUS.ALIVE"
},
"gender": {
"dataCode": "GENDER.FEMALE"
},
"disabilityStatus": {
"dataCode": "DISABILITY_STATUS.NO"
},
"avgMonthlyIncome": {
"id": 0,
"value": 5000,
"currency": {
"code": "INR"
}
},
"bloodGroup": null,
"salutation": null,
"maritalStatus": {
"dataCode": "MARITAL_STATUS.MARRIED"
},
"category": {
"dataCode": "CATEGORY.SC"
}
},
"personContacts": [
{
"iEId": "ie-alias-0001",
"isPrimary": true,
"id": 0,
"contact": {
"contactValue": "9XXXXXXXX1",
"id": 0,
"contactType": {
"dataCode": "CONTACT_TYPE.MOBILE"
}
}
}
],
"personAddresses": [
{
"iEId": "ie-alias-0001",
"isPrimary": true,
"id": 0,
"address": {
"id": 0,
"pinCode": "5XXXX1",
"addressLine1": "Habitation A",
"addressLine2": "{\"shgId\":\"SHG-ALIAS-01\",\"shgName\":\"SHG A\"}",
"state": {
"dataCode": "STATE.AP"
},
"city": null,
"village": {
"dataCode": "VILLAGE.V001"
},
"panchayat": {
"dataCode": "PANCHAYAT.P001"
},
"district": {
"dataCode": "DISTRICT.D001"
},
"country": {
"dataCode": "COUNTRY.IN"
},
"town": null,
"taluk": {
"dataCode": "MANDAL.M001"
}
}
}
],
"personEducationList": [
{
"iEId": "ie-alias-0001",
"education": "Primary",
"id": 0,
"isActive": true,
"educationCategory": {
"dataCode": "EDUCATION.PRIMARY"
}
}
],
"personFamilyList": [
{
"iEId": "ie-alias-0001",
"age": 45,
"id": 0,
"isActive": true,
"memberName": "Relative A",
"occupation": "Farming",
"notes": null,
"contact": {
"contactValue": "9XXXXXXXX2",
"id": 0,
"isActive": true,
"contactType": {
"dataCode": "CONTACT_TYPE.MOBILE"
}
},
"relationship": {
"dataCode": "RELATIONSHIP.HUSBAND"
}
}
],
"personIdentifierList": [
{
"iEId": "ie-alias-0001",
"id": 0,
"personIdentifierNumber": "XXXX-XXXX-1234",
"identifierType": {
"dataCode": "PERSON_IDENTIFIER.AADHAR_ID"
},
"isActive": true
}
]
},
"iETaggingList": [
{
"iEId": "ie-alias-0001",
"id": 0,
"taggingType": {
"dataCode": "TAGGING_TYPE.WORKNODE"
},
"taggedToTenant": {
"loginName": "tenant_a",
"id": 11
}
}
]
}Field Type Required Notes idstring Server IE id -> ie.id and ie_flat_entity.IEOLTPId (updateIEOLTPIdRH); also patched into pending role maps / portfolios. aliasIdstring Matches the local farmer row. person.id / person.personProfile.idinteger Saved via updateIEIds. person.personAddresses[].id / address.idinteger Saved via updateAddressIds. person.personContacts[].id / contact.id / contact.contactType.dataCodemixed Saved via updateContactId. person.personEducationList[].id, personFamilyList[].id/contact.id/relationship, personIdentifierList[].id/identifierTypemixed Child ids written back; Aadhaar number re-read to update the flat row. person.personProfile.gapStartDatestring IE_FLAT only: written to ie_flat_entity.gapStartDate.
Errors Status When What the app does 401Session token expired or invalid CoreAPI invalidates the session id and retries once immediately; if still failing the op stays in the queue (TryAgain.LATER). 500Server 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). 503Service unavailable CoreAPI retries once immediately, then the op is retried later by the sync queue. any non-2xxAny 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.
Source data/src/main/java/org/mindtree/app/agricultor/data/entity/IE.kt data/src/main/java/org/mindtree/app/agricultor/data/sync/work/IEWorker.kt data/src/main/java/org/mindtree/app/agricultor/data/sync/rh/IEPostRH.kt app/src/main/java/org/platformcommons/urvi/bridge/BridgeSyncHelper.kt data/src/main/java/org/mindtree/app/agricultor/data/manager/CoreAPIManager.kt data/src/main/java/org/mindtree/app/agricultor/data/sync/rh/BaseResponseHandler.kt offline-core/src/main/java/com/mindtree/bridge/coreapi/offline/SyncQueueProcessor.java offline-core/src/main/java/com/mindtree/bridge/coreapi/offline/manager/OperationManagerImpl.java core-api/src/main/java/com/mindtree/bridge/coreapi/impl/CoreAPIDefaultImpl.java