Flic Platform API

Build powerful logistics and transport management applications with the Flic API. Access order management, XRM, document intelligence, and the Wingcard Protocol.

v1.0 • December 2025

Introduction

Welcome to the Flic Platform API documentation. The Flic Platform is a comprehensive solution for transport and logistics management, combining a powerful Laravel backend with responsive React frontends for web and mobile.

🖥️ Flic Cockpit

Web-based interface for dispatchers and administrators. Order management, XRM, and system configuration.

Flic Magic API

Headless backend API powering the entire platform with business logic, database management, and AI services.

📱 Flic Pilot App

Mobile application for drivers to receive Wingcards, execute tasks, and capture data in the field.

Base URL https://app.flicono.ai/api/v1

Architecture

The Flic Platform follows a modern, decoupled architecture with a RESTful API backend and separate frontend applications.

Layer Technology Details
Frontend (Web) React Vite TypeScript Matte Glass UI, Themeable (Dark, Light, Flic Hub)
Frontend (Mobile) React Native Expo Cross-platform for iOS & Android
Backend Laravel PHP 8.3 RESTful API with Nginx
Database MySQL 8.0 Relational database
AI & OCR Google Gemini Document Intelligence and Commander

Authentication

All API requests must be authenticated using a Bearer Token. Include the token in the Authorization header of every request.

Authorization: Bearer YOUR_API_TOKEN

Obtaining a Token

To obtain an API token, send a POST request to the login endpoint with your credentials.

POST /api/v1/auth/login

Authenticate a user and receive an API token.

Request Body

{
  "email": "demo@flicono.ai",
  "password": "your_password"
}

Response

{
  "token": "1|abc123...",
  "user": {
    "id": 1,
    "name": "Demo User",
    "email": "demo@flicono.ai",
    "role": "admin"
  }
}

Wingcard Templates

Wingcard Templates define the structure and fields for task cards sent to drivers. Each template contains a blueprint that specifies required and optional fields.

GET /api/v1/templates

List all Wingcard templates for the current fleet.

Response

{
  "data": [
    {
      "id": 1,
      "uuid": "abc-123-def",
      "name": "Standard-Transport",
      "category": "transport",
      "description": "Standard Transportvorlage",
      "is_active": true,
      "is_default": true,
      "blueprint": {
        "required_fields": ["reference", "pickup_address", "delivery_address"],
        "optional_fields": ["notes", "weight"],
        "field_config": { ... }
      }
    }
  ]
}
POST /api/v1/templates

Create a new Wingcard template.

Request Body

{
  "name": "Express Delivery",
  "category": "express",
  "description": "Template for express deliveries",
  "blueprint": {
    "required_fields": ["reference", "delivery_address", "signature"],
    "optional_fields": ["notes"],
    "field_config": {
      "reference": { "type": "input_text", "label": "Reference Number" },
      "delivery_address": { "type": "address", "label": "Delivery Address" },
      "signature": { "type": "input_signature", "label": "Recipient Signature" },
      "notes": { "type": "input_textarea", "label": "Notes" }
    }
  }
}

Hub Directory (XRM)

The Hub Directory is a unified entity management system for managing customers, drivers, suppliers, and other contacts.

GET /api/v1/hub/entities

List all entities with optional filters.

Query Parameters

ParameterTypeDescription
typestringFilter by entity type: person or organization
rolestringFilter by role: driver, customer, supplier, etc.
searchstringSearch by name, email, or phone
POST /api/v1/hub/entities

Create a new entity (person or organization).

Request Body

{
  "type": "organization",
  "name": "Acme Logistics GmbH",
  "email": "info@acme-logistics.de",
  "phone": "+49 30 12345678",
  "tax_id": "DE123456789",
  "roles": ["customer"]
}

Wingcard Protocol v1.0

The Wingcard Protocol defines the structure of task cards used in the Flic ecosystem. Each Wingcard is based on a template blueprint.

Blueprint Structure

A blueprint is a JSON object with three main parts:

Key Type Description
required_fields Array List of field keys that are mandatory
optional_fields Array List of field keys that are optional
field_config Object Configuration object for each field

Element Types

The following element types are available for use in the field_config:

Information Elements

TypeDescriptionProperties
text_blockBlock of text for instructionslabel, style
key_value_listList of key-value pairslabel, items
alert_boxHighlighted box for noteslabel, severity
map_previewStatic map previewlabel, address

Input Elements

TypeDescriptionProperties
input_textSingle-line text inputlabel, placeholder, is_required
input_textareaMulti-line text inputlabel, placeholder, is_required
input_numberNumeric inputlabel, min, max, is_required
input_selectDropdown selectionlabel, options, is_required
input_confirmationCheckbox/togglelabel, is_required
input_dateDate pickerlabel, is_required
input_photoCamera triggerlabel, is_required
input_signatureDigital signature fieldlabel, is_required
addressComposite address fieldlabel, is_required

Code Examples

JavaScript / Node.js

const API_BASE = 'https://app.flicono.ai/api/v1';
const TOKEN = 'your_api_token';

// Fetch all templates
async function getTemplates() {
  const response = await fetch(`${API_BASE}/templates`, {
    headers: {
      'Authorization': `Bearer ${TOKEN}`,
      'Content-Type': 'application/json'
    }
  });
  return response.json();
}

// Create a new order
async function createOrder(data) {
  const response = await fetch(`${API_BASE}/orders`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)
  });
  return response.json();
}

PHP / Laravel

use Illuminate\Support\Facades\Http;

$apiBase = 'https://app.flicono.ai/api/v1';
$token = 'your_api_token';

// Fetch all hub entities
$response = Http::withToken($token)
    ->get("{$apiBase}/hub/entities", [
        'type' => 'organization',
        'role' => 'customer'
    ]);

$entities = $response->json();

cURL

# Get all templates
curl -X GET "https://app.flicono.ai/api/v1/templates" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"

# Create a new entity
curl -X POST "https://app.flicono.ai/api/v1/hub/entities" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type":"person","name":"John Doe","email":"john@example.com"}'