{
  "openapi": "3.0.3",
  "info": {
    "title": "Everglow API",
    "version": "1.0.0",
    "description": "Everything the app does, available to your own integration. Generate a key in Settings → AI access. Keys act as a person and inherit that person’s permissions."
  },
  "servers": [
    {
      "url": "https://everglowdispatch.com/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A key beginning eg_, from Settings → AI access."
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/clients": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "List clients",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Create a client",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/clients/{id}": {
      "patch": {
        "tags": [
          "Clients"
        ],
        "summary": "Update a client",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/record/client/{id}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "One client with every related record",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/contacts": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "List contacts",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/properties": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "List sites",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Create a site",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/jobs": {
      "get": {
        "tags": [
          "Work"
        ],
        "summary": "List jobs",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Work"
        ],
        "summary": "Create a job",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/jobs/{id}": {
      "patch": {
        "tags": [
          "Work"
        ],
        "summary": "Update a job",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/visits": {
      "get": {
        "tags": [
          "Work"
        ],
        "summary": "List visits",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Work"
        ],
        "summary": "Create a visit",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/visits/{id}": {
      "patch": {
        "tags": [
          "Work"
        ],
        "summary": "Update a visit — status, time, notes",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/board": {
      "get": {
        "tags": [
          "Work"
        ],
        "summary": "Today's board, grouped by tech",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/calendar": {
      "get": {
        "tags": [
          "Work"
        ],
        "summary": "Visits in a date range",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/quotes": {
      "get": {
        "tags": [
          "Money"
        ],
        "summary": "List quotes",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Money"
        ],
        "summary": "Create a quote",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/quotes/{id}": {
      "get": {
        "tags": [
          "Money"
        ],
        "summary": "One quote with line items",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/quotes/{id}/invoice": {
      "post": {
        "tags": [
          "Money"
        ],
        "summary": "Turn a quote into an invoice",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/invoices": {
      "get": {
        "tags": [
          "Money"
        ],
        "summary": "List invoices",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Money"
        ],
        "summary": "Create an invoice",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/invoices/{id}": {
      "get": {
        "tags": [
          "Money"
        ],
        "summary": "One invoice",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Money"
        ],
        "summary": "Update an invoice",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/payments": {
      "get": {
        "tags": [
          "Money"
        ],
        "summary": "List payments",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Money"
        ],
        "summary": "Record a payment",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/pipeline": {
      "get": {
        "tags": [
          "Sales"
        ],
        "summary": "Open opportunities",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Sales"
        ],
        "summary": "Create one",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/pipeline/{id}": {
      "patch": {
        "tags": [
          "Sales"
        ],
        "summary": "Move stage or update",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/cases": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Callbacks and rework",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Service"
        ],
        "summary": "Open a case",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/signatures": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Signatures",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Service"
        ],
        "summary": "Capture one",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/photos": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Job photos",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Service"
        ],
        "summary": "Upload one",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/price-book": {
      "get": {
        "tags": [
          "Setup"
        ],
        "summary": "Price book",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Setup"
        ],
        "summary": "Add an item",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/timeoff": {
      "get": {
        "tags": [
          "Crew"
        ],
        "summary": "Time off",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Crew"
        ],
        "summary": "Book time off",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/team": {
      "get": {
        "tags": [
          "Crew"
        ],
        "summary": "Crew, hours, skills and time off",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/dispatch/plan": {
      "post": {
        "tags": [
          "Crew"
        ],
        "summary": "Plan and route a day (preview only)",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/dispatch/apply": {
      "post": {
        "tags": [
          "Crew"
        ],
        "summary": "Apply a plan",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/dashboard": {
      "get": {
        "tags": [
          "Reporting"
        ],
        "summary": "Headline numbers",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/report/{name}": {
      "get": {
        "tags": [
          "Reporting"
        ],
        "summary": "A named report",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/trades": {
      "get": {
        "tags": [
          "Reference"
        ],
        "summary": "Trade catalogue",
        "security": []
      }
    }
  }
}