Solinftec Integration
How to connect a Solinftec source to Colmeia and fetch operations, weather, and refueling data over the HTTP API. For the endpoint-by-endpoint field reference, see Solinftec API reference.
Overview
Your application (HTTP)
│ GET /api/sl/data/{tenant_id}/... Bearer <tenant-secret>
▼
Colmeia middleware (HTTP proxy)
│ Solinftec SCDI API (token managed for you)
▼
Solinftec SCDI platform
The Colmeia middleware is an HTTP proxy in front of Solinftec's SCDI platform. It owns Solinftec token rotation, per-day fan-out, and response merging — you never manage Solinftec tokens. You call one Colmeia endpoint with a date range and get a single merged result back.
1. Connection setup
A tenant must be connected before data can be fetched.
curl -X POST https://app.colmeia.agr.br/api/integrations/{tenant_id}/connect \
-H "Content-Type: application/json" \
-b "session=<manager-session-cookie>" \
-d '{
"provider": "solinftec",
"username": "alvaro_ribeiro",
"password": "YOUR_PASSWORD",
"auto_renew": true
}'
Response:
{ "success": true, "data": { "provider": "solinftec", "connected": true, "expires_at": 2092433279, "auto_renew": true } }
Credentials are exchanged for a Solinftec token and are not stored in plaintext. The middleware re-authenticates automatically when the token chain breaks.
Check status:
curl "https://app.colmeia.agr.br/api/data/{tenant_id}/connections" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
Revoke:
curl -X POST https://app.colmeia.agr.br/api/integrations/{tenant_id}/tokens/revoke \
-H "Content-Type: application/json" \
-b "session=<manager-session-cookie>" \
-d '{"provider":"solinftec"}'
2. HTTP API
Base URL: https://app.colmeia.agr.br/api/sl
Auth header: Authorization: Bearer <tenant-secret>
All three endpoints accept a dateini/datefim date range. The middleware fans out one Solinftec pull per day internally, with bounded concurrency, and returns the merged result:
{ "data": [...], "days": 7, "total_rows": 294 }
Endpoints
| Endpoint | Data |
|---|---|
GET /data/{tenant_id}/operations | Field operation details (hourly, with text descriptions) |
GET /data/{tenant_id}/weather | Meteorological data (hourly: rainfall, wind, temperature) |
GET /data/{tenant_id}/refueling | Train refueling records (fuel volume, hourmeter) |
Common parameters
| Parameter | Format | Notes |
|---|---|---|
dateini | DD/MM/YYYY or DD/MM/YYYY HH:MM:SS | Start date, inclusive |
datefim | DD/MM/YYYY or DD/MM/YYYY HH:MM:SS | End date, inclusive |
size | integer | Records per day per internal page (default 1000) |
/operations also accepts: equipamento, operacao, operador, unidade, talhao, ordemservico.
/weather and /refueling accept a legacy ?date=DD/MM/YYYY for single-day queries (backward compatibility).
Date cap
A single HTTP call is capped at 92 days (dateini..datefim). Ranges beyond
that are rejected with invalid_date_range — split a longer window into
sequential calls on your side.
Examples
# One week of operations
curl "https://app.colmeia.agr.br/api/sl/data/ribeiro/operations?dateini=10/09/2024&datefim=16/09/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
# 10 days of weather
curl "https://app.colmeia.agr.br/api/sl/data/ribeiro/weather?dateini=01/11/2024&datefim=10/11/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
# 10 days of refueling
curl "https://app.colmeia.agr.br/api/sl/data/ribeiro/refueling?dateini=01/02/2024&datefim=10/02/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
Error reference
| HTTP | error | Meaning |
|---|---|---|
| 400 | missing_date_range | dateini or datefim missing |
| 400 | invalid_date_range | Date parse failure, dateini > datefim, or range > 92 days |
| 400 | missing_date | date missing on legacy single-day path |
| 401 | no_token_found | Tenant not connected |
| 401 | no_refresh_token | Token row exists but credentials were not stored |
| 502 | solinftec_auth_failed | Solinftec API unreachable during connect |
| 401 | invalid_solinftec_credentials | Wrong username or password |
| 502 | solinftec_fetch_failed | Upstream error during ranged fan-out |
| 500 | Solinftec error body | Upstream SCDI error (legacy single-date path) |
See also: Solinftec API reference.