"Login here": move the binding to this device
Operation
takeOverDeviceBinding- Call
POST /gateway/urvi-app-service/api/v2/devices/{deviceId}/binding/takeover- Group
- Devices
- Features
- Device registration and remote actions
- Replaces today
Use case. Called from the device-conflict dialog when the user taps Login here (shown only when the tenant allows it). Expires the other device's binding with remark BINDING_REMOVED, revokes its refresh tokens and binds this device; the other device receives a LOGOUT remote action.
Rules.
- Tenant must allow takeover (
BINDING_TAKEOVER_NOT_ALLOWED, 403).
Error codes. BINDING_TAKEOVER_NOT_ALLOWED
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 |
deviceId | path | string (uuid) | Yes | App-scoped device UUID; must equal `X-Device-Id`. | 6b1f2c3d-0000-4000-8000-00000000d001 |
Idempotency-Key | header | string (uuid) | Yes | UUID per write request; retained >= 30 days. Reusing a key with a different body -> 422 `IDEMPOTENCY_KEY_REUSED`. | 9c8b7a6d-0000-4000-8000-0000000000b1 |
Request
Body schema BindingTakeoverRequest.
{
"confirm": true,
"reason": "BINDING_REMOVED"
}| Field | Type | Required | Rules | Meaning |
|---|---|---|---|---|
confirm | boolean | Yes | ||
reason | string | No |
Responses
200 Now bound here.
Schema Device.
{
"deviceId": "6b1f2c3d-0000-4000-8000-000000053249",
"brand": "BrandA",
"model": "ModelA",
"osVersion": "14",
"appVersion": "2.0.0+200",
"status": "LIVE",
"boundAt": "2025-06-01T08:00:00+05:30",
"lastSeenAt": "2025-10-14T09:30:00+05:30"
}| Field | Type | Required | Rules | Meaning |
|---|---|---|---|---|
deviceId | string (uuid) | Yes | ||
brand | string | No | ||
model | string | No | ||
osVersion | string | No | ||
appVersion | string | No | ||
status | string | No | one of LIVE, EXPIRED, BLOCKED; server-set | |
boundAt | string (date-time) | No | server-set | |
lastSeenAt | string (date-time) | No | server-set |
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 Takeover not allowed for this tenant.
Schema Problem.
{
"type": "https://urvi.example.invalid/problems/binding-takeover-not-allowed",
"title": "Not allowed",
"status": 403,
"detail": "Ask your administrator to remove the other device.",
"code": "BINDING_TAKEOVER_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"
}