API Documentation

Learn how to integrate with the Lunar Container Tracking API

Quick Start

  1. Create an account and get your API key
  2. Make your first API request
  3. Add containers to tracking with optional email notifications

Base URL

https://lunar.pauz.digital/api

Authentication

All API requests require authentication using an API key in the Authorization header.

API Key Format

API keys are UUID format tokens (e.g., 550e8400-e29b-41d4-a716-446655440000).

Authorization: Bearer your-api-key-uuid

Example Request

curl -X GET \
-H "Authorization: Bearer your-api-key-uuid" \
"https://lunar.pauz.digital/api/tracking"

Container Tracking

Add containers to continuous tracking. The system syncs every 15 minutes and can notify you via email when status changes occur.

Email Notifications

Get notified via email when your container status changes or when the Last Free Day is approaching.

Notification Types

Tracking CreatedSent after initial sync with full container details
Status ChangeSent when LFD, availability, or holds change
LFD ReminderSent 2 days and 1 day before Last Free Day
LFD PassedDaily reminder until container is picked up

Adding Notification Emails

You can add up to 5 email addresses when creating tracking or update them later:

// When creating tracking
{
"terminalCode": "MAH",
"containerNumber": "BEAU5371613",
"notifyEmails": ["dispatch@company.com", "logistics@company.com"]
}
// Update emails later
PATCH /tracking/:trackingId/notify
{
"notifyEmails": ["new@company.com"]
}

Auto-Stop Notifications

Notifications automatically stop when the container is gated out, picked up, or delivered. The system detects this from the transitState field.

Terminal Codes

The API supports 150+ terminal codes across ports and rail yards in North America.

Port Terminals (90+)

Major container ports across North America.

MAH, PNCT, LALB-LBCT, POV-NIT, GPA-GCT...

Rail Terminals (60+)

Intermodal rail yards across the country.

NS-ATLANTA, NS-CHICAGO_47TH, CSX-CHARLOTTE...

Get Terminal List

GET https://lunar.pauz.digital/api/terminals
Response:
{
"success": true,
"count": 156,
"terminals": [
{
"code": "MAH",
"name": "Maher Terminal",
"location": "New Jersey",
"port": "NY/NJ"
},
...
]
}

Error Handling

The API returns standard HTTP status codes and JSON error responses.

Error Response Format

{
"success": false,
"error": {
"code": "TRACKING_LIMIT_EXCEEDED",
"message": "You have reached your tracking limit. Current: 20, Limit: 20",
"current": 20,
"limit": 20,
"upgradeUrl": "/api/auth/plans",
"timestamp": "2026-01-16T10:30:00Z"
}
}

Common Error Codes

CodeHTTPDescription
INVALID_API_KEY401API key is invalid or expired
AUTHENTICATION_REQUIRED401No API key provided
TRACKING_LIMIT_EXCEEDED429Maximum tracked containers reached
INVALID_TERMINAL_CODE400Terminal code not found
INVALID_CONTAINER_FORMAT400Container doesn't match ISO 6346 format
INVALID_EMAIL400Invalid email format in notifyEmails
TOO_MANY_EMAILS400Maximum 5 notification emails allowed
TRACKING_NOT_FOUND404Tracking ID not found or not owned by user