NicoChatNicoChatDocsSearch the docs…
Sign in

SolarMarket

SolarMarket is a CRM for solar energy companies (sales funnels, clients and projects). This NicoApp integrates NicoChat with the SolarMarket v2 API (https://business.solarmarket.com.br).

2026-08-12

1. How to get the credentials

API access is not made directly with the key copied from the panel — it first has to be exchanged for an access token. The full process has two parts:

1.1. Get the API Key in the SolarMarket panel

Copy the API Key. It comes in the id:secret format, for example 204:OllF5qWhVH7HGMasvkNaNxIYqDU9XakPVJ9zKdoC.

Attention
This key is not used directly in the Client/Project/Funnel calls. It only serves to get a temporary access token, as shown in the step below.

1.2. Exchange the key for an access token

The NicoApp stores the key copied above in a variable and, before any action (Create Client, Create Project, etc.), it goes through an internal Authentication Sub Flow that:

  • Makes a POST https://business.solarmarket.com.br/api/v2/auth/signin sending the key in the body:
  • The API responds with an access_token, which is then sent as Authorization: Bearer {access_token} in all the following calls.
  • The NicoApp keeps this token cached for about 5 hours (it stores the time of the last authentication and only calls /auth/signin again when that period expires), avoiding the generation of a new token on every action.
Note
The official SolarMarket documentation states that the generated JWT token is valid for 360 minutes (6 hours). The NicoApp uses a slightly shorter cache window (~5h) as a safety margin before the actual expiration.

In practice, for anyone who is only going to use the installed NicoApp, the only manual step is to copy the API Key from the panel and paste it into the NicoApp configuration field in NicoChat — the exchange for a token and the caching happen automatically on every action.

2. Limitations

  • Rate limit: according to the official SolarMarket API documentation (solarmarket.readme.io), to prevent abuse and attacks, requests are limited to 60 requests per minute and 1,800 requests per hour per credential.
  • Token validity: the access token expires in 360 minutes (6h); the NicoApp renews it automatically once ~5h of cache are completed.
  • Besides the rate limit above, the public SolarMarket documentation does not list other usage restrictions (daily quotas, record limit per call, etc.).

3. What the NicoApp does

The NicoApp exposes 9 actions for direct use in conversation flows. Two additional pieces exist only as internal support and do not appear as a selectable action: Authentication (exchange of the key for a token, described above) and Get Step by Name (a utility called by "Get Steps of a funnel" to resolve the name of a step into its ID).

Action
Method / Endpoint
What it does
Main fields
Get Steps of a funnel
GET /api/v2/funnels
Finds the funnel by ID and returns its steps (stages); if the name of a step is provided, it resolves to the corresponding ID (or it accepts the numeric ID directly)
Funnel ID, Step name/ID
Create Client
POST /api/v2/clients
Creates a new client in the CRM
name, company, cnpjCpf, email, primaryPhone, secondaryPhone, zipCode, address, number, complement, neighborhood, city, state, responsibleId, representativeId
Edit Client
PATCH /api/v2/clients/{id}
Updates the fields of an existing client
Same fields as Create Client (only the filled ones are sent)
Get Client by ID
GET /api/v2/clients?id={id}
Queries a client by ID
id
Get Client by Email
GET /api/v2/clients?email={email}
Queries a client by the registered email
email
Delete Client
DELETE /api/v2/clients/{id}
Removes a client
id
Create Project
POST /api/v2/projects
Creates a new project, linking it to an existing client or creating the client along with it
name, description, stageId, responsibleId, representativeId, clientId (or the full client data, if it does not exist yet)
Edit Project
PATCH /api/v2/projects/{id}
Updates the fields of an existing project
name, description, stageId, responsibleId, representativeId
Delete Project
DELETE /api/v2/projects/{id}
Removes a project
id

4. Tips and notes

  • Create Project accepts two ways of use: if a clientId is provided, the project is linked to that already existing client; if no clientId is provided, the NicoApp sends the client data along in the same request and SolarMarket creates client and project at once.
  • Before creating or editing a Project linked to a specific step, use Get Steps of a funnel to resolve the name of the desired step into a valid stageId.
  • To avoid duplicate clients, use Get Client by Email before Create Client — if it already exists, prefer Edit Client.
  • All the actions perform the token exchange automatically; it is not necessary (nor possible) to call the Authentication manually from the flow.
  • Numeric fields such as responsibleId, representativeId, stageId and clientId must be the numeric IDs returned by the API itself (e.g. the client's assignee/representative, or the ID returned when the client is created).