API Overview
The LogirAI public API is the integration surface for retailers and marketplaces shipping into LATAM. You upload pre-alerts (one per MAWB shipment), look up your MAWBs and guides, and receive lifecycle webhooks as the shipments move through customs and final delivery.
This page is the index. Each section below points to the page with full request/response shapes.
Base URL
https://api.logirai.comThe only unauthenticated endpoint is the liveness probe at /health.
Authentication
One scheme:
| Scheme | Header | Used by |
|---|---|---|
| Company API password | Authorization: Bearer <api_password> | All endpoints under /api/public/pre-alerts/v1/*. |
Webhook deliveries to your endpoint use a separate Bearer secret that you provision with LogirAI — see Webhooks Overview.
Full details, examples, and failure modes: Authentication.
Response format
Most endpoints return a success flag alongside a payload:
{ "success": true, "data": { } }On errors, the envelope is:
{
"success": false,
"error": "validation_failed",
"details": { "field_name": ["message"] }
}error is a stable snake_case machine code — branch on it. See Errors for the full catalog.
CORS and payload limits
- CORS allows any origin and accepts the headers
Content-TypeandAuthorization. - JSON bodies are limited to 10 MB.
- The pre-alert upload endpoint accepts multipart uploads up to 20 MB.
Endpoints
See Pre-Alerts API for full payload shapes.
| Method | Path | Description |
|---|---|---|
POST | /api/public/pre-alerts/v1/upload | Multipart upload (Excel manifest + optional invoice PDF). CL onboarded; PE/AR per-client parser pending. For multi-country use the JSON endpoint. |
POST | /api/manifests/process-pre-alert-json | Canonical-JSON pre-alert (CL/PE/AR). One token, country derived from the manifest destination. |
GET | /api/public/pre-alerts/v1/mawbs | List your last 50 MAWBs with per-status guide counts. |
GET | /api/public/pre-alerts/v1/mawbs/:mawb | Detail of one MAWB plus its guide list. |
GET | /api/public/pre-alerts/v1/guides/:tracking_code | One guide with its event timeline — the per-shipment lookup. |
GET | /health | Liveness probe (public). Returns { status: "ok", timestamp }. |
All Pre-Alerts endpoints require Authorization: Bearer <api_password>.
Webhooks
LogirAI POSTs your endpoint every time one of your shipments changes state — uploaded MAWBs, customs status changes, delivery, exceptions. Single attempt in v1 (no retries). Bearer-secret authenticated.
See Webhooks Overview for the contract and Client Webhooks for the event catalog.