Person
Represents a person with their relevant details.
A person can be associated with offices, projects, and roles within the system.
Optionally, a linked user account (related_user
) can be assigned, enabling authentication with that identity.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Authentication
Section titled “ Authentication ”OAuth2
Section titled “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
Flow type: refreshToken
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Section titled “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Section titled “Operations” POST /v2/person/index
Returns a paginated and filterable list of persons. Use POST to allow complex filters via JSON payload.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching persons
object
object
Example
{ "filter": { "first_name": "Mario", "last_name": "Rossi", "related_user": "relatedUser_manager", "entity_id": "mario.rossi@4hse.com" }, "per-page": 50, "page": 2, "sort": "-last_name"}
Responses
Section titled “ Responses ”List of persons
object
Example
{ "person_id": "person-1", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
GET /v2/person/view/{id}
Retrieve a person by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the person to retrieve. Required if code
and project_id
are not provided.
Query Parameters
Section titled “Query Parameters ”Code of the person to get. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
Responses
Section titled “ Responses ”Person found
object
Example
{ "person_id": "person-1", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Person not found
create
Section titled “create” POST /v2/person/create
Create a new person by providing the required details.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Person object to be created
object
If true and a person with the same code already exists, the person will be updated instead of created. If the person was historicized, a new period will be started.
Example
{ "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
Responses
Section titled “ Responses ”Person created successfully
object
Example
{ "person_id": "person-2", "first_name": "Mario", "last_name": "Rossi", "code": "MR001", "birth_date": "1980-01-01", "entity_id": "mario.rossi@4hse.com", "project_id": "proj-1", "related_user": "relatedUser_manager"}
update
Section titled “update” PUT /v2/person/update/{id}
Update an existing person by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the person to update. Required if code
and project_id
are not provided.
Query Parameters
Section titled “Query Parameters ”Code of the person to update. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
Request Body required
Section titled “Request Body required ”Person object with updated data
object
Example
{ "first_name": "Mario", "last_name": "Rossi", "code": "MR002"}
Responses
Section titled “ Responses ”Person updated successfully
object
Example
{ "person_id": "person-1", "first_name": "Mario", "last_name": "Rossi", "code": "MR002"}
Person not found
historicize
Section titled “historicize” POST /v2/person/historicize/{id}
Historicize an existing person.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the person to historicize. Required if code
and project_id
are not provided.
Query Parameters
Section titled “Query Parameters ”Code of the person to historicize. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
Request Body
Section titled “Request Body ”Date used to historicize the person
object
The date of the historicization. If not provided, the current date will be used.
2025-06-10 00:00:00
Responses
Section titled “ Responses ”Person historicized successfully
object
Person not found
delete
Section titled “delete” DELETE /v2/person/delete/{id}
Delete a person by its unique ID. If force=true, all related entities will also be deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the person to delete. Required if code
and project_id
are not provided.
Query Parameters
Section titled “Query Parameters ”Code of the person to delete. Required together with project_id
if id
is not provided
Required together with code
if id
is not provided
If true, the person will be historicized instead of deleted.
Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”Person deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned