Skip to content

Quick Start

This guide walks the most common path against the LogirAI API: upload a pre-alert, list your MAWBs, look up a single shipment, and (optionally) subscribe to webhooks so you don't have to poll.

Prerequisites

  • A Bearer api_password provisioned by LogirAI for your company.
  • Base URL: https://api.logirai.com.

See Authentication for full detail.

1. Upload a pre-alert

Submit an Excel manifest plus an optional invoice PDF. The MAWB is read from the Excel — you don't pass it as a field.

bash
curl -X POST https://api.logirai.com/api/public/pre-alerts/v1/upload \
  -H "Authorization: Bearer YOUR_COMPANY_API_PASSWORD" \
  -F "manifest_file=@manifest_2026-04.xlsx" \
  -F "invoice_file=@invoice_125-87654321.pdf" \
  -F "flight_number=LA807" \
  -F "origin_airport=HKG" \
  -F "destination_airport=SCL" \
  -F "scheduled_arrival=2026-04-18T14:00:00-03:00"

Response (201 Created):

json
{
  "success": true,
  "manifest_id": "d4e5f6a7-b8c9-0123-4567-89abcdef0123",
  "mawb": "125-87654321",
  "guides_created": 143,
  "rut_invalid_count": 2,
  "warnings": []
}

The endpoint is CL-only in v1. See the Pre-Alerts API for every field, every error, and the optional warnings.

2. List your MAWBs

bash
curl https://api.logirai.com/api/public/pre-alerts/v1/mawbs \
  -H "Authorization: Bearer YOUR_COMPANY_API_PASSWORD"

Returns the 50 most recent MAWBs you've uploaded with per-status guide counts. Use guides_by_status as the at-a-glance signal of batch health.

3. Look up one shipment

This is the per-shipment endpoint — use it whenever a customer asks "where's my package?" or you need to confirm a guide's exact state.

bash
curl https://api.logirai.com/api/public/pre-alerts/v1/guides/LR2026A1B2C3 \
  -H "Authorization: Bearer YOUR_COMPANY_API_PASSWORD"

Returns the guide with its full event timeline (registered → in_transit → customs_released → out_for_delivery → delivered).

Instead of polling /v1/mawbs every few minutes, give us an HTTPS URL and we'll POST you every state change in seconds. Single attempt in v1 — keep polling as a safety net for reconciliation.

See Client Webhooks for the event catalog and payload schemas.

Next steps

LogirAI — Cross-Border Logistics API for Retailers and Marketplaces