Integração de pessoas utilizando a API
Documentação de como realizar a integração de pessoas, utilizando a API do Ronda senior X.
Pré-requisitos gerais
- Ter ao menos um tipo de documento cadastrado;
- Estar autenticado no Ronda senior X.
Cadastrar uma pessoa
- Chame o serviço GET /documenttype;
- Escolha um registro da lista retornada que possua o item required definido como "true";
- Utilize o id deste tipo de documento no serviço abaixo;
- Monte o JSON com os dados da pessoa, o ID do tipo de documento e o documento;
- Chame o serviço POST /person.
Se o retorno do serviço tiver êxito (HTTP 200), será retornado o JSON com todos os dados disponíveis pela pessoa.
Excluir uma pessoa
- Chame o serviço DELETE /person/{id}.
Busca paginada de todas as pessoas
- Chame o serviço GET /person/pagedsearchall.
Consultar uma lista de pessoas pelo nome, com no mínimo 3 caracteres
- Chame o serviço GET /person/search.
- Consulte a pessoa cujos dados serão alterados;
- Chame o serviço GET /person/{id};
- Chame o serviço GET /person/{personId}/photo para consultar a foto da pessoa pesquisada;
- Chame o serviço POST /person/{personId}/photo para alterar a foto da pessoa;
- Altere os dados desejados no JSON;
- Chame o serviço PUT /person passando o JSON modificado.
Se o retorno do serviço tiver êxito (HTTP 200), não haverá JSON de retorno.
Bloquear pessoa
- Chame o serviço PUT /person/block passando os seguintes parâmetros:
- personId: identificador da pessoa que será bloqueada;
- blockReason: explicação do motivo para o bloqueio da pessoa;
- unblockProcedure: explicação dos procedimentos externos para desbloqueio;
- blockingType: "DEFINITIVE" para bloqueio definitivo (bloqueia todos os acessos físicos, finaliza os papéis e credenciais) ou "TEMPORARY" para bloqueio temporário (apenas cadastra uma suspensão para todos os papéis, bloqueando os acessos até um desbloqueio acontecer mas sem remover os papéis em si).
Desbloquear pessoa
- Chame o serviço PUT /person/unblock., passando os seguintes parâmetros:
- personId: identificador da pessoa que será desbloqueada;
- unblockJustification: explicação do motivo para o desbloqueio da pessoa;
- blockingType: "DEFINITIVE" para desbloqueio definitivo ou "TEMPORARY" para desbloqueio temporário. Para mais informações sobre os tipos de bloqueio, veja o item "Bloquear pessoa" acima.
Informações dos serviços
Implementation Notes
Return a array of Document Type
Response Class (Status 200)
A array of Document Type
[
{
"id": 0,
"name": "string",
"label": "string",
"mask": "string",
"required": true,
"documentToREP": true
}
]
Parameters
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| token | (required) | Authentication token | header | string |
Response Messages
| HTTP Status Code | Reason | Response Model | Headers |
|---|---|---|---|
| 401 | Token is invalid or expired | ||
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Create a new Person, Id field will be ignored
Response Class (Status 200)
Person created
{
"id": 0,
"name": "string",
"documents": [
{
"id": 0,
"documentType": {
"id": 0,
"name": "string",
"label": "string",
"mask": "string",
"required": true,
"documentToREP": true
},
"document": "string"
}
],
"emails": [
{
"id": 0,
"preferential": true,
"emailAddress": "string"
}
],
"phones": [
{
"id": 0,
"preferential": true,
"ddi": 0,
"phoneNumber": "string",
"extensionLine": "string"
}
],
"gender": 0,
"birthday": "string",
"registry": "string",
"registerDate": "string",
"lastModificationDate": "string",
"address": "string",
"number": "string",
"district": "string",
"city": "string",
"uf": "string",
"cep": "string",
"nationality": "string",
"lastAccessDate": "string",
"situation": 0,
"hasValidRole": true,
"hasProvisoryRole": true
}
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| person | Person | body | { "id": 0, "name": "string", "documents": [ { "id": 0, "documentType": { "id": 0, "name": "string", "label": "string", "mask": "string", "required": true, "documentToREP": true }, "document": "string" } ], "emails": [ { "id": 0, "preferential": true, "emailAddress": "string" } ], "phones": [ { "id": 0, "preferential": true, "ddi": 0, "phoneNumber": "string", "extensionLine": "string" } ], "gender": 0, "birthday": "string", "registry": "string", "registerDate": "string", "lastModificationDate": "string", "address": "string", "number": "string", "district": "string", "city": "string", "uf": "string", "cep": "string", "nationality": "string", "lastAccessDate": "string", "situation": 0, "hasValidRole": true, "hasProvisoryRole": true } |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Delete a person
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| id | Id of person | path | long |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 200 | Person deleted | |
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 404 | Person not found | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Paginated search to all person
Response Class (Status 200)
A paged array of person
[
{
"id": 0,
"name": "string",
"mandatoryDocuments": [
{
"id": 0,
"documentType": {
"id": 0,
"name": "string",
"label": "string",
"mask": "string",
"required": true,
"documentToREP": true
},
"document": "string"
}
],
"preferentialPhone": {
"id": 0,
"preferential": true,
"ddi": 0,
"phoneNumber": "string",
"extensionLine": "string"
},
"preferentialEmail": {
"id": 0,
"preferential": true,
"emailAddress": "string"
}
}
]
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| page | Page number | query | integer |
| pageSize | Size of page | query | integer |
| situation | Person situation filter (0=ALL, 1=ACTIVE) | query | integer |
| onlyReceiveVisit | Filter only person that can receive visit | query | boolean |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Auto complete search to person
Response Class (Status 200)
A array of basic info for search from people limited by 10 retults
[
{
"id": 0,
"name": "string",
"mandatoryDocuments": [
{
"id": 0,
"documentType": {
"id": 0,
"name": "string",
"label": "string",
"mask": "string",
"required": true,
"documentToREP": true
},
"document": "string"
}
],
"preferentialPhone": {
"id": 0,
"preferential": true,
"ddi": 0,
"phoneNumber": "string",
"extensionLine": "string"
},
"preferentialEmail": {
"id": 0,
"preferential": true,
"emailAddress": "string"
}
}
]
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| term | Term of person name, last name or document | query | string |
| situation | Person situation filter (0=ALL, 1=ACTIVE) | query | integer |
| onlyReceiveVisit | Filter only person that can receive visit | query | boolean |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Return a person
Response Class (Status 200)
Return a person
{
"id": 0,
"name": "string",
"documents": [
{
"id": 0,
"documentType": {
"id": 0,
"name": "string",
"label": "string",
"mask": "string",
"required": true,
"documentToREP": true
},
"document": "string"
}
],
"emails": [
{
"id": 0,
"preferential": true,
"emailAddress": "string"
}
],
"phones": [
{
"id": 0,
"preferential": true,
"ddi": 0,
"phoneNumber": "string",
"extensionLine": "string"
}
],
"gender": 0,
"birthday": "string",
"registry": "string",
"registerDate": "string",
"lastModificationDate": "string",
"address": "string",
"number": "string",
"district": "string",
"city": "string",
"uf": "string",
"cep": "string",
"nationality": "string",
"lastAccessDate": "string",
"situation": 0,
"hasValidRole": true,
"hasProvisoryRole": true
}
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| id | Id of person | path | long |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 404 | Person not found | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Return photo url from person
Response Class (Status 200)
The photo url from person
{
"photoDate": "string",
"photoURL": "string"
}
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| personId | Person Id | path | string |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 404 | Person not found | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Update person photo
Response Class (Status 200)
Date of person photo
{
"photoDate": "string",
"photoURL": "string"
}
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| personId | Id of a person | path | long |
| file | The person photo | formData | file |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Update a person
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| Person | Person | body | {
"id": 0, "name": "string", "documents": [ { "id": 0, "documentType": { "id": 0, "name": "string", "label": "string", "mask": "string", "required": true, "documentToREP": true }, "document": "string" } ], "emails": [ { "id": 0, "preferential": true, "emailAddress": "string" } ], "phones": [ { "id": 0, "preferential": true, "ddi": 0, "phoneNumber": "string", "extensionLine": "string" } ], "gender": 0, "birthday": "string", "registry": "string", "registerDate": "string", "lastModificationDate": "string", "address": "string", "number": "string", "district": "string", "city": "string", "uf": "string", "cep": "string", "nationality": "string", "lastAccessDate": "string", "situation": 0, "hasValidRole": true, "hasProvisoryRole": true } |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 200 | Person updated | |
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 404 | Person not found | |
| 500 | Server error | {
"code": 0, "message": "string" } |
Implementation Notes
Block a person
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| X-JWT-Assertion | WSO2 JWT token | header | string |
| X-Authenticated-Userid | The logged-in user ID | header | string |
| Person | Person | body | {
"personId": 0, "blockReason": "string", "unblockProcedure": "string", "blockingType": "DEFINITIVE" } |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 200 | Person blocked | |
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 500 | Server error | {
"id": "string" "code": 0, "message": "string" } |
Implementation Notes
Unblock a person
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| X-JWT-Assertion | WSO2 JWT token | header | string |
| X-Authenticated-Userid | The logged-in user ID | header | string |
| Person | Person | body | {
"personId": 0, , "unblockJustification": "string", "blockingType": "DEFINITIVE" } |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 200 | Person unblocked | |
| 401 | Token is invalid or expired | |
| 403 | Operation denied | |
| 500 | Server error | {
"id": "string" "code": 0, "message": "string" } |
English
Español
English
Español


