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.

Base URL: https://colmeia.mt2data.cloud/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.

Pagination

All three endpoints support page and size query parameters. Each response includes:

FieldDescription
pageCurrent page number
page_sizeRecords per page
total_pagesTotal pages available
dataArray of records

Increment page until page >= total_pages to retrieve all records.


Operation Details

Endpoint: GET /api/sl/data/:tenantId/operations

Returns field operation history with text descriptions alongside numeric codes. Recommended to query one day at a time.

Query Parameters:

ParameterRequiredFormatDescription
dateiniYesDD/MM/YYYY HH:MM:SSStart datetime
datefimYesDD/MM/YYYY HH:MM:SSEnd datetime
pageNointegerPage number (default: 1)
sizeNointegerRecords per page (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
curl "https://colmeia.mt2data.cloud/api/sl/data/YOUR_TENANT_ID/operations?dateini=10/09/2024%2000:00:00&datefim=10/09/2024%2023:59:59" \
  -H "Authorization: Bearer YOUR_TENANT_SECRET"

Response:

{
  "page": 1,
  "page_size": 1000,
  "total_pages": 1,
  "total_rows": 42,
  "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
    }
  ]
}

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:

ParameterRequiredFormatDescription
dateYesDD/MM/YYYYDate to query
pageNointegerPage number (default: 1)
sizeNointegerRecords per page (default: 1000, max: 10000)
curl "https://colmeia.mt2data.cloud/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:

ParameterRequiredFormatDescription
dateYesDD/MM/YYYYDate to query
pageNointegerPage number (default: 1)
sizeNointegerRecords per page (default: 1000)
curl "https://colmeia.mt2data.cloud/api/sl/data/YOUR_TENANT_ID/weather?date=02/11/2024" \
  -H "Authorization: Bearer YOUR_TENANT_SECRET"

Pagination Example

PAGE=1
TOTAL=999

while [ $PAGE -le $TOTAL ]; do
  RESP=$(curl -s "https://colmeia.mt2data.cloud/api/sl/data/YOUR_TENANT_ID/operations?dateini=10/09/2024%2000:00:00&datefim=10/09/2024%2023:59:59&page=$PAGE" \
    -H "Authorization: Bearer YOUR_TENANT_SECRET")
  TOTAL=$(echo $RESP | jq '.total_pages')
  # process $RESP data...
  PAGE=$((PAGE + 1))
done

Error Codes

HTTPCodeMeaning
400missing_date_rangedateini or datefim not provided (operations)
400missing_datedate not provided (refueling / weather)
401no_token_foundYour Solinftec account is not connected — contact MT2Data