Developer Documentation

Integrate DiagBuddy's advanced AI diagnostics into your applications with our comprehensive API

98%
Accuracy Rate
<200ms
Response Time
99.9%
Uptime SLA
50K+
Daily Requests
All Systems Operational
JavaScript
fetch('https://api.diagbuddy.ai/v1/diagnose', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    symptoms: ['won't start', 'error code E1'],
    appliance: 'washer'
  })
})

Quick Start

Get started with DiagBuddy API in minutes

Base URL

https://api.diagbuddy.ai/v1

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Basic Diagnosis Request

// Example API Call
const response = await fetch('https://api.diagbuddy.ai/v1/diagnose', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    appliance_type: 'washer',
    symptoms: ['won\'t spin', 'error code F1'],
    model: 'WHIRLPOOL WTW7500GW',
    brand: 'Whirlpool'
  })
});

const diagnosis = await response.json();
console.log(diagnosis);

API Endpoints

Complete reference for all available endpoints

POST /diagnose

Primary

Get AI-powered appliance diagnosis with step-by-step repair instructions

Request Body

{
  "appliance_type": "washer|dryer|fridge|oven|dishwasher",
  "symptoms": ["string"],
  "error_code": "string (optional)",
  "model": "string (optional)",
  "brand": "string (optional)",
  "customer_info": {
    "name": "string",
    "phone": "string",
    "location": "string"
  }
}

Response

{
  "diagnosis_id": "string",
  "confidence": 0.98,
  "primary_issue": "Faulty door lock switch",
  "severity": "medium",
  "estimated_time": "45 minutes",
  "parts_required": [
    {
      "name": "Door Lock Switch",
      "part_number": "WPW10253476",
      "price": 24.99,
      "availability": "in_stock"
    }
  ],
  "repair_steps": [
    {
      "step": 1,
      "title": "Test door switch continuity",
      "description": "Use multimeter to verify switch function",
      "tools_required": ["Multimeter"],
      "estimated_time": "5 minutes"
    }
  ],
  "alternative_solutions": ["string"]
}

GET /parts/search

Parts

Search for replacement parts with real-time pricing and availability

Query Parameters

  • q - Search query (part number, description)
  • brand - Appliance brand
  • model - Appliance model
  • limit - Results limit (default: 10)

GET /diagnostics/history

Analytics

Retrieve diagnostic history and performance analytics

Query Parameters

  • technician_id - Filter by technician
  • date_from - Start date (YYYY-MM-DD)
  • date_to - End date (YYYY-MM-DD)
  • limit - Results limit

SDK & Libraries

Official SDKs and libraries for popular programming languages

Node.js SDK

Official JavaScript/TypeScript SDK for Node.js applications

Promise-based API TypeScript Support Auto-retry Logic

Python SDK

Python library with async support and comprehensive error handling

Async/Await Support Pandas Integration CLI Tools

PHP SDK

PHP library optimized for web applications and CMS integrations

Composer Package Laravel Support WordPress Plugin

REST API

Direct REST API access for any programming language

JSON Responses Rate Limiting Webhook Support

Webhooks

Receive real-time notifications for diagnostic events and updates

Setting up Webhooks

Configure webhook URLs in your dashboard to receive real-time notifications:

diagnosis.completed

Fired when a diagnostic analysis is completed

{
  "event": "diagnosis.completed",
  "data": {
    "diagnosis_id": "diag_123456",
    "confidence": 0.98,
    "primary_issue": "Faulty control board",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

parts.ordered

Fired when a part is successfully ordered through our system

{
  "event": "parts.ordered",
  "data": {
    "order_id": "order_789012",
    "part_number": "WPW10253476",
    "quantity": 1,
    "tracking_number": "1Z999AA1234567890"
  }
}

Webhook Security

All webhooks include HMAC-SHA256 signatures for verification:

// Verify webhook signature
const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expectedSignature = crypto
    .createHmac('sha256', secret)
    .update(payload, 'utf8')
    .digest('hex');

  return signature === expectedSignature;
}