# Upaya Tracking API & MCP

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

Query live **Upaya** (`upaya`) package status and scan history in a single synchronous `GET` request or MCP tool call. `lastscanned` auto-detects these numbers.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `upaya` |
| **Brand aliases** | Upaya, Upaya Nepal, Upaya Logistics, upaya.com.np |
| **Category** | Regional (last-mile courier, Nepal) |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=KTMKTM8304-1658055,...` |
| **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`)** | `/^[A-Z]{6}\d{4}-\d{7}$/` | none | `KTMKTM8304-1658055` |
| **Pass 2 (`mayMatch`)** | none | none | none |

Upaya's `KTMKTM…-…` codes belong to Upaya alone, so `?carrier=upaya` is optional. The dash is kept (it is added back if left out).

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "upaya",
  "trackingNumber": "KTMKTM8304-1658055",
  "status": "delivered",
  "statusDescription": "Delivered",
  "service": "Door to Door Delivery",
  "deliveredAt": "2026-03-12T10:20:00Z",
  "deliveredAtLocal": "2026-03-12T16:05:00",
  "signedBy": null,
  "destination": {
    "city": "Lazimpat",
    "state": null,
    "country": "NP"
  },
  "events": [
    {
      "timestamp": "2026-03-12T10:20:00Z",
      "localTime": "2026-03-12T16:05:00",
      "status": "delivered",
      "description": "Delivered",
      "location": "Kathmandu Hub",
      "code": null
    },
    {
      "timestamp": "2026-03-12T05:10:00Z",
      "localTime": "2026-03-12T10:55:00",
      "status": "out_for_delivery",
      "description": "Out for delivery",
      "location": "Kathmandu Hub",
      "code": null
    },
    {
      "timestamp": "2026-03-11T09:00:00Z",
      "localTime": "2026-03-11T14:45:00",
      "status": "label_created",
      "description": "Order created",
      "location": "Kathmandu Hub",
      "code": null
    }
  ]
}
```

## Notes

- **Format**: the code is `<6 letters><4 digits>-<7 digits>`; the dash is part of the number.
- **Time zone**: Nepal is UTC+05:45 (no DST); the page gives UTC times, shown here in Nepal time. A scan's `Title: detail` line (for example `Pickup Process: Failed pickup`) is the description.

## Related Resources

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