Skip to main content
Public Integrator Documentation

Build with QSOEngine REST API & SDK

Integrate multi-format amateur radio log validation, cross-checking, scoring, standings, awards, and live SSE streams into your event portal.

Public vs Internal Docs: This portal covers public integrator APIs and SDK usage. Internal operator/system auto-generated docs remain restricted at /docs (Administrator Console only).

Quick Start

Connect an event portal or custom integration to QSOEngine in three steps.

STEP 01

Use the Universal Base URL

Send REST requests to https://api.qsoengine.1bsh.com/v1 (also mounted at /api/v1).

STEP 02

Register Your Origin

Add your portal domain to allowed_origins in the event's rules.json so browser CORS requests succeed.

STEP 03

Validate, Submit & Stream

Dry-run logs via POST /v1/events/:eventId/validate-log, upload via /logs, and subscribe to live SSE updates.

Authentication, Roles & CORS

Public discovery, dry-run validation, and published standings are accessible without credentials. Organizer and adjudication actions require a Bearer token (Authorization: Bearer <token>) or session cookie issued by POST /v1/auth/login.

Access Level Scope & Behavior
Public Health, status, event list, rules, stateless dry-run validation, log upload (within deadline), received logs, statistics, and published standings/winners.
Optional Admin Respects publish_scores for anonymous callers; authenticated administrator or contest manager callers can inspect draft results with ?admin=1.
Auth Required Saving rules/settings, viewing full QSO rows, running cross-check adjudication, and viewing admin metrics require role authorization.

API & SDK Versioning Policy

Surface Status Notes
/v1/events/* & qsoengine-client.js Stable (v1.1.0) Primary universal REST API and SDK for all new event portals and integrations.
/api/v1/contests/* & robot-client.js Legacy Compatibility Maintained for backward compatibility; responses include Deprecation: true header. Migrate to /v1/events/*.
Rate Limits & Retry Behavior: Public contact and testimonial endpoints allow up to 5 requests per 10 minutes per IP; login allows 10 failed attempts per 15 minutes. On HTTP 429, retry using exponential backoff (e.g., 2s, 4s, 8s) rather than tight polling loops.

Public REST API Reference

Filter by HTTP method or search endpoints by path and capability. Click Copy cURL on any endpoint to test it locally or download the OpenAPI 3.0.3 JSON specification.

Sample JSON Responses (Success & Error)

// 200 OK — POST /v1/events/bali_dx_2026/validate-log
{
  "success": true,
  "format": "CABRILLO",
  "summary": {
    "totalQsos": 2,
    "validQsos": 2,
    "invalidQsos": 0,
    "dupeQsos": 0,
    "estimatedScore": 4
  }
}

// 400 Bad Request / 429 Too Many Requests
{
  "success": false,
  "message": "Unsupported log format or missing content payload"
}

JavaScript SDK & Integration Examples v1.1.0

Load https://qsoengine.1bsh.com/sdk/qsoengine-client.js (v1.1.0) in any organizer portal or call the REST API directly from cURL, Node.js, PHP, or Python.

<script src="https://qsoengine.1bsh.com/sdk/qsoengine-client.js"></script>
<script>
(async () => {
  const qse = new QSOEngineClient('https://api.qsoengine.1bsh.com', 'bali_dx_2026', {
    apiPrefix: '/v1'
  });

  const sampleLog = [
    'START-OF-LOG: 3.0',
    'CALLSIGN: YB9ABC',
    'QSO: 14250 PH 2026-11-21 0412 YB9ABC 59 001 JA1XYZ 59 002',
    'END-OF-LOG:'
  ].join('\n');

  // 1. Dry-run multi-format validation (Cabrillo / ADIF / CSV / JSON)
  const preview = await qse.validateLog(sampleLog, 'CABRILLO');
  console.log('Preview:', preview.summary);

  // 2. Fetch published results & awards
  const results = await qse.getResults();
  const awards = await qse.getAwards();
  console.log({ results, awards });

  // 3. Subscribe to live SSE updates
  qse.connectStream({
    log_uploaded: (data) => console.log('New log:', data.callsign),
    scores_updated: () => console.log('Standings updated')
  });
})();
</script>

Key SDK Methods

Method Purpose
health() / getStatus()Check engine capabilities, DB latency, and uptime telemetry.
listEvents() / getRules(normalized)Retrieve registered events and normalized Rules v2 metadata.
validateLog(input, format?)Stateless dry-run validation for Cabrillo, ADIF, CSV, or JSON.
uploadLog(formData)Submit a participant log to POST /v1/events/:eventId/logs.
getScores() / getResults() / getAwards()Fetch standings, combined results, and multi-tier award eligibility.
getUbn(callsign) / connectStream(handlers)Fetch per-callsign UBN details and listen to real-time SSE events.

Rules v2 Configuration Guide

QSOEngine uses rules.json schema 2.0 to configure capability toggles, log formats, cross-checking strategy, scoring, multipliers, penalties, and award tiers per event.

CONTESTBilateral cross-check, scoring, multipliers, penalties & ranking.
SPECIAL_EVENTReference-log matching & electronic award tiers.
NETDaily check-in validation & attendance tracking.
QSO_PARTYBand/mode scoring & regional multipliers.
AWARDThreshold-based QSO verification & certificate tiers.
{
  "schemaVersion": "2.0",
  "eventId": "nusantara_ses_2027",
  "eventType": "SPECIAL_EVENT",
  "acceptedFormats": ["CABRILLO", "ADIF", "CSV", "JSON"],
  "processing": {
    "validation": true,
    "duplicateChecking": true,
    "duplicateScope": "BAND_MODE",
    "crossChecking": true,
    "matchingStrategy": "REFERENCE_LOG",
    "scoring": false,
    "ranking": false,
    "awardEligibility": true
  },
  "awards": {
    "tiers": [
      { "id": "gold", "label": "Gold Award", "minValidQsos": 20 }
    ]
  }
}

Error Reference

Errors return JSON in the shape {"success": false, "message": "..."} with standard HTTP status codes.

HTTP Status Meaning Recommended Handling
400 Bad RequestMissing log payload, unsupported format, or invalid input field.Verify format, content/logfile, and required headers (callsign, email).
401 UnauthorizedMissing or expired Bearer token / session cookie.Authenticate via POST /v1/auth/login before calling protected routes.
403 ForbiddenInsufficient role, unpublished scores, or submission deadline passed.Check user role/scope, publish_scores, or event deadline_utc.
404 Not FoundUnknown eventId, callsign, or log ID.Confirm the event ID against GET /v1/events.
413 Payload Too LargeUploaded file exceeds the 15 MB log/template limit.Split or trim unnecessary log lines before upload.
429 Too Many RequestsRate limiter triggered on public submission endpoints.Retry with exponential backoff after the rate window resets.
500 Internal Server ErrorUnexpected backend or database error.Check /status and retry safely.

Changelog

  • v1.1.0 (SDK v1.1.0 · OpenAPI 3.0.3): Added downloadable /v1/openapi.json, runnable async IIFE SDK examples, PHP & Python REST samples, and documented rate-limit retry behavior.
  • v1.1.0 — QSOEngine Universal Platform: Initial public release featuring /v1/events, multi-format parsing (Cabrillo, ADIF, CSV, JSON), Rules v2 presets, QSOEngineClient SDK, public developer documentation, interactive sandbox, and live system status telemetry.