# Envialia (Ontime) Tracking API & MCP

URL: https://docs.lastscanned.com/carriers/envialia

Query live **Envialia (Ontime)** (`envialia`) package status and scan history in a single synchronous `GET` request or MCP tool call. Source: the Envialia mobile app's guest SOAP search (app.ontime.es, buscarEstadoEnvio2).

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `envialia` |
| **Brand aliases** | Envialia, Ontime, Ontime Logistica, Envialia Ontime |
| **Category** | Spanish and Portuguese parcels |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=...,...` |
| **MCP server (`https://mcp.lastscanned.com`)** | `track_package`, `track_packages`, `list_carriers` |
| **Authentication & pricing** | `Authorization: Bearer lsk_live_...` · 1 free keyless lookup/day per IP |

## Tracking Number Formats & Auto-Detection

| Pass | Rule / Regex | Check Digit | Examples |
|---|---|---|---|
| **Pass 1 (`matches`)** | none | none | none |
| **Pass 2 (`mayMatch`)** | none | none | none |

The shape (16 digits (6-digit agency + 10-digit consignment)) is shared with other carriers, so it is not auto-detected: pass `?carrier=envialia`.

## Synchronous `GET` Request & Normalized JSON Response

```bash
curl -s "https://api.lastscanned.com/v1/track/0046950177687999?carrier=envialia" \
  -H "Authorization: Bearer $LASTSCANNED_API_KEY"
```

```json
{
  "carrier": "envialia",
  "trackingNumber": "0046950177687999",
  "status": "delivered",
  "statusDescription": "Entregado",
  "service": null,
  "deliveredAt": null,
  "deliveredAtLocal": "2026-07-08",
  "signedBy": null,
  "destination": {
    "city": "Sevilla",
    "state": null,
    "country": "ES"
  },
  "message": null,
  "events": [
    {
      "timestamp": null,
      "localTime": "2026-07-08",
      "status": "delivered",
      "description": "Entregado",
      "location": "HISPALIS",
      "code": null
    },
    {
      "timestamp": null,
      "localTime": "2026-07-06",
      "status": "in_transit",
      "description": "Envío expedido",
      "location": null,
      "code": null
    }
  ]
}
```

## Notes

- **Summary only**: Envialia's guest search returns the current status and two dates (dispatch, delivery), not a scan list, so `events` holds those milestones. They have a date but no time of day, so `timestamp` is `null`.
- **Not found**: a number the carrier does not know returns `not_found`.

## Related Resources

- **Regex & check digits**: [Tracking number formats & auto-detection](/formats)