Salta ai contenuti

Office

Questi contenuti non sono ancora disponibili nella tua lingua.

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

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

Parameters for searching offices

object
filter
object
office_id
string format: uuid
project_id
string format: uuid
name
string
street
string
postal_code
string
region
string
locality
string
country
string
tax_code
string
vat
string
office_type_id
string format: uuid
code
string
project_name
string
project_type
string
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort
string
Allowed values: name code
history
boolean
Example
{
"filter": {
"name": "Headquarters",
"project_name": "My Project"
},
"per-page": 10,
"page": 1,
"sort": "name"
}

List of offices

Array<object>
object
office_id
string format: uuid
project_id
string format: uuid
name
string
description
string
street
string
postal_code
string
region
string
locality
string
country
string
tax_code
string
vat
string
office_type_id
string format: uuid
created_at
integer
updated_at
integer
code
string
office_type_icon
string
Allowed values: office_default construction_site
project_name
string
project_type
string
owned_active
boolean
parent_active
boolean
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
}
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

POST
/v2/office/create

Create a new office by providing the required details.

Office object to be created

object
office_id
required
string
project_id
required
string
name
required
string
description
string
street
string
postal_code
string
region
string
locality
string
country
string
tax_code
string
vat
string
office_type_id
string
created_at
required
integer
updated_at
required
integer
code
string
office_type_icon
required
string
Allowed values: office_default construction_site
Example
{
"name": "Branch Office",
"project_id": "452b7448dce72057574d59f93d456ed0",
"code": "BR-002",
"office_type_icon": "office_default",
"created_at": 1700000002,
"updated_at": 1700000002
}

Office created successfully

object
office_id
required
string
project_id
required
string
name
required
string
description
string
street
string
postal_code
string
region
string
locality
string
country
string
tax_code
string
vat
string
office_type_id
string
created_at
required
integer
updated_at
required
integer
code
string
office_type_icon
required
string
Allowed values: office_default construction_site
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.

id
required
string format: uuid

ID of the office to retrieve

Office found

object
office_id
required
string
project_id
required
string
name
required
string
description
string
street
string
postal_code
string
region
string
locality
string
country
string
tax_code
string
vat
string
office_type_id
string
created_at
required
integer
updated_at
required
integer
code
string
office_type_icon
required
string
Allowed values: office_default construction_site
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

PUT
/v2/office/update/{id}

Update an existing office by its unique ID.

id
required
string format: uuid

ID of the office to update

Office object with updated data

object
office_id
required
string
project_id
required
string
name
required
string
description
string
street
string
postal_code
string
region
string
locality
string
country
string
tax_code
string
vat
string
office_type_id
string
created_at
required
integer
updated_at
required
integer
code
string
office_type_icon
required
string
Allowed values: office_default construction_site
Example
{
"name": "Updated Office",
"code": "HQ-002"
}

Office updated successfully

object
office_id
required
string
project_id
required
string
name
required
string
description
string
street
string
postal_code
string
region
string
locality
string
country
string
tax_code
string
vat
string
office_type_id
string
created_at
required
integer
updated_at
required
integer
code
string
office_type_icon
required
string
Allowed values: office_default construction_site
Example
{
"office_id": "123e4567-e89b-12d3-a456-426655440000",
"name": "Updated Office",
"code": "HQ-002"
}

Office not found

DELETE
/v2/office/delete/{id}

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

id
required
string format: uuid

ID of the office to delete

force
boolean

Force the deletion of the entity and all related entities

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