Contacts
Endpoints for managing contacts (employees) in the ssm.ro platform: retrieval, creation, and modification.
The contacts endpoints allow you to sync employees from your HR system with the ssm.ro platform. A contact represents an employee enrolled in your organization.
Retrieve contact
GET /v1/contacts?organizatie={organizatie}&marca={marca}Returns the data of a contact based on the badge number (the unique identifying key) and the organization name. The badge number is passed as a query parameter, so badge numbers containing URL-unsafe characters are accepted too, as long as the value is encoded with encodeURIComponent().
Example request:
GET /v1/contacts?organizatie=demo-organization&marca=M00212Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organizatie | query | string | Yes | Organization name |
marca | query | string | Yes | Badge number — the unique identifying key for the employee |
Responses
| Code | Description |
|---|---|
200 OK | Employee object |
404 Not Found | { "error": "Contactul nu a fost gasit" } — the badge number does not exist |
422 Unprocessable Entity | { "error": "Marca este obligatorie" } — the marca parameter is missing or empty |
500 Server Error | Internal server error |
Legacy route GET /v1/contacts/{id} — deprecated
Deprecated as of September 2026
The route that takes the badge number in the URL path (GET /v1/contacts/{id}) is
deprecated, because badge numbers containing URL-unsafe characters cannot be passed
correctly through a path segment. Use GET /v1/contacts?marca=, with the badge number
encoded via encodeURIComponent(). The legacy route still works, but is no longer maintained.
Create new contact
POST /v1/contactsCreates a new contact in the organization. If the badge number already exists, the operation will fail.
Request body
Content-Type: application/json — Employee object.
Example:
{
"nume": "Ion",
"prenume": "Popescu",
"email": "ion.popescu@exemplu.ro",
"departament": "Finanțe",
"codDepartament": "D163",
"cor": "Referent bancar",
"post": "Tesa",
"marca": "M00212",
"marcaSuperior": "M00132",
"adresa": "Str. Soarelui nr. 2",
"localitate": "Brașov",
"judet": "Brașov",
"dataNasterii": "1981-08-24",
"locatieFizica": "Office 101",
"status": "activ",
"organizatie": "demo-organization",
"echipaPSI": "Nu",
"telefon": "+40722333444",
"cnp": "1800101221144",
"limba": "ro",
"calificare": "Inginer",
"cetatenie": "Romana",
"nationalitate": "Romania",
"dataIncepereActivitate": "2020-01-15"
}Responses
| Code | Description |
|---|---|
200 OK | The contact was created — returns the Employee object |
404 Not Found | Organization not found |
422 Unprocessable Entity | Invalid data — JSON response with error details |
500 Server Error | Internal server error |
Update existing contact
PATCH /v1/contacts/updateUpdates the data of an existing contact, identified by the marca field. Only the fields sent in the body will be updated.
Request body
Content-Type: application/json — full Employee object. The marca and organizatie fields are required for identification.
Example:
{
"nume": "Ion",
"prenume": "Popescu",
"email": "ion.popescu@exemplu.ro",
"departament": "Finanțe",
"codDepartament": "D163",
"cor": "Referent bancar",
"post": "Tesa",
"marca": "M00212",
"marcaSuperior": "M00132",
"marcaSuperior2": "M0081",
"marcaInlocuitor": "M00301",
"adresa": "Str. Soarelui nr. 2",
"localitate": "Brașov",
"judet": "Brașov",
"dataNasterii": "1981-08-24",
"locatieFizica": "Office 101",
"status": "activ",
"organizatie": "demo-organization",
"echipaPSI": "Nu",
"telefon": "+40722333444",
"cnp": "1800101221144",
"limba": "ro",
"calificare": "Inginer",
"cetatenie": "Romana",
"nationalitate": "Romania",
"dataIncepereActivitate": "2020-01-15"
}Responses
| Code | Description |
|---|---|
200 OK | The contact was updated — returns the Employee object |
204 No Content | No changes made — the submitted data is identical to the existing data |
404 Not Found | Contact not found |
422 Unprocessable Entity | Invalid data — JSON response with error details |
500 Server Error | Internal server error |
Optional field behavior
All fields except marca and organizatie are optional. On PATCH, only the fields sent in the body are updated; a field that is absent or empty ("", null) is ignored — the existing value remains unchanged. In particular, a PATCH without status does not suspend the employee, and a POST without status creates the employee with activ status.
The department is identified by codDepartament. If you send the same codDepartament with a different departament value, the department name is updated (renamed) — a new department is not created. This way, a rename in HR propagates to the platform as long as the code stays the same.
New field validations (422 Unprocessable Entity)
| Situation | Code | Explanation |
|---|---|---|
cnp already used by another employee | 422 | The CNP must be unique within the organization |
cnp with incorrect format | 422 | Invalid CNP (valid format: 13 digits) |
limba outside the accepted values | 422 | Only ro, en are allowed |
dataIncepereActivitate with invalid date | ignored | An unparseable date is treated as empty (no error) |
telefon too short (fewer than 9 digits) | ignored | The number is normalized automatically; values that are too short are ignored (no error) |