API Access

Integrate the Industrial Error Decoder directly into your CMMS, mobile app, SCADA system, or custom workflow through our REST API.

API access is included with Enterprise plans. If you don’t see an API key in your account, contact support@xaniaelectronics.com to activate API access.

Quick Start

All API requests require authentication via your API key, sent as an X-API-Key header.

cURL
curl -X POST https://xaniaelectronics.com/wp-json/id/v1/decode \
  -H "X-API-Key: idk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "error_code": "F0001",
    "manufacturer": "Siemens",
    "equipment": "Variable Frequency Drive",
    "family": "SINAMICS G120"
  }'

Authentication

Include your API key in every request using one of these methods:

  • Header (recommended): X-API-Key: idk_your_key
  • Query parameter: ?api_key=idk_your_key

Keep your API key secret. It provides full access to the decoder under your account. If compromised, contact support immediately for revocation and reissue.

Endpoints

Decode Error

POST /wp-json/id/v1/decode

Submit an error code and receive a detailed technical diagnosis with resolution steps, measurements, and repair complexity.

Request Parameters

ParameterStatusDescription
error_code Required The exact error code from the equipment display (e.g., F0001, E.OC1, AL003)
manufacturer Optional Equipment manufacturer name. Strongly recommended — the same code can have different meanings across brands. Auto-detected if omitted.
equipment Optional Equipment category: PLC, Variable Frequency Drive, Servo Drive, CNC Controller, Robot Controller, etc.
family Optional Specific product family or series (e.g., SINAMICS G120, ACS880, GA700). Significantly improves accuracy.

Response Fields

Each result in the results array contains:

error_codeExact code as identified
manufacturerIdentified manufacturer
equipment_typeEquipment category
familyProduct family/series if identified
titleFault title (service report format)
severitycritical | warning | info | ok
confidencehigh | medium | low
descriptionTechnical description of the fault condition
probable_causeNumbered list of probable causes
resolutionNumbered resolution steps with [!CRITICAL] / [!IMPORTANT] tags
safety_warningsLOTO requirements, voltage hazards, stored energy warnings
related_codesArray of related error codes
repair_level1_parameter_reset | 2_wiring_connector | 3_component_swap | 4_board_level
repair_time_estimateEstimated repair duration (e.g., “30-60 min”)
required_toolsArray of tools needed for the repair
measurementsArray of measurement reference objects (point, location, expected, instrument, safety_note)
solution_numberWhich diagnostic engine produced this result (1–4)

Example Response

JSON Response
{
  "success": true,
  "results": [
    {
      "error_code": "F0001",
      "manufacturer": "Siemens",
      "equipment_type": "Variable Frequency Drive",
      "family": "SINAMICS G120",
      "title": "Overcurrent — Hardware Current Limit Exceeded",
      "severity": "critical",
      "confidence": "high",
      "description": "The inverter has detected...",
      "probable_cause": "1. Output short circuit...",
      "resolution": "1. [!CRITICAL] Apply LOTO...",
      "repair_level": "2_wiring_connector",
      "repair_time_estimate": "30-60 min",
      "required_tools": ["Multimeter CAT III", "Megger"],
      "measurements": [
        {
          "point": "Motor insulation resistance",
          "location": "Drive output terminals U, V, W to PE",
          "expected": "> 1 MΩ at 500V DC",
          "instrument": "Insulation resistance tester (Megger)",
          "safety_note": "Disconnect motor cable from drive before testing"
        }
      ],
      "solution_number": 1
    }
  ],
  "count": 4,
  "cached": false,
  "usage": {
    "cost_this_query": "€0.15",
    "daily_used": 42,
    "daily_limit": 500,
    "daily_remaining": 458
  }
}

Check Usage

GET /wp-json/id/v1/usage

Returns your current API usage, costs, and remaining daily quota.

Code Examples

Python

Python
import requests

response = requests.post(
    "https://xaniaelectronics.com/wp-json/id/v1/decode",
    headers={"X-API-Key": "idk_your_key"},
    json={
        "error_code": "F0001",
        "manufacturer": "Siemens",
        "family": "SINAMICS G120"
    }
)

data = response.json()
for result in data["results"]:
    print(f"Solution {result['solution_number']}: {result['title']}")
    print(f"Severity: {result['severity']} | Confidence: {result['confidence']}")
    print(f"Repair: {result['repair_level']} — {result['repair_time_estimate']}")
    print()

JavaScript (Node.js)

JavaScript
const response = await fetch("https://xaniaelectronics.com/wp-json/id/v1/decode", {
    method: "POST",
    headers: {
        "X-API-Key": "idk_your_key",
        "Content-Type": "application/json"
    },
    body: JSON.stringify({
        error_code: "E.OC1",
        manufacturer: "Yaskawa",
        family: "GA700"
    })
});

const data = await response.json();
console.log(`${data.count} solutions found, cost: ${data.usage.cost_this_query}`);

C# (.NET)

C#
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "idk_your_key");

var payload = new { error_code = "AL003", manufacturer = "Danfoss" };
var json = JsonSerializer.Serialize(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");

var response = await client.PostAsync(
    "https://xaniaelectronics.com/wp-json/id/v1/decode", content);
var result = await response.Content.ReadAsStringAsync();

Rate Limits & Pricing

500
Requests / Day
€0.15
Per Query
~2s
Avg Response Time
4
Diagnostic Engines
  • Daily limit resets at 00:00 UTC
  • Cached results (previously queried codes) still count as a billable request but respond instantly
  • Rate limit headers are included in responses: X-RateLimit-Remaining
  • Exceeding the limit returns 429 Too Many Requests

Error Responses

HTTP CodeErrorMeaning
400missing_codeerror_code parameter is empty or missing
401missing_api_keyNo API key provided in request
401invalid_api_keyAPI key is incorrect or has been revoked
403api_disabledREST API is not enabled on this platform
403no_subscriptionYour account does not have an active subscription
403api_not_in_planYour plan does not include API access (Enterprise required)
404no_resultsError code could not be decoded — verify the code
429daily_limitDaily request limit exceeded — resets at midnight UTC

Integration Ideas

  • CMMS Integration — Connect to SAP PM, IBM Maximo, Fiix, or UpKeep to auto-diagnose faults logged in work orders
  • Mobile App — Build a custom app where technicians scan barcodes or enter codes to get instant field diagnostics
  • SCADA / IoT — Configure your PLC or gateway to auto-submit fault codes and push notifications with diagnoses
  • Email Alerts — Trigger automated diagnosis emails when monitoring systems detect equipment alarms
  • Reporting — Build dashboards that track fault patterns across your entire fleet

Need a higher daily limit, custom SLA, or help with integration? Contact enterprise@xaniaelectronics.com.