Office
Represents company offices or locations, both physical and non-physical sites, with details such as address and type.
Each office is associated with a specific Project
, allowing organizational structure and resource allocation to be clearly defined.
- 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/office/index
Returns a paginated and filterable list of offices. Use POST to allow complex filters via JSON payload.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching offices
object
object
Example
{ "filter": { "name": "Headquarters", "project_name": "My Project" }, "per-page": 10, "page": 1, "sort": "name"}
Responses
Section titled “ Responses ”List of offices
object
Example
{ "office_id": "123e4567-e89b-12d3-a456-426655440000", "name": "Headquarters", "project_id": "452b7448dce72057574d59f93d456ed0", "code": "HQ-001", "office_type_icon": "office_default", "created_at": 1700000000, "updated_at": 1700000001}
Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
create
Section titled “create” POST /v2/office/create
Create a new office by providing the required details.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Office object to be created
object
Example
{ "name": "Branch Office", "project_id": "452b7448dce72057574d59f93d456ed0", "code": "BR-002", "office_type_icon": "office_default", "created_at": 1700000002, "updated_at": 1700000002}
Responses
Section titled “ Responses ”Office created successfully
object
Example
{ "office_id": "223e4567-e89b-12d3-a456-426655440000", "name": "Branch Office", "project_id": "452b7448dce72057574d59f93d456ed0", "code": "BR-002", "office_type_icon": "office_default", "created_at": 1700000002, "updated_at": 1700000002}
GET /v2/office/view/{id}
Retrieve an office by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the office to retrieve
Responses
Section titled “ Responses ”Office found
object
Example
{ "office_id": "123e4567-e89b-12d3-a456-426655440000", "name": "Headquarters", "project_id": "452b7448dce72057574d59f93d456ed0", "code": "HQ-001", "office_type_icon": "office_default", "created_at": 1700000000, "updated_at": 1700000001}
Office not found
update
Section titled “update” PUT /v2/office/update/{id}
Update an existing office by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the office to update
Request Body required
Section titled “Request Body required ”Office object with updated data
object
Example
{ "name": "Updated Office", "code": "HQ-002"}
Responses
Section titled “ Responses ”Office updated successfully
object
Example
{ "office_id": "123e4567-e89b-12d3-a456-426655440000", "name": "Updated Office", "code": "HQ-002"}
Office not found
delete
Section titled “delete” DELETE /v2/office/delete/{id}
Delete an office 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 office to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”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