Office
Manage offices and their details, including address, type, and project association.
You can create, update, delete, and search for offices with advanced filtering and pagination.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
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.
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.
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.
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.
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.
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