Areas
It is the area in the organizational structure where the employee belongs. An area can be related to many devices. The devices, in turn, will inherit all users registered in that area. This is used to work with users belonging to an area instead of relating employees directly to all devices all the time.
Endpointsβ
List all areasβ
GET
/public/v2/areas
Responsesβ
- 200: Success
- 401: Unauthorized - Invalid or missing token
Create areaβ
POST
/public/v2/areas
Request Body (application/json)β
{
"area": {
"id": 0,
"name": "string",
"code": "string",
"company_id": 0
}
}
Fields:
- area (object)
Responsesβ
- 201: Created
- 422: Unprocessable Content - Validation errors
Show areaβ
GET
/public/v2/areas/{id}
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes | ID or name of the area |
Responsesβ
- 200: Success
Update areaβ
PUT
/public/v2/areas/{id}
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Request Body (application/json)β
{
"area": {
"id": 0,
"name": "string",
"code": "string",
"company_id": 0
}
}
Fields:
- area (object)
Responsesβ
- 200: OK
Delete areaβ
DELETE
/public/v2/areas/{id}
Parametersβ
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes |
Responsesβ
- 200: Deleted