NicoChatNicoChatDocsSearch the docs…
Sign in

Pacto Soluções

Pacto Soluções is the NicoApp that integrates with Pacto, the gym management system (a competitor of EVO/W12). With it, your flow queries and registers clients and records notes.

2026-08-12
Note
Available in the NicoApps tab. Basis of the integration: official Pacto API, via the gateway apigw.pactosolucoes.com.br.

How to obtain the credential (token)

Unlike EVO (username + password via Basic Auth), Pacto uses a single token, entered in the Credencial API field during app installation. According to the app's own registration, the path to generate this credential is:

  • In the Pacto system, open the ADM module.
  • Go to Configurações → Integrações → ADM → API Sistema Pacto.
  • Click Gerar Credencial to create the integration token.
  • Copy the generated value and paste it into the Credencial API field when installing the Pacto Soluções NicoApp.

This credential is sent automatically by NicoChat in every action of the app (all actions have token authentication enabled) — there is no need to configure an authentication header in each individual action.

Warning
Pacto does not publish public documentation detailing this process step by step. The path above reflects the configuration already registered in this app; if the menu has changed, confirm with Pacto support (fale@pactosolucoes.com.br / (62) 3414-0314) or with the gym's account manager.

Limitations and plan requirements

Warning
Pacto does not publicly disclose the commercial plan/module requirement or the request limit (rate limit) for the API. Confirm with Pacto support or your account manager before sizing a customer service channel in production.
  • When installing and testing: start with a few actions and watch the meta field returned by the API (mapped internally and used in error handling) — limit or usage-blocking messages usually appear there, as do HTTP 429 (too many requests) or 401/403 (invalid credential or without permission) errors.
  • Commercial modules: since the Pacto system is modular, API access may depend on a module/add-on contracted separately — just as EVO requires the Black plan. Validate this with Pacto before promising the integration to a client.

What the NicoApp does

The actions below are the ones published in the app catalog (organized in the same folders used in the editor: Leads & Dados de Contato and Dados de Alunos).

Leads & Dados de Contato

Action
What it does
Endpoint
Main inputs
Outputs
Consultar Informações de Clientes (Filtros)
Returns clients based on e-mail or CPF
GET /psec/clientes/consultarClienteJson
Business Id (required, dynamic select); E-mail, CPF (optional, at least one recommended)
ID do Cliente, N° Matrícula, Data de Nascimento, Situação Atual, E-mail, Telefone, CPF (first in the list) + Todos os Clientes Listados (JSON)
Consultar Cliente por ID
Returns the client's data by ID
GET /v1/cliente/{codigo}
ID do Cliente (required)
Nome, N° Matrícula, Situação Atual, CPF, Telefones (array), Data de Nascimento, E-mails (array), Todas as Informações (JSON)
Incluir Cliente
Registers a client as a Visitor in the company
POST /v2/cliente
Business Id, Nome Completo, CPF, Celular (required); N° Matrícula, Gênero, Data de Nascimento (optional)
ID do Cliente, Situação Atual, Todas as Informações (JSON)
Inserir Observações no Cliente
Records a note in the client's registration
POST /cliente/gravarobservacao
Business Id, N° Matrícula, Observação (required)
ID da Observação
Buscar Histórico de Presença
Gets classes attended, classes in the month and consecutive weeks of attendance
GET /cliente/historico-presenca
Business Id, N° de Matrícula (required)
Histórico (JSON)
Obter Informações do Plano do Cliente
Returns the client's current plan
GET /clientes/{matricula}/dados-plano
N° de Matrícula (required)
Todas as Informações (JSON), Nome do Plano, Situação Atual, Vínculos, Possui GymPass, Possui TotalPass

Dados de Alunos

Action
What it does
Endpoint
Main inputs
Outputs
Obter Objetivos do Aluno
Lists the student's registered goals
GET /alunoTurma/objetivos/{matricula}
Business Id, N° de Matrícula (required)
Objetivos (JSON)
Obter Parcelas em Aberto
Lists the student's outstanding installments (status "EA", ignores remittance and fine/interest)
GET /parcelas/by-matricula/{matricula}
N° da Matrícula (required)
Parcelas em Aberto (JSON)
Obter Saldo do Aluno
Returns the current balance of the student's checking account
GET /clientes/{matricula}/saldo-conta-corrente
N° Matrícula (required)
Saldo Atual
Note
In development: the app editor has a tenth Sub Flow, "Atualizar Situação de um Aluno" (planned endpoint /psec/alunos/situacao/{id}), which has not yet been published as an action in the app catalog — today it does not appear in the list of installable actions. Before announcing this action to clients, finish the call to the correct endpoint in the Sub Flow editor.

Tips and notes

  • Error handling: when Pacto refuses the call or it fails, the action falls into the action_failed block, fed by the content of $.meta in the response — use the block's error path to handle it in the flow (e.g. invalid credential, enrollment number not found, usage limit reached).
  • Payload cleanup: in write actions (e.g. Incluir Cliente), a JavaScript step removes undefined, null or empty string fields from the payload before assembling the request body — this avoids sending blank keys that the API could reject or interpret incorrectly.
  • N° de Matrícula is the main key: most student query actions (Parcelas, Saldo, Plano, Objetivos, Histórico, Observação) use the Matrícula as the identifier — it comes out of Incluir Cliente/Consultar Cliente and must be saved in a bot variable or in the CRM as soon as it is obtained.
  • Chained ID do Cliente: the ID do Cliente returned by Incluir Cliente or Consultar (Filtros) feeds the Consultar Cliente por ID action.
  • Dynamic Empresa select: the Business Id field loads the options directly from the connected Pacto account (dynamic source "empresas"), chosen once when designing the flow.
  • Save requests: since there is no public confirmation of limits, treat the Pacto API with the same caution recommended for EVO — avoid repeating catalog/status queries on every message and monitor error responses that indicate a usage limit.