People integration using the API
Documentation on how to integrate people, using the Ronda senior X API.
General prerequisites
- At least one document type registered;
- Be authenticated in Ronda senior X.
Register a person
- Call the serviceGET /documenttype;
- Choose a record from the returned list that has the itemrequired set to "true";
- Use theid of this type of document in the service below;
- Assemble the JSON with the person's data, the document type id and the document;
- Call the servicePOST /person.
If the service returns successfully (HTTP 200), JSON will be returned with all the data available to the person.
Delete a person
Paged people search
Search a person list by name, with at least 3 characters entered
Update person
- Consult the person whose data will be changed;
- Call the serviceGET /person/{id};
- Call the serviceGET /person/{personId}/photo to consult the photo of the person searched;
- Call the servicePOST /person/{personId}/photo to change the person's photo;
- Change the desired data in JSON;
- Call the servicePUT /person passing the modified JSON.
If the service returns successfully (HTTP 200), there will be no JSON returned.
Service information
Implementation Notes
Returns a Document Type array
Response Class (Status 200)
A Document Type array
[
{
"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
Creates a new Person. The 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
Deletes a person
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| id | ID of the 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
Paged person search
Response Class (Status 200)
A paged array of people
[
{
"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 the page | query | integer |
| situation | Person situation filter (0 = ALL, 1 = ACTIVE) | query | integer |
| onlyReceiveVisit | Filter only people eligible to be visited | 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
Autocomplete person search
Response Class (Status 200)
An array of basic people information, limited to 10 results
[
{
"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 | A term in a person's name, last name or document | query | string |
| situation | Person situation filter (0 = ALL, 1 = ACTIVE) | query | integer |
| onlyReceiveVisit | Filter only people eligible to be visited | 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
Returns a person
Response Class (Status 200)
Returns 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 the 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
Returns the URL of a person's photo
Response Class (Status 200)
The URL of a person's photo
{
"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
Updates a person's photo
Response Class (Status 200)
Date of the person's photo
{
"photoDate": "string",
"photoURL": "string"
}
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| personId | ID of the person | path | long |
| file | The person's 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
Updates 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" } |





