Person
Manage persons, including registration, update, deletion, and advanced search.
Persons can be linked to offices, projects, and roles, and support metadata and filtering.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
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.
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.
Path Parameters
Section titled “Path Parameters ”ID of the person to retrieve
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.
Request Body required
Section titled “Request Body required ”Person object to be created
object
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.
Path Parameters
Section titled “Path Parameters ”ID of the person to update
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
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.
Path Parameters
Section titled “Path Parameters ”ID of the person to delete
Query Parameters
Section titled “Query Parameters ”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