Obtém as pendências do usuário autenticado conforme o tipo.
Payload de entrada
{
"pendencyRequestParameters": {
// a partir de qual pendência a busca começa (opcional)
"start": 0,
// quantidade de pendências retornadas (opcional)
"limit": 0,
// tipo de pendência. Pode ser Pending, Treated ou All (opcional)
"type": "Pending",
// filtro para buscar pelo nome da pendência ou valor das variáveis do processo (opcional)
"filterValue": "Viagem",
// filtro do tipo de processo. Pode ser Embedded, NotEmbedded ou All (opcional)
"processFilterType": "All"
}
}
Request
curl --location --request POST "https://api.senior.com.br/platform/workflow/getMyPendencies" --header "Authorization: Bearer {access_token}" --header "client_id: {client_id}" --header "Content-Type: application/json" --header "Accept: application/json" --data-raw "{ 'pendencyRequestParameters': { 'start': 0, 'limit': 5, 'type': 'Pending', 'filterValue': 'string', 'processFilterType': 'All' }}"
Response
{
"pendencies": [
{
"serviceFlowToken": {
"processInstanceID": 0,
"step": 0,
"activityId": 0
},
"description": "string",
"hint": "string",
"currentSubject": {
"userCode": 0,
"name": "string",
"subjectKind": "User"
},
"delegatorSubject": {
"userCode": 0,
"name": "string",
"subjectKind": "User"
},
"startDate": "2021-06-19T16:10:31.133Z",
"lastUpdateDate": "2021-06-19T16:10:31.133Z",
"expirationDate": "2021-06-19T16:10:31.133Z",
"performerId": "string",
"processInstance": {
"id": 0,
"process": {
"processId": 0,
"currentVersion": 0,
"publishedVersion": 0,
"processName": "string",
"processRawName": "string",
"changed": true,
"fileName": "string",
"status": "Saved",
"description": "string",
"creationDate": "2021-06-19T16:10:31.134Z",
"active": true,
"embedded": true,
"simple": true,
"tag": "string",
"accessLevel": "EDIT_AND_START",
"icon": "string",
"serviceEventQtyByType": [
{
"type": "IN_PROGRESS",
"quantity": 0
}
]
},
"startedSubject": {
"userCode": 0,
"name": "string",
"subjectKind": "User"
},
"cancelSubject": {
"userCode": 0,
"name": "string",
"subjectKind": "User"
},
"startDate": "2021-06-19T16:10:31.134Z",
"lastUptadeDate": "2021-06-19T16:10:31.134Z",
"endDate": "2021-06-19T16:10:31.134Z",
"flowExecutionStatus": "string",
"endMessage": "string",
"description": "string",
"flowToken": [
{
"processInstanceID": 0,
"step": 0,
"activityId": 0
}
],
"taskExpiration": "2021-06-19T16:10:31.134Z"
},
"type": "Pending",
"pool": true,
"title": "string"
}
],
"total": 1
}
{
"message": "Descrição do erro",
"errorCode": "codigoDoErro",
"reason": "BAD_REQUEST",
"domain": "platform",
"service": "workflow"
}
{
"error_description": "Descrição do erro",
"error": "codigo_do_erro"
}