Solinftec Integration
Overview
Access field operations, refueling, and meteorological data from the Solinftec SCDI platform through the Colmeia middleware. Your Solinftec account is connected to your tenant by MT2Data — you only need your tenant bearer secret to make requests.
All three endpoints accept a dateini/datefim range. The middleware fans out one internal fetch per day and returns the full merged result in a single call.
Base URL: https://app.colmeia.agr.br/api/sl
Authentication
All data routes require your tenant bearer secret:
Authorization: Bearer <tenant-secret>
The middleware handles Solinftec's rotating short-lived tokens automatically. No manual token management is needed on your side.
Ranged Requests
Pass dateini and datefim to fetch multiple days in a single call. The response shape is:
{ "data": [...], "days": 7, "total_rows": 294 }
The middleware hard cap is 92 days per single HTTP request. Ranges beyond that are rejected with invalid_date_range — split a longer window into sequential calls on your side.
Operation Details
Endpoint: GET /api/sl/data/:tenantId/operations
Returns field operation history with text descriptions alongside numeric codes.
Query Parameters:
| Parameter | Required | Format | Description |
|---|---|---|---|
dateini | Yes | DD/MM/YYYY or DD/MM/YYYY HH:MM:SS | Start date (inclusive) |
datefim | Yes | DD/MM/YYYY or DD/MM/YYYY HH:MM:SS | End date (inclusive); max 92 days |
size | No | integer | Records per page per day (default: 1000) |
equipamento | No | string | Filter by equipment code |
operacao | No | string | Filter by operation code |
operador | No | string | Filter by operator code |
unidade | No | string | Filter by unit code |
talhao | No | string | Filter by field (talhão) code |
ordemservico | No | string | Filter by work order |
# Fetch one week of operations
curl "https://app.colmeia.agr.br/api/sl/data/YOUR_TENANT_ID/operations?dateini=10/09/2024&datefim=16/09/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
Response:
{
"data": [
{
"cd_id": 12345,
"dt_movimentacao": "10/09/2024 00:00:00",
"cd_equipamento": "T001",
"desc_equipamento": "Equipment description",
"cd_operacao": "101",
"desc_operacao": "Operation description",
"cd_operador": "OP01",
"desc_operador": "Operator name",
"vl_consumo": 45.2
}
],
"days": 7,
"total_rows": 294
}
Train Refueling
Endpoint: GET /api/sl/data/:tenantId/refueling
Returns fuel volume dispensed and hourmeter readings. Returns all active trains — no per-train filtering.
Query Parameters — ranged (preferred):
| Parameter | Required | Format | Description |
|---|---|---|---|
dateini | Yes* | DD/MM/YYYY | Start date (inclusive) |
datefim | Yes* | DD/MM/YYYY | End date (inclusive); max 92 days |
size | No | integer | Records per page per day (default: 1000, max: 10000) |
Query Parameters — legacy single date:
| Parameter | Required | Format | Description |
|---|---|---|---|
date | Yes* | DD/MM/YYYY | Date to query (single day) |
page | No | integer | Page number (default: 1) |
size | No | integer | Records per page (default: 1000, max: 10000) |
*Use either dateini/datefim or date, not both.
# Ranged (recommended)
curl "https://app.colmeia.agr.br/api/sl/data/YOUR_TENANT_ID/refueling?dateini=01/02/2024&datefim=10/02/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
# Legacy single date
curl "https://app.colmeia.agr.br/api/sl/data/YOUR_TENANT_ID/refueling?date=10/02/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
Meteorological Data
Endpoint: GET /api/sl/data/:tenantId/weather
Returns hourly climate metrics (rainfall, wind speed, temperature, humidity).
Query Parameters — ranged (preferred):
| Parameter | Required | Format | Description |
|---|---|---|---|
dateini | Yes* | DD/MM/YYYY | Start date (inclusive) |
datefim | Yes* | DD/MM/YYYY | End date (inclusive); max 92 days |
size | No | integer | Records per page per day (default: 1000) |
Query Parameters — legacy single date:
| Parameter | Required | Format | Description |
|---|---|---|---|
date | Yes* | DD/MM/YYYY | Date to query (single day) |
page | No | integer | Page number (default: 1) |
size | No | integer | Records per page (default: 1000) |
*Use either dateini/datefim or date, not both.
# Ranged (recommended)
curl "https://app.colmeia.agr.br/api/sl/data/YOUR_TENANT_ID/weather?dateini=01/11/2024&datefim=07/11/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
# Legacy single date
curl "https://app.colmeia.agr.br/api/sl/data/YOUR_TENANT_ID/weather?date=02/11/2024" \
-H "Authorization: Bearer YOUR_TENANT_SECRET"
Error Codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | missing_date_range | dateini or datefim not provided when using the ranged path |
| 400 | invalid_date_range | Date parse failure, dateini > datefim, or range exceeds 92 days |
| 400 | missing_date | date not provided on legacy single-day path (refueling / weather) |
| 401 | no_token_found | Your Solinftec account is not connected — contact MT2Data |
| 502 | solinftec_fetch_failed | Upstream error during ranged fan-out |