integrationis.fun — API Docs

v1.0 · Workshop

About this API

Middleware for the System Integrations (ServiceNow) workshop. Demonstrates REST API calls, Webhooks, Data Enrichment, AI integration and full bi-directional E-bonding.

Base URL: https://integrationis.fun  ·  All endpoints accept and return application/json

Inbound endpoints called by ServiceNow require Authorization: Bearer <token>  ·  Dashboard endpoints do not require auth.

POST /api/create E-bonding OUT: Create ticket in ServiceNow

Partner Portal creates a new incident in ServiceNow via Table API. Returns the ServiceNow sys_id as correlation_id for bi-directional tracking. Auth: not required (called from dashboard).

Request Body (JSON)
{
  "title": "VPN not working in London office",
  "description": "User reports VPN connection drops every 10 minutes."
}
Response (example)
{
  "partner_id": "PTN-1778079657301",
  "correlation_id": "30bbf2b383ac0f106260f6b6feaad3f2",
  "snow_number": "INC0011266",
  "status": "created"
}
POST /api/tickets E-bonding IN: Receive ticket from ServiceNow

ServiceNow pushes a ticket to the Partner Portal via Outbound REST (Business Rule after INSERT). Returns a partner_id as handshake — ServiceNow stores this back as correlation_id. Requires Bearer token.

Request Body (JSON)
{
  "sys_id": "abc123xyz",
  "number": "INC001001",
  "short_description": "Network down in London office",
  "description": "All users in London office unable to access internal systems.",
  "correlation_id": ""
}
Response (example)
{
  "message": "Ticket successfully received by Partner Portal",
  "partner_id": "PTN-1778079123456",
  "correlation_id": "abc123xyz"
}
POST /api/update E-bonding IN: Receive update from ServiceNow

ServiceNow notifies Partner Portal of incident changes (short_description, state, work_notes) via Business Rule after UPDATE. Updates both outbound and inbound records. Requires Bearer token.

Request Body (JSON)
{
  "sys_id": "abc123xyz",
  "correlation_id": "PTN-1778079657301",
  "short_description": "VPN not working — updated",
  "state": "2",
  "work_notes": "Assigned to network team."
}
Response (example)
{
  "message": "Partner ticket updated.",
  "partner_id": "PTN-1778079657301",
  "status": "updated"
}
POST /api/resolve E-bonding: Resolve ticket (both directions)

Resolves a ticket and notifies ServiceNow (PATCH, state: 6). Accepts either sys_id (inbound ticket) or partner_id (outbound ticket). Auth: not required (called from dashboard).

Request Body (JSON)
{
  "sys_id": "abc123xyz",
  "resolution_notes": "Resolved by restarting the network device on the partner side."
}
Response (example)
{
  "status": "resolved",
  "sys_id": "abc123xyz",
  "snow_response": {
    "status": 200,
    "ok": true
  }
}
POST /api/edit E-bonding: Edit ticket fields + sync to ServiceNow

Inline edit of short_description or description from the dashboard. Immediately PATCHes the change to ServiceNow. Accepts sys_id (inbound) or partner_id (outbound). Auth: not required.

Request Body (JSON)
{
  "sys_id": "abc123xyz",
  "short_description": "Updated ticket title",
  "description": "Updated description with more detail."
}
Response (example)
{
  "status": "updated",
  "snow_response": {
    "status": 200,
    "ok": true
  }
}
POST /api/enrich Data Enrichment

Simulates data enrichment with weather and public holiday information for a given location. ServiceNow calls this endpoint to get context before escalating a ticket.

Request Body (JSON)
{
  "incident_number": "INC001001",
  "location": "London"
}
Response (example)
{
  "status": "success",
  "incident_number": "INC001001",
  "location": "London",
  "weather": "London: 15°C, overcast and raining.",
  "holiday": "Today is a Bank Holiday (public holiday)."
}
POST /api/ai LLM Orchestration

Passes the problem description and context (weather, holidays) to an LLM via OpenRouter and returns an automatically generated polite response for the end user.

Request Body (JSON)
{
  "description": "User cannot connect to VPN",
  "context": "London: 15°C, raining. Today is a Bank Holiday."
}
Response (example)
{
  "generated_text": "Dear user, we apologize for the VPN connectivity issue..."
}
GET /api/hr/employees HR Master Data: List all employees

Returns the full employee directory from the mock HR Master Data source. No auth required. ServiceNow can call this to browse available records before doing a targeted lookup.

Response (example)
{
  "count": 8,
  "employees": [
    {
      "id": "EMP001",
      "email": "hero@integrationis.fun",
      "full_name": "Workshop Presenter",
      "department": "IT Operations",
      "job_title": "Integration Architect",
      "location": "London"
    },
    "..."
  ]
}
GET /api/hr/employees/:id HR Master Data: Lookup single employee

Returns one employee record. Accepts either an ID in the path (e.g. /api/hr/employees/EMP001) or an email query parameter (e.g. /api/hr/employees?email=hero@integrationis.fun). Returns 404 if not found.

Response (example)
{
  "id": "EMP001",
  "email": "hero@integrationis.fun",
  "full_name": "Workshop Presenter",
  "department": "IT Operations",
  "job_title": "Integration Architect",
  "manager_email": "thomas.muller@integrationis.fun",
  "location": "London",
  "phone": "+44 20 7946 0101",
  "start_date": "2021-03-15"
}
GET /dashboard Partner Dashboard (UI)

Visual overview of all active tickets. Outbound (Partner → ServiceNow) and Inbound (ServiceNow → Partner) with inline editing and resolve actions. Auto-refreshes every 10s.

Response (example)
← HTML dashboard with ticket tables
GET /logs Activity Log (UI)

Audit trail of all E-bonding events: tickets created, received, updated and resolved. Stores last 200 events. Useful for verifying bi-directional sync during demos.

Response (example)
← HTML activity log page
GET /hr HR Master Data Dashboard (UI)

Visual table of all 8 mock employees from the HR Master Data source. The workshop presenter record (EMP001) is highlighted. Static page — no JavaScript, no auto-refresh.

Response (example)
← HTML employee directory page
GET /checklist Integration Discovery Checklist (UI)

Static checklist of 14 questions across 3 categories (Business, Technical, Responsibility) for scoping integrations in a discovery call. Workshop closing artifact — no JavaScript, print-friendly.

Response (example)
← HTML checklist page