RFID Cards
Endpoint for creating or updating the RFID card code of a contact (employee) in the ssm.ro platform.
The RFID cards endpoint sets the access card code for an existing contact, identified by marca. The operation is an upsert: if the contact does not have an RFID card yet, one is created; if it already has one, the existing code is replaced with the one sent.
This operation requires the RFID Card Access app to be enabled for the organization.
Create or update RFID card
POST /v1/contacts/rfidSets the RFID card code for an existing contact, identified by marca:
- if the contact has no RFID card, one is created with the code sent;
- if the contact already has an RFID card, its code is updated with the value sent.
What this operation does NOT change
The call affects only the RFID code. It does not change:
- the card status (active / inactive);
- the locked status resulting from too many failed attempts;
- the PIN associated with the card.
These operations are performed from the dashboard, in the RFID Card Access app.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organizatie | body | string | Yes | The organization's subdomain (e.g., demo-organization) |
marca | body | string | Yes | The employee ID of the contact the card is being associated with |
codRFID | body | string | Yes | The RFID card code |
Example request
{
"organizatie": "demo-organization",
"marca": "M00212",
"codRFID": "0006627031"
}Response
On success, the endpoint returns 204 No Content (no body).
On error, the response is a JSON object of the form:
{
"error": "Contactul cu marca M00212 nu a fost gasit"
}| Code | Description |
|---|---|
204 No Content | The RFID code was created or updated for the contact (and, if needed, the local account was created) |
400 Bad Request | The organization is not set or is invalid |
401 Unauthorized | Missing or invalid authentication token |
404 Not Found | This API version is not available on the client's installation (endpoint does not exist) |
422 Unprocessable Entity | Validation error — see the message in the response |
500 Server Error | Internal server error |
Availability on older installations
This feature is only available starting with the version that includes the
/v1/contacts/rfid endpoint. On older installations, the route does not exist
and the server responds with 404 Not Found — a sign that this API version is
not available on that installation. In this case, the response body may be
HTML/text (not the usual JSON object), so check the HTTP status code
(404), not the response content.
Possible messages for 422 Unprocessable Entity
| Message | Cause |
|---|---|
Lipsa cod RFID | The codRFID parameter is missing or empty |
Contactul cu marca {marca} nu a fost gasit | No contact exists with the given marca |
Aplicatia RFID nu este activata | The RFID Card Access app is not enabled for the organization |
Contul nu este de tip local | The contact already has a real (non-local) account connected |
Contactul are rol de utilizator! | The contact has a user role |