# EMS Vietnam Tracking API & MCP

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

Query live **EMS Vietnam** (`emsvietnam`) package status and scan history in a single synchronous `GET` request or MCP tool call.

## Overview & Quick Facts

| Property | Value |
|---|---|
| **Carrier slug (`?carrier=`)** | `emsvietnam` |
| **Brand aliases** | EMS Vietnam, Vietnam EMS, VNPost EMS, ems.com.vn |
| **Category** | Vietnam Post EMS express mail |
| **Single-package REST endpoint** | `GET https://api.lastscanned.com/v1/track/{trackingNumber}` |
| **Batch REST endpoint** | `GET https://api.lastscanned.com/v1/track?numbers=EN059122171VN,EN059122171VN` |
| **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`)** | `/^E[A-Z]\d{9}VN$/` + UPU S10 check digit | UPU S10 | `EN059122171VN` |
| **Pass 2 (`mayMatch`)** | none | none | none |

These shapes belong to EMS Vietnam alone, so `?carrier=emsvietnam` is optional.

## Synchronous `GET` Request & Normalized JSON Response

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

```json
{
  "carrier": "emsvietnam",
  "trackingNumber": "EN059122171VN",
  "status": "delivered",
  "statusDescription": "Phát thành công (Delivered)",
  "service": null,
  "deliveredAt": "2026-01-03T09:49:50Z",
  "deliveredAtLocal": "2026-01-03T16:49:50",
  "signedBy": null,
  "destination": {
    "city": "Đà Nẵng",
    "state": null,
    "country": "VN"
  },
  "events": [
    {
      "timestamp": "2026-01-03T09:49:50Z",
      "localTime": "2026-01-03T16:49:50",
      "status": "delivered",
      "description": "Phát thành công (Delivered)",
      "location": "BCVH Example - Đà Nẵng",
      "code": "EMI"
    },
    {
      "timestamp": "2026-01-03T09:47:05Z",
      "localTime": "2026-01-03T16:47:05",
      "status": "out_for_delivery",
      "description": "Đã giao bưu tá phát - Item out for physical delivery",
      "location": "BCVH Example - Đà Nẵng",
      "code": "EDG"
    },
    {
      "timestamp": "2025-12-24T14:40:00Z",
      "localTime": "2025-12-24T21:40:00",
      "status": "in_transit",
      "description": "Chấp nhận gửi (Posting / Collection)",
      "location": "EMS Example - Hồ Chí Minh",
      "code": "EMA"
    }
  ]
}
```

## Notes

- **Request**: the carrier's API wants the number with `EMS` appended; the adapter adds it.
- **Time zone**: Vietnam time (UTC+7, no DST); `timestamp` is converted from it.
- **Wording**: each scan reads "CODE - Vietnamese (English) (office code: office name)"; the event code goes to `code`, the wording to `description` and the office to `location`. The helpline, address and receiver's name are dropped.
- **Status**: delivery (`EMI`), out for delivery (`EDG`), unsuccessful delivery and return wording map to statuses; cash-collection steps after a delivery stay `delivered`.

## Related Resources

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