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:

ParameterRequiredFormatDescription
dateiniYesDD/MM/YYYY or DD/MM/YYYY HH:MM:SSStart date (inclusive)
datefimYesDD/MM/YYYY or DD/MM/YYYY HH:MM:SSEnd date (inclusive); max 92 days
sizeNointegerRecords per page per day (default: 1000)
equipamentoNostringFilter by equipment code
operacaoNostringFilter by operation code
operadorNostringFilter by operator code
unidadeNostringFilter by unit code
talhaoNostringFilter by field (talhão) code
ordemservicoNostringFilter 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):

ParameterRequiredFormatDescription
dateiniYes*DD/MM/YYYYStart date (inclusive)
datefimYes*DD/MM/YYYYEnd date (inclusive); max 92 days
sizeNointegerRecords per page per day (default: 1000, max: 10000)

Query Parameters — legacy single date:

ParameterRequiredFormatDescription
dateYes*DD/MM/YYYYDate to query (single day)
pageNointegerPage number (default: 1)
sizeNointegerRecords 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):

ParameterRequiredFormatDescription
dateiniYes*DD/MM/YYYYStart date (inclusive)
datefimYes*DD/MM/YYYYEnd date (inclusive); max 92 days
sizeNointegerRecords per page per day (default: 1000)

Query Parameters — legacy single date:

ParameterRequiredFormatDescription
dateYes*DD/MM/YYYYDate to query (single day)
pageNointegerPage number (default: 1)
sizeNointegerRecords 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

HTTPCodeMeaning
400missing_date_rangedateini or datefim not provided when using the ranged path
400invalid_date_rangeDate parse failure, dateini > datefim, or range exceeds 92 days
400missing_datedate not provided on legacy single-day path (refueling / weather)
401no_token_foundYour Solinftec account is not connected — contact MT2Data
502solinftec_fetch_failedUpstream error during ranged fan-out