Skip to main content

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​

NameInTypeRequiredDescription
idpathstringYesID or name of the area

Responses​

  • 200: Success

Update area​

PUT /public/v2/areas/{id}

Parameters​

NameInTypeRequiredDescription
idpathstringYes

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​

NameInTypeRequiredDescription
idpathstringYes

Responses​

  • 200: Deleted