> ## Documentation Index
> Fetch the complete documentation index at: https://docs.planeconnection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FBO Endpoints

> API reference for Fixed Base Operator (FBO) endpoints: flight board movements, service orders, fuel orders, customer profiles, and activity logs.

The FBO endpoints manage Fixed Base Operator operations including flight board movements, service orders, fuel orders, customer profiles, and activity logging.

**Base path:** `/api/v1/fbo`

All FBO endpoints require authentication.

## Movements (Flight Board)

Manage inbound, outbound, and on-ground aircraft movements displayed on the FBO flight board.

| Method   | Path             | Description                |
| -------- | ---------------- | -------------------------- |
| `GET`    | `/movements`     | List movements (paginated) |
| `GET`    | `/movements/:id` | Get a single movement      |
| `POST`   | `/movements`     | Create a movement          |
| `PATCH`  | `/movements/:id` | Update a movement          |
| `DELETE` | `/movements/:id` | Delete a movement          |

### List Movements

```bash theme={}
curl -X GET "https://api.planeconnection.com/api/v1/fbo/movements?page=1&page_size=20&status=confirmed&date=2026-04-01" \
  -H "Authorization: Bearer $TOKEN"
```

**Query parameters:**

| Parameter   | Type    | Description                            |
| ----------- | ------- | -------------------------------------- |
| `page`      | integer | Page number (default: 1)               |
| `page_size` | integer | Items per page (default: 20, max: 100) |
| `status`    | string  | Filter by status                       |
| `date`      | string  | Filter by movement date (YYYY-MM-DD)   |
| `search`    | string  | Search by tail number                  |

### Create Movement

```bash theme={}
curl -X POST "https://api.planeconnection.com/api/v1/fbo/movements" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "direction": "inbound",
    "status": "confirmed",
    "tailNumber": "N12345",
    "aircraftType": "Cessna Citation CJ4",
    "movementDate": "2026-04-01",
    "origin": "KJFK",
    "destination": "KTEB",
    "eta": "2026-04-01T14:30:00Z",
    "operator": "Skyline Aviation",
    "pob": 4,
    "customs": "Domestic",
    "parking": "Ramp B-3",
    "isVip": 1
  }'
```

**Direction values:** `inbound`, `outbound`, `on_ground`

**Status values:** `confirmed`, `tentative`, `in_progress`, `completed`, `delayed`, `cancelled`

### Response

```json theme={}
{
  "success": true,
  "data": {
    "id": "mov_abc123",
    "workspaceId": "ws_xyz",
    "direction": "inbound",
    "status": "confirmed",
    "tailNumber": "N12345",
    "aircraftType": "Cessna Citation CJ4",
    "movementDate": "2026-04-01",
    "origin": "KJFK",
    "destination": "KTEB",
    "eta": "2026-04-01T14:30:00Z",
    "operator": "Skyline Aviation",
    "pob": 4,
    "customs": "Domestic",
    "parking": "Ramp B-3",
    "isVip": 1,
    "createdAt": "2026-03-20T10:00:00Z",
    "updatedAt": "2026-03-20T10:00:00Z"
  }
}
```

***

## Service Orders

Manage service requests attached to aircraft movements (hangar, GPU, lavatory, deicing, etc.).

| Method   | Path                  | Description                |
| -------- | --------------------- | -------------------------- |
| `GET`    | `/service-orders`     | List service orders        |
| `GET`    | `/service-orders/:id` | Get a single service order |
| `POST`   | `/service-orders`     | Create a service order     |
| `PATCH`  | `/service-orders/:id` | Update a service order     |
| `DELETE` | `/service-orders/:id` | Delete a service order     |

### Create Service Order

```bash theme={}
curl -X POST "https://api.planeconnection.com/api/v1/fbo/service-orders" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "movementId": "mov_abc123",
    "service": "GPU hookup",
    "status": "pending",
    "assignedTo": "user_xyz",
    "notes": "Aircraft needs GPU power for 2 hours"
  }'
```

**Query parameters:**

| Parameter     | Type   | Description           |
| ------------- | ------ | --------------------- |
| `movement_id` | string | Filter by movement ID |

**Status values:** `pending`, `in_progress`, `completed`, `cancelled`

***

## Fuel Orders

Manage fuel orders for aircraft movements.

| Method   | Path               | Description             |
| -------- | ------------------ | ----------------------- |
| `GET`    | `/fuel-orders`     | List fuel orders        |
| `GET`    | `/fuel-orders/:id` | Get a single fuel order |
| `POST`   | `/fuel-orders`     | Create a fuel order     |
| `PATCH`  | `/fuel-orders/:id` | Update a fuel order     |
| `DELETE` | `/fuel-orders/:id` | Delete a fuel order     |

### Create Fuel Order

```bash theme={}
curl -X POST "https://api.planeconnection.com/api/v1/fbo/fuel-orders" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "movementId": "mov_abc123",
    "fuelType": "Jet-A",
    "quantity": 250,
    "pricePerGallon": 6.50,
    "total": 1625.00,
    "status": "pending",
    "truckId": "truck_01"
  }'
```

**Query parameters:**

| Parameter     | Type   | Description           |
| ------------- | ------ | --------------------- |
| `movement_id` | string | Filter by movement ID |

**Status values:** `pending`, `in_progress`, `completed`, `cancelled`

***

## Customer Profiles

Manage FBO customer profiles, loyalty tiers, and fuel discounts.

| Method   | Path             | Description                   |
| -------- | ---------------- | ----------------------------- |
| `GET`    | `/customers`     | List customers (paginated)    |
| `GET`    | `/customers/:id` | Get a single customer profile |
| `POST`   | `/customers`     | Create a customer profile     |
| `PATCH`  | `/customers/:id` | Update a customer profile     |
| `DELETE` | `/customers/:id` | Delete a customer profile     |

### Create Customer Profile

```bash theme={}
curl -X POST "https://api.planeconnection.com/api/v1/fbo/customers" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Skyline Aviation LLC",
    "loyaltyTier": "platinum",
    "fuelDiscountPct": 5,
    "preferences": "Prefers Ramp A, requires GPU on arrival",
    "notes": "VIP operator, direct billing approved"
  }'
```

**Query parameters:**

| Parameter   | Type    | Description                            |
| ----------- | ------- | -------------------------------------- |
| `page`      | integer | Page number (default: 1)               |
| `page_size` | integer | Items per page (default: 20, max: 100) |
| `search`    | string  | Search by customer name                |

***

## Activity Log

An append-only log of events related to movements (arrivals, departures, services, fuel, notes, status changes).

| Method | Path            | Description                  |
| ------ | --------------- | ---------------------------- |
| `GET`  | `/activity-log` | List activity log entries    |
| `POST` | `/activity-log` | Create an activity log entry |

### Create Activity Log Entry

```bash theme={}
curl -X POST "https://api.planeconnection.com/api/v1/fbo/activity-log" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "movementId": "mov_abc123",
    "eventType": "arrival",
    "title": "Aircraft arrived at Ramp B-3",
    "description": "N12345 arrived on time, 4 POB"
  }'
```

**Query parameters:**

| Parameter     | Type   | Description           |
| ------------- | ------ | --------------------- |
| `movement_id` | string | Filter by movement ID |

**Event types:** `arrival`, `departure`, `service`, `fuel`, `note`, `status`

<Info>
  The activity log is append-only. Entries cannot be updated or deleted to maintain an accurate
  operational audit trail.
</Info>
