Access credentials integration using the API
Documentation on how to integrate access credentials, using the Ronda senior X API.
General prerequisites
- Be authenticated in Ronda senior X;
- Have a person registered in Ronda senior X;
- Pass the token in the Header.
Consult an access credential list
- Call the serviceGET /credential/provisory/pagedsearchbasic to consult the list of credentials;
- In the postman, the total number of pages, the term and the card must be passed as parameters in the URL (query): https://sam-api.senior.com.br/api/v1/credential/provisory/pagedsearchbasic?page=1&pageSize=10&term&card
Register a credential
To save the credential:
- Call the servicePOST /credential/provisional/card;
- Pass the JSON in the Body;
- Assemble the JSON with the credential list data, expiration date, person id, credential status (0 = inactive, 1 = active), technology and badge number, role id and group id.
Note
Date data must have the following format: "2017-03-24T10:09:00-03:00". The credential situation considers "0" as active and "1" as blocked. The technology considers "0" as Barcode, "1" as Proximity and "2" as Smart card.
{
"id": 0,
"expirationDate": "string",
"person":
{
"id": 0,
"name": "string"
},
"situation": 0,
"cardCredentialList":
[
{
"cardTechnology": 0,
"cardNumber": 0
}
],
"role":
{
"id": 0,
"name": "string"
},
"group":
{
"id": 0,
"name": "string"
},
"personVisited":
{
"id": 0,
"name": "string"
},
"scheduledCredentialID": 0
}
Update or terminate a credential
- Call the servicePUT /credential/provisional/card;
- Pass the modified JSON in the body.
{
"id": 47,
"expirationDate": "2017-03-28T10:00:00-03:00"
}
If the service returns successfully (HTTP 200), there will be no JSON returned.
Service information
Implementation Notes
Returns all basic information from the person's access credential
Response Class (Status 200)
Return all credentials from a person
[
{
"idCredential": 0,
"person":
{
"id": 0,
"name": "string"
},
"cardCredential":
{
"cardTechnology": 0,
"cardNumber": 0
},
"expirationDate": "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 |
| term | Term of the person's name or document | query | string |
| card | Card number | query | 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
Creates a new temporary credential of the card type. The ID field will be ignored
Response Class (Status 200)
Temporary credential of the card type
{
"id": 0,
"expirationDate": "string",
"person":
{
"id": 0,
"name": "string"
},
"situation": 0,
"cardCredentialList":
[
{
"cardTechnology": 0,
"cardNumber": 0
}
],
"role":
{
"id": 0,
"name": "string"
},
"group":
{
"id": 0,
"name": "string"
},
"personVisited":
{
"id": 0,
"name": "string"
},
"scheduledCredentialID": 0
}
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| Temporary Card Credential | Temporary Card Credential | body | { "id": 0, "expirationDate": "string", "person": { "id": 0, "name": "string" }, "situation": 0, "cardCredentialList": [ { "cardTechnology": 0, "cardNumber": 0 } ], "role": { "id": 0, "name": "string" }, "group": { "id": 0, "name": "string" }, "personVisited": { "id": 0, "name": "string" }, "scheduledCredentialID": 0 } |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 401 | Token is invalid or expired | |
| 403 | No permission to insert a credential of the card type | |
| 500 | Server error | { "code": 0, "message": "string", "params": ] "string" ] } |
Implementation Notes
Updates a temporary credential of the card type
Parameters
| Parameter | Description | Parameter Type | Data Type |
|---|---|---|---|
| token | Authentication token | header | string |
| Basic Credential | Basic Credential | body | { "id": 0, "expirationDate": "string" } |
Response Messages
| HTTP Status Code | Reason | Response Model |
|---|---|---|
| 200 | Temporary credential of the card type updated | |
| 401 | Token is invalid or expired | |
| 403 | No permission to update a credential of the card type | |
| 404 | Temporary credential of this card type not found | |
| 500 | Server error | { "code": 0, "message": "string" } |





