A farmer's land parcels
Operation
listFarmerLands- Call
GET /gateway/urvi-app-service/api/v2/farmers/{farmerId}/lands- Group
- Land & geofence
- Features
- Land assets, Geofencing, Leased land
- Replaces today
Use case. Called online by the Land screen's pull-to-refresh and after a land-related rejection, to rebuild the local land list with server state (authenticated, disabled, lease status, geofence KML URLs). Leased-in parcels carry lease; owned parcels list leasedTo.
Error codes. NOT_FOUND
Parameters
| Name | In | Type | Required | Meaning | Example |
|---|---|---|---|---|---|
X-App-Version | header | string | Yes | App version `major.minor.patch+build`. Too old -> 426 `VERSION_TOO_OLD`. · pattern ^\d+\.\d+\.\d+(\+\d+)?$ | 2.0.0+200 |
X-Device-Id | header | string (uuid) | Yes | App-scoped device UUID (not ANDROID_ID). | 6b1f2c3d-0000-4000-8000-00000000d001 |
X-Request-Id | header | string (uuid) | No | Client-generated request id for tracing; echoed in responses and problems. | 0e0c5a1b-0000-4000-8000-0000000000a1 |
Accept-Language | header | string | No | Language for messages and labels. · one of en, te, ta; default "en" | te |
X-Tenant | header | string | No | Tenant code; must match the token. Urvi: `ap.gov`. · one of ap.gov | ap.gov |
farmerId | path | string | Yes | Farmer server id or client UUID (`aliasId`). With a UUID unknown to the server, the farmer is created from the flat master record (get-or-create). · min length 1; max length 64 | 3f6c1a2e-0000-4000-8000-00000000f001 |
If-None-Match | header | string | No | ETag from a previous response; 304 when unchanged. | "cfg-2025-26-v41" |
Request
No body.
Responses
200 Lands.
Schema Land.
[
{
"id": 810001,
"clientId": "4a7d2b3f-0000-4000-8000-000000004097",
"version": 3,
"createdAt": "2025-06-02T10:05:00+05:30",
"updatedAt": "2025-10-14T09:30:00+05:30",
"active": true,
"farmerId": 700001,
"farmerClientId": "3f6c1a2e-0000-4000-8000-000000061441",
"category": "LAND_OWNED",
"landType": "IRRIGATED",
"ownershipType": "OWNER",
"khataNo": "KH-0001",
"surveyNo": "SY-101/2",
"acres": 2.5,
"authenticated": true,
"disabled": false,
"leasedTo": [],
"geofence": {
"polygon": {
"type": "Polygon",
"coordinates": [
[
[
80.1001,
16.5001
],
[
80.1012,
16.5001
],
[
80.1012,
16.501
],
[
80.1001,
16.501
],
[
80.1001,
16.5001
]
]
]
},
"captureMethod": "OSM_MOTION",
"accuracyM": 4.5,
"pointCount": 4,
"capturedAt": "2025-10-14T09:30:00+05:30",
"areaAcres": 2.4,
"kmlUrl": "https://files.example.invalid/urvi/signed/land-1001.kml"
},
"checksum": "c1a5e0d7"
}
]| Field | Type | Required | Rules | Meaning |
|---|---|---|---|---|
id | integer (int64) | No | server-set | Server id (assigned by the App Service). |
clientId | string (uuid) | Yes | Client-generated UUID (the app's `appId`/`aliasId`). Stable for the life of the entity and used for idempotent creates and parent references. | |
version | integer (int64) | No | ≥ 1; server-set | Monotonic server version; send as `baseVersion` on updates. |
createdAt | string (date-time) | No | server-set | |
updatedAt | string (date-time) | No | server-set | |
active | boolean | No | False once soft-deleted / disabled. | |
farmerId | integer (int64) | No | Server id (assigned by the App Service). | |
farmerClientId | string (uuid) | No | ||
category | LandCategory | No | one of LAND_OWNED, LEASED_IN, ROFR, ENDOWMENT, ASSIGNED_D_PATTA, LAND_OWNED_OTHERS, LEASED_IN_OTHERS | |
landType | LandType | No | one of IRRIGATED, RAINFED | |
ownershipType | string | No | one of OWNER, CULTIVATOR | Only for LAND_OWNED. |
description | string | No | max length 200 | |
name | string | No | max length 100 | |
khataNo | string | No | max length 50 | Required for LAND_OWNED when `featureSwitches.khataMandatory` (`KHATA_REQUIRED`). |
surveyNo | string | No | max length 50 | Required (except leased-in) when `featureSwitches.surveyMandatory` (`SURVEY_REQUIRED`). |
acres | number (double) | No | ≥ 0.01; ≤ 99.99; step 0.01 | Parcel area, > 0, at most 2 decimals. For leased-in land equals `lease.leasedAcres`. Unit: acres. |
authenticated | boolean | No | Once true and saved, the parcel is locked unless `featureSwitches.editAuthenticatedLand` (`LAND_AUTHENTICATED_LOCKED`). | |
disabled | boolean | No | server-set | Disabled by an administrator; no new crops (`LAND_DISABLED`). |
inactiveReason | string | No | Delete reason (required on delete). | |
lease | LeasedLand | No | Lease details. One leased-in Land is created per lessor parcel; it copies khata, survey number and geofence. | |
leasedTo | FarmerRef[] | No | server-set | |
geofence | Geofence | No | Boundary of a land parcel, crop block or ATM plot. Send `polygon` or `kmlFileId` (or both). | |
checksum | string | No | server-set | Server checksum of acres + identifiers; crop blocks and ATMs echo it as `landChecksum` (`LAND_CHECKSUM_MISMATCH`). |
304 Unchanged since the supplied ETag; use the cached copy.
400 Malformed request or schema violation.
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/validation-failed",
"title": "Validation failed",
"status": 400,
"detail": "One or more fields are invalid.",
"code": "VALIDATION_FAILED",
"requestId": "0e0c5a1b-0000-4000-8000-0000000000a1",
"errors": [
{
"field": "/mobile",
"code": "INVALID_MOBILE",
"message": "Mobile must be 10 digits starting 6-9."
}
]
}401 Missing, invalid or expired access token. Refresh once, then ask the user to log in; pending outbox ops stay intact.
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/token-expired",
"title": "Session expired",
"status": 401,
"detail": "The access token has expired.",
"code": "TOKEN_EXPIRED",
"requestId": "0e0c5a1b-0000-4000-8000-0000000000a1"
}403 Authenticated but not allowed (role, tenant, device binding or feature switch).
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/role-not-allowed",
"title": "Not allowed",
"status": 403,
"detail": "Your role cannot perform this action.",
"code": "ROLE_NOT_ALLOWED",
"requestId": "0e0c5a1b-0000-4000-8000-0000000000a1"
}404 Resource not found or outside the user's work nodes.
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/not-found",
"title": "Not found",
"status": 404,
"detail": "No such resource in your work area.",
"code": "NOT_FOUND",
"requestId": "0e0c5a1b-0000-4000-8000-0000000000a1"
}426 App version below the minimum; block the UI with an update prompt. Pending outbox ops are kept.
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/version-too-old",
"title": "Update required",
"status": 426,
"detail": "Please update Urvi to continue.",
"code": "VERSION_TOO_OLD",
"requestId": "0e0c5a1b-0000-4000-8000-0000000000a1",
"minAppVersion": "2.0.0"
}429 Rate limited per device / user. Respect `Retry-After`.
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/rate-limited",
"title": "Too many requests",
"status": 429,
"detail": "Slow down and retry later.",
"code": "RATE_LIMITED",
"requestId": "0e0c5a1b-0000-4000-8000-0000000000a1",
"retryAfterSeconds": 30
}500 Unexpected server error; retry with backoff (writes are idempotent).
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/internal-error",
"title": "Server error",
"status": 500,
"detail": "Something went wrong. Please try again.",
"code": "INTERNAL_ERROR",
"requestId": "0e0c5a1b-0000-4000-8000-0000000000a1"
}