# HayPost Tracking API & MCP

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

Query live **HayPost** (`haypost`) mail status and scan history in a single synchronous `GET` request or MCP tool call. `lastscanned` auto-detects S10 numbers ending in `AM`.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `haypost` |
| **Brand aliases** | HayPost, Haypost Armenia, Armenia Post, Հայփոստ |
| **Category** | National post (Armenia) |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=RR123456785AM,...` |
| **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`)** | `S10 *AM` with a valid check digit (`/^[A-Z]{2}\d{9}AM$/`) | S10 | `RR123456785AM` |
| **Pass 2 (`mayMatch`)** | none | none | none |

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "haypost",
  "trackingNumber": "CC003145018AM",
  "status": "delivered",
  "statusDescription": "Deliver item (Inb)",
  "service": null,
  "deliveredAt": "2026-03-31T09:54:49Z",
  "deliveredAtLocal": "2026-03-31T13:54:49",
  "signedBy": null,
  "destination": null,
  "events": [
    {
      "timestamp": "2026-03-31T09:54:49Z",
      "localTime": "2026-03-31T13:54:49",
      "status": "delivered",
      "description": "Deliver item (Inb)",
      "location": "Home Delivery Office, Armenia",
      "code": null
    },
    {
      "timestamp": "2026-03-30T13:11:57Z",
      "localTime": "2026-03-30T17:11:57",
      "status": "exception",
      "description": "The notification was sent to the customer: Addressee not available; Scheduled for further action/processing today",
      "location": "Home Delivery Office, Armenia",
      "code": null
    },
    {
      "timestamp": "2026-03-30T11:45:37Z",
      "localTime": "2026-03-30T15:45:37",
      "status": "in_transit",
      "description": "Send item to customs (Inb)",
      "location": "YEREVAN, Armenia",
      "code": null
    }
  ]
}
```

## Notes

- **Source**: the `trackingNumber` endpoint of HayPost's own API (the one its track page calls). A number it rejects ("Not Valid Tracking Number Format") or has no scans for is reported as not found.
- **Time zone**: events in Armenia are read as `Asia/Yerevan` (UTC+4, no DST); events in other countries keep `localTime` only.
- **Customs**: "Send item to customs" and "Return item from customs" are `in_transit` scans, not exceptions.

## Related Resources

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