Endpointtoday's app
Call GET /gateway/asset-service/api/v1/endorsement/me?page&sizeService asset-service Features VO / SHG / Farmer endorsement , Farmer endorsement details When One-time job when the endorsement screen opens (FetchEndorsementDataWorker) Auth X-SESSIONID header (AuthInterceptor adds it; re-auth on 401/400) In the App Service Use case Downloads the endorsements made by or assigned to the logged-in user. It runs as a one-time FetchEndorsementDataWorker (network required, expedited), enqueued by FetchEndorsementsData.fetch() when the VO/SHG/Farmer Endorsement screen (EndorsementFragment) opens. This is not a periodic job. The page starts at 0 and size is Int.MAX_VALUE. A 206 response increments the page and recurses. The list is filtered by the ref-data endorsement start date, saved to endorsement_entity, copied onto VO/SHG/farmer IE flat rows (status, endorsedBy, date), and the "endorsement cached" preference is set. Any other status fails the worker, and the screen keeps cached data.
Headers Header Value Notes X-SESSIONID<session id> Passed explicitly as a @Header by the caller (AndroidSessionManager.sessionId). AuthInterceptor also fills it when missing, and on a 401 or 400 it invalidates the token, fetches a new one and retries once.
Parameters Param In Required Example Notes pagequery Yes 0Starts at 0. Incremented on HTTP 206. sizequery Yes 2147483647Int.MAX_VALUE, so in practice there is no paging.
Request No body. page, size
Response Example response body (synthetic data) [
{
"id": 3101,
"uuid": "e0000000-0000-4000-8000-000000003101",
"entityType": "ENTITY.TYPE.SHG",
"entityId": "440012",
"entityCode": "SHG-0012",
"endorsedBy": "Cadre A",
"endorsedUserId": 1001,
"name": "SHG A",
"status": "ENDORSED",
"endorsementType": "SHG",
"districtName": "District A",
"unitName": "Unit A",
"mandalCode": "M-01",
"mandalName": "Mandal A",
"voCode": "VO-01",
"voName": "VO A",
"shgCode": "SHG-0012",
"shgName": "SHG A",
"reviewdBy": null,
"reviewByUserId": null,
"reviewedTimestamp": null,
"timestamp": 1748772000000,
"createdAt": 1748772000000,
"hasNpmShop": false,
"abstractFile": null
}
]Field Type Required Notes [].idint Server id. 0 for a new endorsement. Updated from the POST response. [].uuidstring Client-generated primary key. [].entityTypestring ENTITY.TYPE.VO, ENTITY.TYPE.SHG or ENTITY.TYPE.FARMER. [].entityId / entityCodestring VO, SHG or farmer server id and code. Used to update IE flat endorsement fields. [].statusstring PENDING, ENDORSED, FLAGGED or FOR_REVIEW (VoConstants). [].endorsedBy / endorsedUserIdstring / long PII: name and user id of the endorsing cadre. [].reviewdBy / reviewByUserId / reviewedTimestampstring / long / long Reviewer (unit in-charge). The misspelling "reviewdBy" is the wire name. [].namestring PII when entityType is FARMER (farmer name). [].districtName, unitName, mandalCode, mandalName, voCode, voName, shgCode, shgNamestring Geography and group context shown in lists. [].endorsementTypestring VO, SHG or FARMER tab type. [].hasNpmShopboolean NPM shop flag on VO endorsements. [].abstractFilestring|null Local file path of the abstract, also serialised. The server is not known to read it. [].timestamplong Endorsement time (epoch ms). [].createdAtlong Mapped to created_at. FetchEndorsementDataWorker drops rows older than ref-data endorsementStartDate.
Errors Status When What the app does 206Partial content Fetches the next page recursively. other non-200Failure Result.failure(). The screen falls back to cached rows. 401/400Session invalid AuthInterceptor re-authenticates and retries once.
Source app/src/main/java/org/platformcommons/urvi/datasource/network/URLInjector.kt app/src/main/java/org/platformcommons/urvi/datasource/network/retrofit/APIInterface.kt app/src/main/java/org/platformcommons/urvi/datasource/service/FetchEndorsementDataWorker.kt app/src/main/java/org/platformcommons/urvi/datasource/repository/FetchEndorsementsData.kt app/src/main/java/org/platformcommons/urvi/view/endorsements/vo/EndorsementFragment.kt data/src/main/java/org/mindtree/app/agricultor/data/sync/entity/EndorsementEntity.kt app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/EndorsementRepositoryImpl.kt