Endpointtoday's app
Call GET /gateway/asset-service/api/v1/endorsementComment?entityID&entityType&page&sizeService asset-service Features VO / SHG / Farmer endorsement , Farmer endorsement details When User opens comments Auth X-SESSIONID header (AuthInterceptor adds it; re-auth on 401/400) In the App Service Use case Loads the comment thread for an endorsed VO, SHG or farmer when the user opens comments (EndorsementViewModel.getCommentForId -> EndorsementRepositoryImpl, a NetworkBoundResource). It shows local comments first. It calls the server only when online and either the cache is empty or a reload is requested. Results are saved to endorsement_comment_entity. Page size is 50. On failure the cached list remains.
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 entityIDquery Yes 880001Entity id. Note the capital ID. entityTypequery Yes ENTITY.TYPE.FARMEREntity type. pagequery Yes 0Page index. sizequery Yes 50OFFSET_SIZE = 50.
Request No body. entityID, entityType, page, size
Response Example response body (synthetic data) [
{
"id": 9001,
"uuid": "c0000000-0000-4000-8000-000000009001",
"entityType": "ENTITY.TYPE.FARMER",
"entityId": "880001",
"entityCode": "IE-880001",
"postedBy": "Cadre A",
"timeStamp": 1748772000000,
"description": "Please verify the land extent.",
"commentType": null
}
]Field Type Required Notes [].idint Server id. The POST response (a plain integer) is stored back here. [].uuidstring Client primary key. [].entityType / entityId / entityCodestring Entity being commented on (VO, SHG or farmer). [].postedBystring PII: author display name. The notification query uses "<userId>-notifications". [].timeStamplong Wire name timeStamp (@SerializedName). Epoch ms. [].descriptionstring Free-text comment from the Resolve Comments screen. PII: may contain farmer details. [].commentTypestring|null Local only. Set to NOTIFICATIONS for rows saved by the notification worker. Serialised on POST.
Errors Status When What the app does non-2xx / networkFailure NetworkBoundResource emits an error and the cached comments stay visible.
Source app/src/main/java/org/platformcommons/urvi/datasource/network/retrofit/APIInterface.kt data/src/main/java/org/mindtree/app/agricultor/data/setup_new/SetupServiceNew.kt app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/EndorsementRepositoryImpl.kt app/src/main/java/org/platformcommons/urvi/view/endorsements/vo/EndorsementViewModel.kt data/src/main/java/org/mindtree/app/agricultor/data/sync/entity/EndorsementCommentEntity.kt