Skip to content

Groups

What is it?

One group is an organization mechanism to group entities (workplaces and/or users) and facilitate filters and scale management. The most common case is the Local Group, used to select various workplaces at once in reports and leaf filters.

Why It Matters In Integration

  • Allows you to create operational views: "Filial SP", "Sales Team", "Southern Regions"
  • Facilitates integration with ERP hierarchies (regional, cost centers, business units)
  • Reduces the need to select items individually when filtering reports

Structure

Groups may contain: - Workplaces directly - Other groups (tree structure, like "folders")

Text Only
1
2
3
4
5
6
Grupo: Filiais do Nordeste
├── Grupo: Bahia
│   ├── Local: Salvador - Centro
│   └── Local: Salvador - Litoral
└── Grupo: Pernambuco
    └── Local: Recife - Boa Viagem

Available Operations

Method Endpoint Description
GET /grupos/ List groups
POST /grupos/ Create Group
GET /grupos/{id}/ Get Group
PATCH /grupos/{id}/ Update
DELETE /grupos/{id}/ Remove

Fields

Field Type Required Description
id integer Internal ID
empregador_id integer Employer ID
nome string Group name
descricao string Description
itens array Places and/or child groups
is_active boolean Status

Example: Create Group

Request

HTTP
1
2
3
4
5
6
7
8
9
POST /pontotel/api/v4/grupos/
Authorization: Bearer {token}
Content-Type: application/json

{
  "empregador_id": 42,
  "nome": "Filiais do Sul",
  "descricao": "Agrupa todos os locais das filiais da Região Sul"
}

Response (201 Created)

JSON
1
2
3
4
5
6
7
8
{
  "id": 7,
  "empregador_id": 42,
  "nome": "Filiais do Sul",
  "descricao": "Agrupa todos os locais das filiais da Região Sul",
  "is_active": true,
  "itens": []
}