Reassign assignment
PUT /api/sync/v1/todos/reassign
Operation id: ReAssignAssignment
Description
This API allows to reassign the assignment to other users/role/department within the same site. The user should either be a recipient of the assignment or they should have task-view-all permissions and have access to the same site where the assignments for the to-do were created.
The API accepts platform names for the user/role/department and site. the reassignment can happen either to a role or a user or department. site ID value should be passed if its being reassigned to user/role/department.
Permission Required:
- task-reassign
Tags: To-Do Execution APIs
Security
- Bearer (http / bearer)
- enter the client service token value.
Responses
200 — Re-Assignment done successfully
Content type: application/json
400 — Bad Request
401 — Unauthorized Access
412 — Precondition Failed
422 — Unprocessable Entity
500 — Internal Server Error
Request body
Required: Yes
application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
assignmentId | integer (int32) | Yes | field on which re-assignment is to be done |
platformUserId | string | No | user Id that is to be re-assigned, if present |
platformRoleId | string | No | role Id that is to be re-assigned, if present |
platformSiteId | string | No | site Id that is to be re-assigned, if present |
platformDepartmentId | string | No | department Id that is to be re-assigned, if present |
offlineActionTimestamp | string (date-time) | No | The time when the user acted on the task while the device was offline |
{
"type": "object",
"required": [
"assignmentId"
],
"properties": {
"assignmentId": {
"type": "integer",
"format": "int32",
"description": "field on which re-assignment is to be done",
"example": 1
},
"platformUserId": {
"type": "string",
"description": "user Id that is to be re-assigned, if present"
},
"platformRoleId": {
"type": "string",
"description": "role Id that is to be re-assigned, if present"
},
"platformSiteId": {
"type": "string",
"description": "site Id that is to be re-assigned, if present"
},
"platformDepartmentId": {
"type": "string",
"description": "department Id that is to be re-assigned, if present"
},
"offlineActionTimestamp": {
"type": "string",
"format": "date-time",
"description": "The time when the user acted on the task while the device was offline"
}
}
}
Response models
200 — Re-Assignment done successfully
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
message | string | No | |
status | string | No | |
statusCode | integer (int32) | No | |
debugErrorMessage | string | No | |
messageCode | string | No | message codes |
messageParams | array | No | |
data | object | No |
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"SUCCESS",
"FAIL",
"BAD_REQUEST",
"NO_CONTENT",
"UNAUTHORIZED",
"FORBIDDEN",
"NOT_FOUND",
"INTERNAL_SERVER_ERROR",
"UNSUPPORTED_MEDIA_TYPE"
]
},
"statusCode": {
"type": "integer",
"format": "int32"
},
"debugErrorMessage": {
"type": "string"
},
"messageCode": {
"type": "string",
"description": "message codes",
"items": {
"type": "string",
"example": [
"ERROR12-To-Do has expired.",
"ERROR13-To-Do has been recalled.",
"ERROR14-Complete all checklist items.",
"ERROR15-Error updating status.",
"ERROR16-Error fetching assignment.",
"ERROR55-Error updating status.",
"ERROR59-To-do is already completed by {name}",
"ERROR75-To-Do has been Recalled.",
"ERROR17-To-Do can not be reassigned as it has been completed.",
"ERROR18-This To-Do is confidential and can not be reassigned.",
"ERROR19-Error while reassigning.",
"ERROR36-Current assignee's site id doesn't match",
"ERROR20-This To-Do can not be recalled as it has not been launched.",
"ERROR21-Error while recalling To-Do.",
"ERROR35-Please select a reason type while recalling a task",
"ERROR58-To-do can not be recalled."
]
}
},
"messageParams": {
"type": "array",
"items": {
"type": "string"
}
},
"data": {
"type": "object"
}
}
}