Skip to content

PersonOffice

Defines the assignment of people to offices, enabling access and resource management within those.

Version
2.0.0
OpenAPI version
3.0.0

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

Security scheme type: apiKey

Query parameter name: access-token

POST
/v2/person-office/index

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

Parameters for searching person offices

object
filter
object
person_office_id
string
office_id
string format: uuid
person_id
string format: uuid
project_id
string format: uuid
person_code
string
person_first_name
string
person_last_name
string
person_is_employee
boolean
person_is_external
boolean
person_street
string
person_locality
string
person_postal_code
string
person_region
string
person_country
string
person_birth_date
string
person_birth_place
string
person_tax_code
string
person_contract_type
string
person_entity_id
string
person_sex
string
project_name
string
office_code
string
office_name
string
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: person_code person_first_name person_last_name person_birth_date person_tax_code
history
boolean
Example
{
"filter": {
"person_first_name": "Mario",
"person_last_name": "Rossi"
},
"per-page": 50,
"page": 2,
"sort": "-person_tax_code"
}

List of person offices

Array<object>
object
person_office_id
string
office_id
string format: uuid
person_id
string format: uuid
project_id
string format: uuid
person_code
string
person_first_name
string
person_last_name
string
person_is_employee
boolean
person_is_external
boolean
person_street
string
person_locality
string
person_postal_code
string
person_region
string
person_country
string
person_birth_date
string
person_birth_place
string
person_tax_code
string
person_note
string
person_contract_type
string
person_entity_id
string
person_sex
string
project_name
string
project_type
string
office_code
string
office_name
string
owned_active
boolean
parent_active
boolean
Example
{
"person_office_id": "po-1",
"office_id": "off-1",
"person_id": "person-1",
"project_id": "proj-1",
"person_code": "MR001",
"person_first_name": "Mario",
"person_last_name": "Rossi",
"person_birth_date": "1980-01-01",
"office_name": "Main Office",
"project_name": "Project X"
}
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-office/view/{id}

Retrieve a person office by its unique ID.

id
required
string format: uuid

ID of the person office to retrieve

Person office found

object
person_office_id
string
office_id
string format: uuid
person_id
string format: uuid
project_id
string format: uuid
person_code
string
person_first_name
string
person_last_name
string
person_is_employee
boolean
person_is_external
boolean
person_street
string
person_locality
string
person_postal_code
string
person_region
string
person_country
string
person_birth_date
string
person_birth_place
string
person_tax_code
string
person_note
string
person_contract_type
string
person_entity_id
string
person_sex
string
project_name
string
project_type
string
office_code
string
office_name
string
owned_active
boolean
parent_active
boolean
Example
{
"person_office_id": "po-1",
"office_id": "off-1",
"person_id": "person-1",
"project_id": "proj-1",
"person_code": "MR001",
"person_first_name": "Mario",
"person_last_name": "Rossi",
"person_birth_date": "1980-01-01",
"office_name": "Main Office",
"project_name": "Project X"
}

Person office not found

POST
/v2/person-office/create

Create a new person office by providing the required details.

Person office object to be created

object
person_office_id
required
string
office_id
required
string
person_id
required
string
project_id
required
string
Example
{
"office_id": "off-2",
"person_id": "person-2",
"project_id": "proj-2"
}

Person office created successfully

object
person_office_id
required
string
office_id
required
string
person_id
required
string
project_id
required
string
Example
{
"person_office_id": "po-2",
"office_id": "off-2",
"person_id": "person-2",
"project_id": "proj-2"
}
PUT
/v2/person-office/update/{id}

Update an existing person office by its unique ID.

id
required
string format: uuid

ID of the person office to update

Person office object with updated data

object
person_office_id
required
string
office_id
required
string
person_id
required
string
project_id
required
string
Example
{
"office_id": "off-1",
"project_id": "proj-3"
}

Person office updated successfully

object
person_office_id
required
string
office_id
required
string
person_id
required
string
project_id
required
string
Example
{
"person_office_id": "po-1",
"office_id": "off-1",
"project_id": "proj-3"
}

Person office not found

DELETE
/v2/person-office/delete/{id}

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

id
required
string format: uuid

ID of the person office to delete

force
boolean

Force the deletion of the entity and all related entities

Person office 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