Home App Wiki API Wiki About us Login Registrieren

Alice API Documentation

Welcome to the Alice API documentation. This API allows you to programmatically access your organization's data, manage rows, and integrate AI insights into your own applications.

Authentication

All API requests must be authenticated using your Organization's API credentials. You can generate these keys in the Organization Admin Panel.

Headers

Include the following headers with every request:

Header Description Example
X-API-KEY Your public Access Key ak_a1b2c3d4...
X-API-SECRET Your private Secret Key sk_9z8y7x6w...

GET /api/external/test/

Test your authentication credentials and retrieve basic organization info.

Response Example
{
  "message": "Authentication successful",
  "organization": "Acme Corp",
  "tier": "Enterprise"
}

GET /api/v1/rows/

Retrieve a paginated list of all saved rows (insights) for your organization.

Parameters
Parameter Type Description
page integer Page number (default: 1)
q string Search query (filters provider, topic, content, commercial rating, source, etc.)
Response Example
{
  "rows": [
    {
      "id": 123,
      "anbieter": "Microsoft",
      "thema": "Licensing Update",
      "date": "2025-10-15",
      "created_by": "john.doe"
    }
  ],
  "count": 50,
  "has_next": true,
  "next_page": 2
}

GET /api/v1/rows/<id>/

Retrieve full details, including AI analysis and specific fields like commercial rating and source passages.

Response Example
{
  "id": 123,
  "anbieter": "Microsoft",
  "thema": "Licensing Update",
  "eindeutige_id": "MSG-2025-001",
  "bewertung_kommerziell": "High Impact",
  "vorteil_nachteil_detail": "Price increase of 15% effective next year.",
  "datum_kommunikation": "2025-10-01",
  "datum_inkrafttretens": "2026-01-01",
  "quellenpassus": "Source: Official Blog Post...",
  "details_markdown": "## Detailed Analysis...",
  "enhanced_information": "## AI Summary...",
  "created_at": "2025-10-15T10:30:00Z",
  "created_by": "john.doe"
}

PUT / PATCH /api/v1/rows/<id>/

Update an existing row's content. All fields are optional (partial update).

Payload (JSON)
Field Type Description
anbieter string Provider name (e.g. "SAP")
thema string Short topic or subject
eindeutige_id string Unique Identifier (e.g. "ID-123")
bewertung_kommerziell string Commercial rating (e.g. "Neutral", "Critical")
vorteil_nachteil_detail string Detailed description of pros/cons
datum_kommunikation string Date of communication
datum_inkrafttretens string Effective date
quellenpassus string Source text or excerpt
details_markdown string Full content in Markdown format
Response Example
{
  "message": "Row updated",
  "id": 123
}

DELETE /api/v1/rows/<id>/

Permanently delete a specific row.

Response Example
{
  "message": "Row deleted successfully"
}

POST /api/v1/chat/

Interact with ALICE programmatically. Send prompts, optional context (existing rows), and receive an AI generated response. If the AI detects structured data in the response, it will automatically create new rows which are returned in the response.

Payload
Field Type Description
prompt string Required. The user instruction or question.
context_ids array[int] List of Row IDs to include as context for the AI.
model_type string 'standard' or 'pro' (default: 'standard')
Response Example
{
  "response": "Here is the analysis based on the provided data...",
  "new_rows": [
    {
       "id": 205, 
       "anbieter": "New Vendor", 
       "thema": "Analysis Result"
    }
  ],
  "is_question": false,
  "tokens_used": 1420
}

POST /api/create-sentinel/<int:row_id>/

Creates a new "Sentinel" routine based on an existing row. This sets up a recurring automated check (monthly) for the supplier or topic in the specified row.

Parameters
Param / Field Type Location Description
row_id int URL Path Required. The ID of the row to base the sentinel on.
Response Example
{
  "status": "success",
  "message": "Sentinel created for Row #123"
}