Skip to content

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
POST
/v2/person/index

Returns a paginated and filterable list of persons.
Use POST to allow complex filters via JSON payload.

Parameters for searching persons

object
filter
object
person_id
string format: uuid
code
string
<= 50 characters
first_name
string
<= 70 characters
last_name
string
<= 70 characters
street
string
<= 255 characters
locality
string
<= 50 characters
postal_code
string
<= 50 characters
region
string
<= 10 characters
sex
string
<= 10 characters
country
string
<= 50 characters
birth_date
string format: date
birth_place
string
<= 150 characters
tax_code
string
<= 30 characters
contract_type
string
is_employee
integer
Allowed values: 0 1
is_prevention_people
integer
Allowed values: 0 1
entity_id
string
project_id
string format: uuid
project_name
string
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: first_name last_name code tax_code birth_date
history
boolean
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"
}

List of persons

Array<object>
object
person_id
string format: uuid
code
string
<= 50 characters
first_name
string
<= 70 characters
last_name
string
<= 70 characters
street
string
<= 255 characters
locality
string
<= 50 characters
postal_code
string
<= 50 characters
region
string
<= 10 characters
sex
string
<= 10 characters
country
string
<= 50 characters
birth_date
string format: date
birth_place
string
<= 150 characters
tax_code
string
<= 30 characters
note
string
contract_type
string
is_employee
integer
Allowed values: 0 1
is_prevention_people
integer
Allowed values: 0 1
entity_id
string
project_id
string format: uuid
project_name
string
related_user
string
owned_active
boolean
parent_active
boolean
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"
}
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

GET
/v2/person/view/{id}

Retrieve a person by its unique ID.

id
required
string format: uuid

ID of the person to retrieve

Person found

object
person_id
string format: uuid
code
string
<= 50 characters
first_name
string
<= 70 characters
last_name
string
<= 70 characters
street
string
<= 255 characters
locality
string
<= 50 characters
postal_code
string
<= 50 characters
region
string
<= 10 characters
sex
string
<= 10 characters
country
string
<= 50 characters
birth_date
string format: date
birth_place
string
<= 150 characters
tax_code
string
<= 30 characters
note
string
contract_type
string
is_employee
integer
Allowed values: 0 1
is_prevention_people
integer
Allowed values: 0 1
entity_id
string
project_id
string format: uuid
project_name
string
related_user
string
owned_active
boolean
parent_active
boolean
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

POST
/v2/person/create

Create a new person by providing the required details.

Person object to be created

object
person_id
required
string
code
string
first_name
required
string
last_name
required
string
street
string
locality
string
postal_code
string
region
string
sex
string
country
string
birth_date
required
string format: date
birth_place
string
tax_code
string
note
string
contract_type
string
is_employee
integer
Allowed values: 0 1
is_prevention_people
integer
Allowed values: 0 1
entity_id
required
string
project_id
required
string
related_user
required
string
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"
}

Person created successfully

object
person_id
required
string
code
string
first_name
required
string
last_name
required
string
street
string
locality
string
postal_code
string
region
string
sex
string
country
string
birth_date
required
string format: date
birth_place
string
tax_code
string
note
string
contract_type
string
is_employee
integer
Allowed values: 0 1
is_prevention_people
integer
Allowed values: 0 1
entity_id
required
string
project_id
required
string
related_user
required
string
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"
}
PUT
/v2/person/update/{id}

Update an existing person by its unique ID.

id
required
string format: uuid

ID of the person to update

Person object with updated data

object
person_id
required
string
code
string
first_name
required
string
last_name
required
string
street
string
locality
string
postal_code
string
region
string
sex
string
country
string
birth_date
required
string format: date
birth_place
string
tax_code
string
note
string
contract_type
string
is_employee
integer
Allowed values: 0 1
is_prevention_people
integer
Allowed values: 0 1
entity_id
required
string
project_id
required
string
related_user
required
string
Example
{
"first_name": "Mario",
"last_name": "Rossi",
"code": "MR002"
}

Person updated successfully

object
person_id
required
string
code
string
first_name
required
string
last_name
required
string
street
string
locality
string
postal_code
string
region
string
sex
string
country
string
birth_date
required
string format: date
birth_place
string
tax_code
string
note
string
contract_type
string
is_employee
integer
Allowed values: 0 1
is_prevention_people
integer
Allowed values: 0 1
entity_id
required
string
project_id
required
string
related_user
required
string
Example
{
"person_id": "person-1",
"first_name": "Mario",
"last_name": "Rossi",
"code": "MR002"
}

Person not found

DELETE
/v2/person/delete/{id}

Delete a person by its unique ID.
If force=true, all related entities will also be deleted.

id
required
string format: uuid

ID of the person to delete

force
boolean

Force the deletion of the entity and all related entities

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